/* public_html/portfolio.css */

/* -----------------------------------------------------------
   1. SECTION & HEADER
----------------------------------------------------------- */
.portfolio-section { 
    padding: 60px 0; 
    background: #f8f9fa; 
}
.section-header {
    margin-bottom: 40px;
    padding: 0 15px; /* Prevent text touching edges on mobile */
}
.section-title { 
    font-size: 2.5rem; 
    font-weight: 800; 
    margin-bottom: 10px; 
    color: #333;
}
.highlight { 
    color: #4f46e5; 
}
.pill-tag {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

/* -----------------------------------------------------------
   2. TABS (FILTERS)
----------------------------------------------------------- */
.portfolio-tabs { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-bottom: 40px; 
    padding: 0 10px;
}
.tab-btn {
    padding: 10px 20px; 
    border: 1px solid #ddd; 
    background: white; 
    border-radius: 50px;
    font-weight: 600; 
    font-size: 14px;
    color: #555;
    cursor: pointer; 
    transition: 0.3s;
    white-space: nowrap; /* Keep text on one line */
}
.tab-btn:hover, .tab-btn.active { 
    background: #4f46e5; 
    color: white; 
    border-color: #4f46e5; 
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* -----------------------------------------------------------
   3. PROJECTS GRID
----------------------------------------------------------- */
.projects-grid {
    display: grid; 
    /* Smart Responsive Grid: Fits as many 300px cards as possible */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px; 
    padding: 10px;
}
.project-card {
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex; 
    flex-direction: column; 
    height: 100%;
    transition: transform 0.3s ease;
}
.project-card:hover {
    transform: translateY(-5px);
}
.card-img-top { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
}
.card-body { 
    padding: 20px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}
.project-type { 
    font-size: 11px; 
    font-weight: 800; 
    color: #4f46e5; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 5px; 
}
.card-title { 
    font-size: 18px; 
    font-weight: 700;
    margin: 5px 0 10px; 
    color: #222;
}
.card-text { 
    font-size: 14px; 
    color: #666; 
    margin-bottom: 15px; 
    line-height: 1.6;
}
.read-more-btn { 
    margin-top: auto; 
    color: #4f46e5; 
    font-weight: 600; 
    cursor: pointer; 
    font-size: 14px;
}

/* -----------------------------------------------------------
   4. PROFESSIONAL MODAL (With Animation)
----------------------------------------------------------- */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darker backdrop */
    backdrop-filter: blur(8px);      /* Glass effect */
    
    /* Animation State: Hidden */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    
    /* Flexbox to center perfectly */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation State: Visible (Added by JS) */
.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 900px; /* Wider professional look */
    max-height: 90vh; /* Don't go taller than screen */
    border-radius: 16px;
    position: relative;
    overflow-y: auto; /* Scroll inside modal if content is long */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Animation: Zoom In Effect */
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-img {
    width: 100%;
    height: 350px; /* Taller image */
    object-fit: cover;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.modal-body {
    padding: 40px;
}

/* Professional Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: white;
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
    z-index: 100;
}
.close-btn:hover {
    background: #ff4d4d;
    color: white;
    transform: rotate(90deg);
}

/* Enquiry Button Styling */
.btn-enquire {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    width: 100%; /* Full width on mobile */
    text-align: center;
}
.btn-enquire:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.6);
}

/* -----------------------------------------------------------
   5. MOBILE RESPONSIVENESS (The Important Part)
----------------------------------------------------------- */

/* Tablets (iPad) */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
}

/* Mobile Phones */
@media (max-width: 768px) {
    /* Stack Grid to 1 Column */
    .projects-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    /* Adjust Title Size */
    .section-title {
        font-size: 2rem;
    }

    /* Make Tabs Scrollable if too many, or wrap nicely */
    .portfolio-tabs {
        gap: 8px;
    }
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* Modal Adjustments for Mobile */
    .modal-content {
        width: 95%; /* Take almost full width */
        max-height: 85vh;
        margin: 10% auto; /* More margin on top */
    }
    .modal-img {
        height: 200px; /* Smaller image height */
    }
    .modal-body {
        padding: 25px;
    }
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}