/* ========================================= */
/* --- RECENT PROJECTS & ANIMATIONS --- */
/* ========================================= */
.gradient-text {
    background: linear-gradient(135deg, var(--theme-green), var(--theme-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.premium-projects-section {
    background-color: #ffffff;
    overflow: hidden; /* Prevents horizontal scrollbars during animations */
}

/* --- CONTINUOUS SCROLL ANIMATIONS --- */
.reveal-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

/* Animation Starting Positions */
.fade-up { transform: translateY(50px); }
.fade-from-left { transform: translateX(-50px); }
.fade-from-right { transform: translateX(50px); }

/* Animation Active State */
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- THE PROJECT CARDS --- */
.cc-project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: block;
    background-color: #1a1a1a;
    box-shadow: 0 10px 30px rgba(27, 72, 106, 0.08);
    flex-shrink: 0;
}

/* Staggered Heights */
.card-tall { height: 460px; }
.card-short { height: 300px; }

/* Image Hover Zoom */
.cc-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cc-project-card:hover img {
    transform: scale(1.08); 
}

/* Dark Gradient Overlay */
.cc-project-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 60%; 
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    z-index: 2;
}

/* Typography Inside Card */
.cc-project-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0; /* Removed bottom margin since links are gone */
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4); 
}



/* ========================================= */
/* --- PROJECT DETAILS PAGE STYLES --- */
/* ========================================= */

.project-details-section {
    background-color: #ffffff;
}

/* --- MAIN CONTENT STYLING --- */
.gallery-img {
    height: 150px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Custom Bullet List for Work Process */
.project-process-list {
    list-style: none;
    padding-left: 0;
}

.project-process-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #5c6c7b;
    font-size: 1.05rem;
}

/* Creates the custom dot instead of standard bullets */
.project-process-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--navy-dark);
    border-radius: 50%;
}

/* --- SIDEBAR INFORMATION CARD --- */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-color: rgba(27, 72, 106, 0.1) !important;
}


.info-card-list li {
    position: relative;
    padding-left: 18px; /* Spacing for the dot */
    margin-bottom: 12px;
    padding-bottom: 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* The faint line between items */
    line-height: 1.5;
}

.info-card-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* The Green Dot Bullet */
.info-card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px; 
    width: 8px;
    height: 8px;
    background-color: var(--theme-green); 
    border-radius: 50%;
}

.info-card-list strong {
    color: var(--navy-dark);
    font-weight: 800;
}

/* --- SIDEBAR CTA CARD --- */
.sidebar-cta-card {
    /* Set a nice engineering background image */
    background-image: url('https://images.unsplash.com/photo-1581092160562-40aa08e78837?q=80&w=600&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 35px rgba(27, 72, 106, 0.15);

}

.sidebar-cta-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Dark gradient to ensure text readability */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
}

.sidebar-cta-card .btn-custom-green {
    /* Forces the button color if your global CSS doesn't apply it here */
    background-color: var(--theme-green);
    color: #000000;
    border: none;
    transition: all 0.3s ease;
}

.sidebar-cta-card .btn-custom-green:hover {
    background-color: #ffffff;
    color: var(--navy-dark);
    transform: translateY(-2px);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 991px) {
    .project-sidebar {
        margin-top: 30px;
    }
    
    .gallery-img {
        height: 100px; /* Smaller gallery images on mobile */
    }
}
/* ========================================= */
/* --- CRITICAL FIX: RESTORE STICKY SIDEBAR --- */
/* ========================================= */

@media (min-width: 992px) {
    /* 1. Un-hide overflows on ALL parent containers! */
    .project-details-section, 
    .project-details-section .container, 
    .project-details-section .row, 
    .project-details-section .col-lg-4 {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        clip-path: none !important;
    }

    /* 2. WE WANT THE COLUMN TO STRETCH! 
       Resetting the row to default so the col-lg-4 forms a tall "track" 
       for the sidebar to slide down. */
    .project-details-section .row {
        align-items: stretch !important;
    }

    /* 3. The Sticky Sidebar */
    .project-sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 130px !important; /* Distance from top of screen / navbar */
        z-index: 100;
        
        /* Forces the sidebar to stay compact inside its tall parent column */
        height: -webkit-max-content !important; 
        height: max-content !important; 
        
        padding-bottom: 30px;
        display: block !important;
        will-change: transform;
    }
}
/* ========================================= */
/* --- EQUIPMENT TABS & NESTED MENU --- */
/* ========================================= */

/* Main Outer Tabs (Vertical on Desktop) */
.custom-portfolio-tabs {
    gap: 8px;
    border-bottom: none !important; 
}

.custom-portfolio-tabs .nav-link {
    background-color: #f8f9fa; 
    color: #6c757d;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 15px 20px;
    border-radius: 12px !important; 
    border: none !important; 
    outline: none !important;
    text-decoration: none !important; 
    transition: all 0.3s ease;
}

.custom-portfolio-tabs .nav-link:hover {
    color: var(--navy-dark);
    background-color: rgba(27, 72, 106, 0.1);
    transform: translateX(5px); 
}

.custom-portfolio-tabs .nav-link.active {
    background-color: var(--navy-dark) !important;
    color: #ffffff !important;
    border: none !important; 
    text-decoration: none !important; 
    box-shadow: 0 4px 15px rgba(27, 72, 106, 0.2);
}

/* Inner Vertical Menu (The 5 Chiller Types) */
.custom-inner-tabs { gap: 5px; }

.row {
    --bs-gutter-x: 2rem;
}

.custom-inner-tabs .nav-link {
    text-align: left;
    color: var(--navy-dark);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 15px 20px;
    border-radius: 12px;
    background-color: #f8f9fa;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.custom-inner-tabs .nav-link:hover {
    background-color: rgba(140, 198, 63, 0.1);
    color: var(--theme-green);
    transform: translateX(5px);
}

.custom-inner-tabs .nav-link.active {
    background-color: var(--theme-green) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(140, 198, 63, 0.3);
}

/* ========================================= */
/* --- ADJUSTING IMAGE PROPORTIONS TO BE BIGGER --- */
/* ========================================= */

/* 3-IMAGE GRID -> Forced to 2 for Bigger Images (Controls, Piping, etc.) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* CHANGED from 3 to 2 to make images much bigger */
    gap: 20px; 
}

.portfolio-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* Landscape looks best when images are made this large */
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

.portfolio-item img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Sub-Gallery Images (Inside Chiller) */
.inner-gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
    border-radius: 12px;
}

.inner-gallery-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* --- CSS TRICK: Force HTML columns to display larger --- */
/* This forces your HTML's "col-lg-4" to act like a 50% width column, making images beautifully large! */
@media (min-width: 992px) {
    #v-pills-tabContent .col-lg-4 {
        width: 50% !important; 
    }
}

/* ========================================= */
/* --- STICKY SIDEBAR --- */
/* ========================================= */
.sticky-sidebar {
    position: -webkit-sticky; 
    position: sticky;
    top: 100px; 
    height: max-content; 
    z-index: 10;
}

/* Dynamic Border Utility */
@media (min-width: 768px) {
    .border-start-md {
        border-left: 1px solid #dee2e6 !important;
    }
}

/* ========================================= */
/* --- RESPONSIVE ADJUSTMENTS (Phones & Tablets) --- */
/* ========================================= */
@media (max-width: 991px) {
    /* Reset sticky behavior on mobile */
    .sticky-sidebar {
        position: static !important; 
        height: auto;
    }

    /* Main Tabs Mobile/Tablet (Horizontal Scroll) */
    .custom-portfolio-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 15px; 
        scrollbar-width: none; 
        -webkit-overflow-scrolling: touch; /* Smooth iOS/Android swipe */
    }
    .custom-portfolio-tabs::-webkit-scrollbar { display: none; }
    
    .custom-portfolio-tabs .nav-link { 
        border-radius: 50px !important; 
        text-align: center !important;
    }
    
    /* Inner Tabs Mobile/Tablet */
    .custom-inner-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 15px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch; /* Smooth iOS/Android swipe */
    }
    .custom-inner-tabs::-webkit-scrollbar { display: none; }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 767px) {
    /* Make images fill the entire screen width on small phones */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Force Bootstrap inner gallery to 1 column on phones */
    #v-pills-tabContent .col-md-6 {
        width: 100% !important;
    }
}

@media (max-width: 575px) {
    .custom-portfolio-tabs {
        margin-left: -15px; margin-right: -15px;
        padding-left: 15px; padding-right: 15px;
    }
}