/* ==========================================
   INFRASTRUCTURE SECTION
   Style adapted from Apartment Features
   ========================================== */

.infrastructure-section {
    background: #1f1f1f;
    color: #ffffff;
    padding: 100px 0;
    font-family: 'Manrope', sans-serif;
    position: relative;
    /* overflow: hidden; REMOVED to allow scrolling */
}



.infrastructure-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.infrastructure-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.infrastructure-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: #ffffff;
}

/* Top Navigation Link/Tabs */
.infra-tabs {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    justify-content: center;
    /* Prevent clipping on left when overflowing */
    padding: 0 20px 10px;
    /* Add side padding */
}

.infra-tabs::-webkit-scrollbar {
    display: none;
}

.infra-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
    font-family: inherit;
}

.infra-tab:hover {
    color: #fff;
}

.infra-tab.active {
    color: #B29668;
    font-weight: 600;
}

.infra-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #B29668;
}

/* Main Content Layout */
.infrastructure-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Text Left, Image Right (larger) */
    gap: 60px;
    align-items: center;
}

/* Left Column: Text & Actions */
.infra-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.infra-item-title {
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #FFF;
    line-height: 1.2;
    transition: opacity 0.3s ease;
}

.infra-item-desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px 0;
    transition: opacity 0.3s ease;
    max-width: 90%;
}

/* Action Container (For Buttons) */
.infra-action-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 56px;
    /* Reserve space */
}

/* Button Style (Copied from Apart Features Nav/Actions) */
.infra-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #B29668 0%, #977D53 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(178, 150, 104, 0.2);
}

.infra-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(178, 150, 104, 0.3);
    background: linear-gradient(135deg, #be9f6d 0%, #a3885b 100%);
}

.infra-details-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.infra-details-btn:hover svg {
    transform: translateX(4px);
}


/* Right Column: Image & Gallery Controls */
.infra-display-col {
    position: relative;
}

.infra-image-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.infra-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-out, opacity 0.3s ease;
}

/* Zoom effect on load/switch */
.infra-image.animate-in {
    animation: imageZoom 0.6s ease-out forwards;
}

@keyframes imageZoom {
    from {
        transform: scale(1.1);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Gallery Controls Overlay */
.infra-gallery-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.infra-gallery-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(31, 31, 31, 0.5);
    /* Semi-transparent black */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.infra-gallery-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.infra-gallery-btn:hover {
    background: #B29668;
    border-color: #B29668;
    transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .infra-tabs {
        justify-content: flex-start;
    }

    .infrastructure-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .infra-text-col {
        display: contents;
        /* Allow children to be part of the parent grid */
        /* Text second */
        text-align: left;
        align-items: flex-start;
    }

    /* 1. Title */
    .infra-item-title {
        order: 1;
        margin-bottom: 20px;
    }

    /* 2. Image */
    .infra-display-col {
        order: 2;
        margin-bottom: 30px;
    }

    /* 3. Description */
    .infra-item-desc {
        order: 3;
        margin-bottom: 20px;
    }

    /* 4. Button */
    .infra-action-container {
        order: 4;
    }

    .infra-image-wrapper {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .infrastructure-section {
        padding: 60px 0;
    }

    .infrastructure-title {
        font-size: 32px;
        margin-bottom: 0;
    }

    .infrastructure-header {
        margin-bottom: 40px;
    }

    .infra-item-title {
        font-size: 28px;
    }

    .infra-image-wrapper {
        height: 300px;
    }

    .infra-gallery-controls {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        right: 0;
        width: 100%;
        justify-content: space-between;
        padding: 0 10px;
        pointer-events: none;
        /* Allow clicking through on image if needed, but buttons need pointer-events: auto */
    }

    .infra-gallery-btn {
        width: 44px;
        height: 44px;
        pointer-events: auto;
        background: rgba(31, 31, 31, 0.7);
    }
}

@media (max-width: 480px) {
    .infrastructure-container {
        padding: 0 20px;
    }

    .infrastructure-title {
        font-size: 28px;
    }

    .infra-item-title {
        font-size: 24px;
    }

    .infra-item-desc {
        font-size: 14px;
    }

    .infra-image-wrapper {
        height: 250px;
        border-radius: 16px;
    }

    .infra-details-btn {
        width: 100%;
        justify-content: center;
    }
}