@import url('normalize.css');

.advantages-section {
    display: flex;
    width: 100%;
    /* min-height: 100vh; REMOVED to prevent scroll locking */
    /* background-color: var(--color-bg-light-white); */
    background-color: #f7f8fa;
    /* overflow: hidden; REMOVED to prevent scroll locking */
    font-family: 'Manrope', sans-serif;
}

.advantages-sidebar {
    width: 20%;
    min-width: 300px;
    background: #1f1f1f;
    /* Dark background similar to "Каждая квартира оснащена" */
    padding: 40px 20px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
    overflow-x: hidden;
}

.advantages-title {
    font-family: 'Manrope', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-label-dark-primary);
    margin-bottom: 60px;
    padding-left: 10px;
    padding-right: 10px;
    text-transform: none;
    letter-spacing: 0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.advantages-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.advantages-btn {
    width: 100%;
    padding: 30px 10px 30px 30px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--color-label-dark-tertiary);
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

/* Эффект наведения */
.advantages-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    /* Легкая подсветка */
    color: var(--color-label-dark-primary);
    padding-left: 40px;
    /* Небольшой сдвиг */
    padding-right: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Активное состояние */
.advantages-btn.active {
    background-color: var(--color-bg-light-white);
    /* Светлый фон как в гайде */
    color: var(--color-label-light-primary);
    /* Темный текст */
    padding-left: 50px;
    padding-right: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.advantages-content {
    flex: 1;
    width: auto;
    background-color: var(--color-bg-light-white);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-x: hidden;
    /* overflow-y: auto; REMOVED to prevent scroll locking */
}

.advantages-content-wrapper {
    max-width: 800px;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* Это нужно для JS анимации */
}

.advantages-content-wrapper.active {
    opacity: 1;
    transform: translateY(0);
}

.adv-placeholder-title {
    font-family: 'Manrope', sans-serif;
    font-size: 48px;
    color: var(--color-label-light-primary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.adv-placeholder-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-label-light-secondary);
}

/* Адаптив */
@media (max-width: 1400px) {
    .advantages-title {
        font-size: 24px;
    }
}

@media (max-width: 1200px) {
    .advantages-title {
        font-size: 22px;
    }
}

@media (max-width: 992px) {
    .advantages-section {
        flex-direction: column;
        min-height: auto;
    }

    .advantages-sidebar {
        width: 100%;
        min-width: auto;
        padding: 40px 20px;
    }

    .advantages-content {
        width: 100%;
        min-height: 400px;
    }

    .advantages-title {
        font-size: 26px;
        margin-bottom: 30px;
        padding-left: 15px;
    }

    .advantages-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 0;
        margin-bottom: 10px;
        justify-content: flex-start;

        /* Edge-to-edge scrolling fix */
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;

        /* Hide scrollbar */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .advantages-nav::-webkit-scrollbar {
        display: none;
    }

    .advantages-btn {
        padding: 12px 24px;
        font-size: 16px;
        width: auto;
        white-space: nowrap;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 100px;
        text-align: center;
    }

    /* Reset hover transition shifts for mobile */
    .advantages-btn:hover {
        padding-left: 24px;
        padding-right: 24px;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .advantages-btn.active {
        padding-left: 24px;
        padding-right: 24px;
        background-color: var(--color-bg-light-white);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 768px) {
    .advantages-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .advantages-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Image handling */
.adv-image-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    z-index: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
    /* Important for contained images */
    background: transparent;
}

/* MAF section - full size image container */
.green-dendro-wrapper .adv-image-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    height: 100%;
    box-shadow: none;
}

/* Адаптивная версия для мобильных и планшетов */
@media (max-width: 1200px) {
    .adv-image-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: auto;
        min-height: 400px;
        margin-bottom: 20px;
    }
}

/* Base Image (Darkened or Original) */
.adv-base-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

/* MAF section - contain image without cropping */
.green-dendro-wrapper .adv-base-image {
    object-fit: contain;
}

.green-dendro-wrapper .adv-highlight-image {
    object-fit: contain;
}

@media (max-width: 1200px) {
    .adv-base-image {
        object-fit: contain;
        height: auto;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .adv-base-image {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .adv-base-image {
        min-height: 250px;
    }
}

/* Highlight Image (The bright version, initially hidden) */
.adv-highlight-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 2;
}

@media (max-width: 1200px) {
    .adv-highlight-image {
        object-fit: contain;
    }
}

/* The Hotspot (Invisible area you hover over) */
.adv-hotspot {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    background: rgba(255, 255, 255, 0);
    /* Transparent */
}

/* Trigger: When hovering the specific hotspot, show the highlight image */
.adv-hotspot:hover~.adv-highlight-image,
.adv-highlight-image.show-mobile {
    opacity: 1;
}

/* Override old styles */
.adv-full-image {
    display: none;
}

.adv-full-image.active {
    opacity: 1;
}

.adv-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    z-index: 1;
    pointer-events: none;
}

.advantages-content.has-image .advantages-content-wrapper {
    z-index: 2;
    position: relative;
}

.advantages-content.has-image .adv-placeholder-title,
.advantages-content.has-image .adv-placeholder-desc {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* --- GESTURE HINT (Like in Parking) --- */
.adv-gesture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
    pointer-events: none;
    border-radius: 0;
    /* Match container */
}

.adv-gesture-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Catch clicks to dismiss */
}

.adv-hand-icon {
    width: 60px;
    height: 60px;
    fill: #fff;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    animation: adv-hand-point 2s infinite ease-in-out;
}

.adv-gesture-text {
    margin-top: 15px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}


/* --- Advantages Popup Modal --- */
.adv-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.adv-modal.open {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.adv-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.adv-modal.open .adv-modal-content {
    transform: scale(1);
}

.adv-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.adv-modal-close:hover,
.adv-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.adv-modal-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1003;
    text-align: center;
    max-width: 400px;
}

.adv-modal-plant-name {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.adv-modal-plant-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* --- Green Section Styles --- */
.green-section-wrapper {
    width: 100%;
    height: 100%;
    /* overflow-y: auto; REMOVED to prevent scroll locking */
    padding: 20px;
    background: var(--color-bg-light-white);
    /* Hide scrollbar for cleaner look, but allow scroll */
    /* scrollbar-width: thin; REMOVED */
    /* scrollbar-color: var(--color-label-dark-tertiary) transparent; REMOVED */
}

.green-section-wrapper::-webkit-scrollbar {
    width: 6px;
}

.green-section-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.green-section-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--color-label-dark-tertiary);
    border-radius: 20px;
}

.dendroplan-container {
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
}

.dendroplan-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.green-section-title {
    font-family: "Manrope", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-label-dark-primary);
    margin-bottom: 20px;
    text-transform: none;
}

.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.plant-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.plant-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.plant-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.plant-card:hover .plant-img {
    transform: scale(1.05);
}

.plant-info {
    padding: 15px;
}

.plant-name {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-label-dark-primary);
    margin: 0;
}

.plant-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: var(--color-label-dark-tertiary);
    margin-top: 5px;
    line-height: 1.4;
}

.all-plants-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.all-plants-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.all-plants-title {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-label-dark-primary);
}

.toggle-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.all-plants-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.all-plants-list.open {
    max-height: 1000px;
}

.plant-list-item {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--color-label-dark-secondary);
    padding: 5px 0;
    display: flex;
    align-items: center;
}

.plant-list-item::before {
    content: "";
    color: goldenrod;
    /* Assuming gold theme */
    margin-right: 8px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .plants-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .plant-img-wrapper {
        height: 140px;
    }
}

@media (max-width: 992px) {
    .green-section-wrapper {
        height: auto;
        overflow-y: visible;
    }
}

/* Green Carousel Styles */
.green-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.green-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 5px 20px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.green-carousel::-webkit-scrollbar {
    height: 6px;
}

.green-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.green-carousel::-webkit-scrollbar-thumb {
    background: var(--color-label-dark-tertiary);
    border-radius: 3px;
}

.plant-card-carousel {
    min-width: 280px;
    max-width: 280px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.plant-card-carousel:hover {
    transform: translateY(-5px);
}

.green-nav-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.green-nav-btn:hover {
    background: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.green-nav-btn.prev {
    left: -20px;
}

.green-nav-btn.next {
    right: -20px;
}

@media (max-width: 768px) {
    .green-nav-btn {
        display: none;
    }

    .plant-card-carousel {
        min-width: 240px;
    }
}

/* New Green Layout (Plan + Manropeactive List) */

.green-layout {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 20px;
    padding: 0;
    box-sizing: border-box;
}

.green-left {
    flex: 1;
    /* Takes remaining space */
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Fix flex overflow */
}

.green-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-label-dark-primary);
    margin-bottom: 15px;
    text-transform: none;
    line-height: 1;
}

.green-dendro-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 85vh;
    border-radius: 0;
    overflow: hidden;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.green-dendro-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.green-dendro-wrapper:hover .green-dendro-img {
    transform: scale(1.02);
}

.green-right {
    width: 300px;
    /* Fixed width for list */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.green-list-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #000;
    border-bottom: 1px solid var(--color-label-dark-tertiary);
    padding-bottom: 8px;
}

.green-list-scroll {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

/* Scrollbar for list */
.green-list-scroll::-webkit-scrollbar {
    width: 5px;
}

.green-list-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.green-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    margin-bottom: 8px;
}

.green-list-item:hover {
    background: #fafafa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.green-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.green-item-info {
    display: flex;
    flex-direction: column;
}

.green-item-name {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    /* Explicit dark color */
    margin-bottom: 4px;
}

.green-item-desc {
    font-size: 12px;
    color: #7f8c8d;
    /* Explicit gray color */
    line-height: 1.3;
}

@media (max-width: 992px) {
    .green-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .green-right {
        width: 100%;
        height: auto;
        min-height: 400px;
    }

    .green-left {
        min-height: 300px;
    }

    .green-dendro-wrapper {
        max-height: 60vh;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .green-dendro-wrapper {
        max-height: 50vh;
        min-height: 300px;
    }

    .adv-image-container {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .green-dendro-wrapper {
        max-height: 40vh;
        min-height: 250px;
    }

    .adv-image-container {
        min-height: 250px;
        box-shadow: none;
    }
}

/* --- Roof Section Styles --- */
.roof-layout {
    display: flex;
    width: 100%;
    height: auto;
    height: auto;
    min-height: 100%;
    gap: 80px;
    /* Increased gap to prevent overlap */
    padding: 20px;
    overflow-x: hidden;
}

.roof-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    z-index: 10;
    /* Ensure image is above shadows */
}

.roof-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 70vh;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: hidden; */
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.roof-pie-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
}

/* Увеличенные изображения для Панорамных окон и Отопления */
.roof-pie-img.enlarged {
    max-height: 90vh !important;
    max-width: 700px !important;
    width: 700px !important;
}

.roof-image-wrapper.enlarged-wrapper {
    max-width: 700px;
    width: 700px;
}

.roof-pie-img.visible {
    transform: scale(1);
    opacity: 1;
}

.roof-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 20px;
}

.roof-layers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: none;
    overflow-y: visible;
    overflow-x: visible;
    /* Was hidden, causing clipped shadows */
    padding-right: 15px;
}

/* Custom Scrollbar for list */
.roof-layers-list::-webkit-scrollbar {
    width: 6px;
}

.roof-layers-list::-webkit-scrollbar-track {
    background: transparent;
}

.roof-layers-list::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-light-grey-2);
    border-radius: 4px;
}

.roof-layers-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-tints-light-orange);
}

.roof-layer-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--color-bg-light-white);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    /* Reduced spread */
    /* Strenghtened shadow */
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-left: 4px solid transparent;
    cursor: default;
    position: relative;
    overflow: visible;
    min-height: auto;
}

.roof-layer-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
    pointer-events: none;
    border-radius: 12px;
}

.roof-layer-item:hover::after {
    transform: translateX(100%);
    transition: 0.7s;
}

.roof-layer-item.visible {
    transform: translateX(0);
    opacity: 1;
}

.roof-layer-item:hover {
    border-left-color: var(--color-tints-light-blue);
    /* Gold color matching buttons */
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.roof-layer-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-bg-light-grey-2);
    font-family: 'Manrope', sans-serif;
    transition: color 0.3s ease;
    min-width: 40px;
}

.roof-layer-item:hover .roof-layer-number {
    /* Solid Gold color matching buttons */
    color: var(--color-tints-light-blue);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.roof-layer-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.roof-layer-name {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-label-light-primary);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.roof-layer-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--color-label-light-secondary);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 1400px) {
    .roof-layout {
        flex-direction: column;
        overflow-y: auto;
        padding: 20px 0;
    }

    .roof-visual {
        min-height: 250px;
        padding: 0;
        flex: 0 0 auto;
    }

    .roof-info {
        padding: 20px;
        flex: 1 0 auto;
    }

    .roof-layer-item {
        padding: 15px;
    }

    .roof-layer-name {
        font-size: 17px;
    }

    .roof-layer-desc {
        font-size: 14px;
    }

    .roof-layer-number {
        font-size: 26px;
    }
}

@media (max-width: 1024px) {
    .roof-layer-name {
        font-size: 16px;
    }

    .roof-layer-desc {
        font-size: 13px;
    }

    .roof-layer-number {
        font-size: 24px;
    }

    .roof-layer-item {
        padding: 14px;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .roof-layer-name {
        font-size: 15px;
    }

    .roof-layer-desc {
        font-size: 13px;
    }

    .roof-layer-number {
        font-size: 22px;
        min-width: 35px;
    }

    .roof-layer-item {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .roof-layer-name {
        font-size: 14px;
        letter-spacing: 0.01em;
    }

    .roof-layer-desc {
        font-size: 12px;
        line-height: 1.4;
    }

    .roof-layer-number {
        font-size: 20px;
        min-width: 30px;
    }

    .roof-layer-item {
        padding: 10px;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .roof-layer-name {
        font-size: 13px;
        letter-spacing: 0;
    }

    .roof-layer-desc {
        font-size: 11px;
        line-height: 1.3;
    }

    .roof-layer-number {
        font-size: 18px;
        min-width: 28px;
    }

    .roof-layer-item {
        padding: 8px;
        gap: 10px;
    }

    .roof-pie-img {
        filter: none;
    }

    .roof-pie-img.enlarged {
        max-height: 50vh !important;
        width: auto !important;
        max-width: 100% !important;
    }

    .roof-image-wrapper.enlarged-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 375px) {
    .roof-layer-name {
        font-size: 12px;
    }

    .roof-layer-desc {
        font-size: 10px;
        line-height: 1.3;
    }

    .roof-layer-number {
        font-size: 16px;
        min-width: 25px;
    }

    .roof-layer-item {
        padding: 8px;
        gap: 8px;
    }
}

/* --- Materials Section Styles --- */
.materials-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.materials-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.materials-tab-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--color-bg-light-grey-2);
    border-radius: 30px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-label-light-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.materials-tab-btn:hover {
    border-color: var(--color-tints-light-orange);
    color: var(--color-label-light-primary);
}

.materials-tab-btn.active {
    background: var(--color-tints-light-orange);
    border-color: var(--color-tints-light-orange);
    color: white;
    box-shadow: 0 5px 15px rgba(247, 91, 25, 0.3);
}

.materials-content-area {
    flex: 1;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.material-block .roof-visual {
    /* Reuse styles but adjust if needed */
}

.material-block .roof-pie-img {
    max-height: 450px;
    /* Limit height to prevent huge vertical images */
    width: 100%;
    object-fit: contain;
    /* Ensure full image is visible without distortion */
}

.material-note {
    margin-top: 20px;
    padding: 15px;
    background: rgba(40, 184, 57, 0.1);
    border-left: 4px solid var(--color-tints-light-green);
    color: var(--color-label-light-secondary);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0 8px 8px 0;
}

/* Ensure sub-items use same animation styles as roof */
.material-layer-item {
    /* Derived from .roof-layer-item */
}


/* --- Materials Navigation (Arrows) --- */

.materials-nav-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 10px 0;
    user-select: none;
}

.mat-nav-btn {
    background: transparent;
    border: 1px solid var(--color-bg-light-grey-2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: var(--color-label-light-tertiary);
    outline: none;
}

.mat-nav-btn:hover {
    border-color: var(--color-label-light-secondary);
    /* Dark Grey */
    color: var(--color-label-light-secondary);
    /* Dark Grey */
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mat-nav-btn:active {
    transform: scale(0.95);
}

.mat-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mat-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
}

.mat-current-title {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-label-light-primary);
    text-align: center;
    text-transform: none;
    letter-spacing: 0.05em;
    margin: 0;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.mat-step-dots {
    display: flex;
    gap: 8px;
}

.mat-dot {
    width: 8px;
    height: 8px;
    background: var(--color-bg-light-grey-2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mat-dot.active {
    background: var(--color-label-light-secondary);
    /* Dark Grey */
    transform: scale(1.2);
}

.materials-content-area {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.materials-content-area.switching {
    opacity: 0;
    transform: translateY(10px);
}

@media (max-width: 768px) {
    .mat-title-wrapper {
        min-width: auto;
    }

    .mat-current-title {
        font-size: 18px;
    }

    .materials-nav-header {
        gap: 15px;
    }

    .mat-nav-btn {
        width: 40px;
        height: 40px;
    }
}

/* --- Facade Layout Styles --- */
.facade-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 20px;
    padding: 0 20px 20px 20px;
    /* overflow-y: auto; REMOVED to prevent scroll locking */
    /* overflow-x: hidden; */
    box-sizing: border-box;
}

.facade-header {
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

.facade-main-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--color-label-dark-secondary);
    max-width: 800px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.facade-content-grid {
    display: flex;
    gap: 40px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.facade-reasons-col {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.facade-system-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.facade-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-label-dark-primary);
    margin-bottom: 20px;
    border-bottom: 2px solid goldenrod;
    display: inline-block;
    padding-bottom: 5px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Reasons Grid */
.facade-reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.facade-reason-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.facade-reason-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.facade-reason-number {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: goldenrod;
    opacity: 0.3;
    flex-shrink: 0;
}

.facade-reason-title {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--color-label-dark-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.facade-reason-text {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-label-dark-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* System Diagram */
.facade-system-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.facade-img-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.facade-system-img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease;
}

.facade-system-img.visible {
    opacity: 1;
}

.facade-system-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.facade-system-li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--color-label-dark-secondary);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
    box-sizing: border-box;
}

.facade-system-li.visible {
    opacity: 1;
    transform: translateX(0);
}

.facade-system-num {
    background: goldenrod;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .facade-content-grid {
        flex-direction: column;
    }

    .facade-reasons-grid {
        grid-template-columns: 1fr;
    }

    .facade-system-list {
        grid-template-columns: 1fr;
    }

    .facade-layout {
        padding: 0 15px 20px 15px;
    }
}

@media (max-width: 768px) {
    .facade-layout {
        padding: 0 10px 15px 10px;
    }

    .facade-main-desc {
        font-size: 14px;
        max-width: 100%;
    }

    .facade-subtitle {
        font-size: 18px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .facade-reasons-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .facade-reason-item {
        padding: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .facade-reason-title {
        font-size: 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .facade-reason-text {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .facade-system-wrapper {
        padding: 15px;
    }

    .facade-system-li {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        align-items: flex-start;
    }

    .facade-system-num {
        margin-top: 2px;
    }

    .facade-content-grid {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .facade-layout {
        padding: 0 8px 10px 8px;
    }

    .facade-main-desc {
        font-size: 13px;
    }

    .facade-subtitle {
        font-size: 16px;
        max-width: 100%;
    }

    .facade-reason-item {
        padding: 10px;
    }

    .facade-reason-number {
        font-size: 20px;
    }

    .facade-reason-title {
        font-size: 13px;
    }

    .facade-reason-text {
        font-size: 11px;
        line-height: 1.3;
    }

    .facade-system-wrapper {
        padding: 12px;
    }

    .facade-system-li {
        font-size: 12px;
    }

    .facade-reasons-grid {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .facade-layout {
        padding: 0 5px 10px 5px;
    }

    .facade-reason-item {
        padding: 8px;
    }

    .facade-reason-number {
        font-size: 18px;
    }

    .facade-reason-title {
        font-size: 12px;
    }

    .facade-reason-text {
        font-size: 10px;
        line-height: 1.3;
    }

    .facade-subtitle {
        font-size: 14px;
    }

    .facade-system-li {
        font-size: 11px;
        gap: 8px;
    }

    .facade-system-num {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}

/* Modal Caption Responsive */
@media (max-width: 768px) {
    .adv-modal-caption {
        max-width: 90%;
        padding: 15px 20px;
        bottom: 20px;
    }

    .adv-modal-plant-name {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .adv-modal-plant-desc {
        font-size: 14px;
    }
}

.adv-mobile-nav {
    display: none;
}

@media (max-width: 992px) {
    .advantages-section {
        position: relative;
    }

    .adv-mobile-nav {
        display: flex;
        position: absolute;
        top: 55%;
        left: 0;
        width: 100%;
        justify-content: space-between;
        padding: 0 10px;
        pointer-events: none;
        z-index: 30;
        transform: translateY(-50%);
    }

    .adv-mobile-btn {
        pointer-events: auto;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(31, 31, 31, 0.6);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        backdrop-filter: blur(4px);
    }

    .adv-mobile-btn:hover {
        background: var(--color-label-dark-primary);
        transform: scale(1.1);
    }

    .adv-mobile-btn:active {
        transform: scale(0.95);
    }
}