/* ============================================
   HOME PAGE STYLES
   Base styles (.fullscreen-container, .fullscreen-section) are in section-base.css
   ============================================ */

/* === OVERLAY VARIANTS === */
.section-overlay--light {
    background: var(--white-alpha-90);
    border: 1px solid var(--accent-dark);
}

.section-overlay--dark {
    background: var(--shadow-alpha-60);
}

.section-overlay--primary {
    background: var(--color-primary-alpha-80);
}

.hero-section .section-overlay--gradient {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.85) 25%,
            rgba(0, 0, 0, 0.78) 35%,
            rgba(0, 0, 0, 0.65) 45%,
            rgba(0, 0, 0, 0.45) 55%,
            rgba(0, 0, 0, 0.15) 70%,
            transparent 85%);
}

.section-overlay--cta-gradient {
    background: linear-gradient(135deg, var(--color-secondary-alpha-20) 0%, var(--color-primary-alpha-20) 100%);
}


/* NEW DESIGN - 1в1 як на скріні */
/* Використовує загальну систему ширини */
.hero-section.hero-bordered .section-content.hero-new-design {
    border: none;
    background: transparent;
    backdrop-filter: none;
    width: 80%;
    max-width: 1400px;
    padding: 0 0 90px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
    min-height: 100%;
}

/* Tablet responsiveness (Синхронізовано з content-width) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        width: 90%;
        margin: 20px auto;
    }
    
    .fullscreen-section {
        min-height: 500px;
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .hero-buttons {
        gap: var(--spacing-sm);
    }

    /* NEW DESIGN Tablet */
    .section-content.hero-new-design {
        width: 90%;
        padding: 1rem 1.5rem 0.75rem;
    }

    .hero-new-design .hero-title {
        font-size: 2rem; /* 70% від 2.5rem */
        margin-bottom: -1rem;
    }

    .hero-new-design .hero-subtitle {
        font-size: 1rem; /* 80% від 1.25rem */;
        font-family: 'Roboto', sans-serif;
        margin-bottom: 0.3rem;
    }
    
    .hero-btn-new {
        padding: 10px 18px;
        font-size: 0.95rem;
        font-family: 'Roboto', sans-serif;
    }
}

@media (max-width: 767px) {
    /* NEW DESIGN Mobile - CSS Grid Layout */
    .hero-section.hero-bordered .section-content.hero-new-design {
        left: 5px;
        transform: none;
        width: calc(100% - 5px);
        height: 100%;
        background: transparent;
        z-index: var(--z-content);
        
        /* CSS Grid Structure */
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr auto auto;
        gap: var(--spacing-sm);
        padding: calc(var(--spacing-md) + env(safe-area-inset-top, 0px)) 
                 calc(var(--spacing-md) + env(safe-area-inset-right, 0px))
                 calc(var(--spacing-md) + max(env(safe-area-inset-bottom, 0px), 8px))
                 calc(var(--spacing-md) + env(safe-area-inset-left, 0px));
    }
    
    /* Точки слайдера: ряд 1, колонка 2 (праворуч зверху) */
    .hero-new-design .hero-slider-dots {
        grid-row: 1;
        grid-column: 2;
        justify-self: end;
        display: flex;
        align-items: center;
        gap: 4px;
        margin: 0;
    }
    
    .slider-dot {
        width: 6px;
        height: 6px;
        border-width: 1px;
    }
    
    .slider-dot.active {
        width: 12px;
        border-radius: 3px;
    }
    
    /* Заголовок: ряд 3, обидві колонки (окремий блок) */
    .hero-new-design .hero-title {
        grid-row: 3;
        grid-column: 1 / -1;
        font-size: clamp(1.5rem, 4vw, 3.5rem);
        margin: 0;
        line-height: 1.2;
        max-width: 70%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Підзаголовок: ряд 4, колонка 1 (ліворуч, в ряд з кнопкою) */
    .hero-new-design .hero-subtitle {
        grid-row: 4;
        grid-column: 1;
        font-size: clamp(0.8rem, 1.5vw, 1.25rem);
        margin: 0;
        line-height: 1.5;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        align-self: end;
    }
    
    /* Кнопки: ряд 4, колонка 2 (праворуч, в ряд з підзаголовком) */
    .hero-new-design .hero-buttons {
        grid-row: 4;
        grid-column: 2;
        justify-self: end;
        align-self: end;
        gap: 0.25rem;
        margin: 0;
        display: flex;
        align-items: center;
        max-width: 100%;
    }
    
    .hero-btn-new {
        background: #ffffff;
        color: #000000;
        padding: 6px 10px;
        font-size: 0.7rem;
        font-family: 'Roboto', sans-serif;
        min-height: auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .hero-btn-new .btn-logo-space {
        width: 5px;
        height: 5px;
    }
}

/* === HERO SECTION AS CARD === */
.hero-section {
    width: 80%;
    max-width: 1400px;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: white;
    text-align: center;
    position: relative;
}



.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none;
}

/* NEW DESIGN Title - Desktop */
@media (min-width: 768px) {
    .hero-new-design .hero-title {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: var(--spacing-md);
        max-width: 600px;
        margin-left: 0;
        margin-right: 0;
        text-shadow: none;
    }
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: var(--spacing-xxl);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none;
}

/* NEW DESIGN Subtitle - Desktop */
@media (min-width: 768px) {
    .hero-new-design .hero-subtitle {
        font-size: clamp(1rem, 1.5vw, 1.25rem);
        margin-bottom: var(--spacing-xl);
        opacity: 0.85;
        max-width: 550px;
        margin-left: 0;
        margin-right: 0;
        text-shadow: none;
        line-height: 1.5;
    }
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xxl);
}

/* NEW DESIGN Buttons - Desktop */
@media (min-width: 768px) {
    .hero-new-design .hero-buttons {
        justify-content: flex-start;
        margin-bottom: var(--spacing-lg);
    }
}


/* NEW DESIGN Button - Desktop */
@media (min-width: 768px) {
    .hero-btn-new {
        background: #ffffff;
        color: #000000;
        border: none;
        padding: 8px 14px 8px 16px;
        font-size: 1rem;
        font-family: 'Roboto', sans-serif;
        font-weight: 600;
        border-radius: 50px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 11px;
        text-decoration: none;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        white-space: nowrap;
        min-height: 54px;
        overflow: visible;
    }
}

.hero-btn-new .btn-text {
    display: inline-block;
    line-height: 1.2;
}

.hero-btn-new .btn-logo-space {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: url('/static/images/white_botton.png') no-repeat center center;
    background-size: contain;
}

.hero-btn-new:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}


.hero-slider-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

/* NEW DESIGN - Точки під кнопкою */
/* NEW DESIGN Slider Dots - Desktop */
@media (min-width: 768px) {
    .hero-new-design .hero-slider-dots {
        justify-content: flex-start;
        margin-top: var(--spacing-md);
        margin-left: 0;
    }
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}




.experts-section {
    background: transparent;
    position: relative;
    z-index: var(--z-section, 20);
    border-radius: 0;
    overflow: hidden;
    padding: 20px 0;
}

/* Використовує загальну систему ширини з section-base.css */
/* .experts-section .section-content наслідує з section-base.css: width: 70%, max-width: 1400px, padding з var() */

.experts-section .section-title {
    color: #2a2a2a;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 16px;
    text-shadow: none;
}

.experts-subtitle {
    text-align: left;
    color: #666666;
    font-size: 1.125rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    margin-bottom: 48px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-shadow: none;
    line-height: 1.6;
}



.cta-section {
    text-align: center;
    position: relative;
    z-index: var(--z-section, 20);
    overflow: hidden;
}

.cta-simple {
    background-image: url('/static/images/backgroundCTAmain.jpg');
    background-size: cover;
    padding: 50px;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transform: translateZ(0);
}

.cta-content {
    width: 100%;
    max-width: 800px;
    background: #ffffff;
    border-radius: 40px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transform: translateZ(0);
    contain: layout style paint;
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #000000;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    font-family: var(--font-heading);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* CTA кнопка "Ставай частиною Play Vision" */
.cta-section .btn-primary {
    background: linear-gradient(90deg, #E50914 0%, #000000 100%);
    color: #ffffff;
    border: none;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: 1px;
    cursor: pointer;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.cta-section .btn-primary .btn-text {
    display: inline-block;
    line-height: 1.2;
}

.cta-section .btn-primary .btn-logo-space {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: url('/static/logomainlowlogo.svg') no-repeat center center;
    background-size: contain;
}

.cta-section .btn-primary:hover {
    background: linear-gradient(90deg, #b8070f 0%, #1a1a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    -webkit-transform: translateY(-2px);
}



@media (min-width: 769px) and (max-width: 1024px) {
    .experts-section {
        padding: 20px 0;
    }

    .experts-section .section-content {
        padding: 0 30px;
    }

    .experts-section .section-title {
        font-size: 2.25rem;
        margin-bottom: 14px;
    }

    .experts-subtitle {
        font-size: 1.0625rem;
        font-family: 'Roboto', sans-serif;
        margin-bottom: 40px;
    }

}

@media (max-width: 1024px) {
    .hero-section {
        width: 90%;
        margin: 15px auto;
        box-shadow: none;
    }
    
    /* CTA залишається на всю ширину */
    .cta-section {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

}

@media (max-width: 767px) {
    .hero-section {
        width: 95%;
        margin: 8px auto;
        border-radius: 10px;
        box-shadow: none;
    }
    
    /* CTA залишається на всю ширину */
    .cta-section {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }

    /* Видалити паралакс-ефект на мобільних */
    .cta-simple {
        background-attachment: scroll;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }

    .cta-content {
        padding: 32px 24px;
        border-radius: 32px;
        gap: 20px;
    }

    .cta-title {
        font-size: 1.8rem;
        white-space: normal;
    }

    .cta-section .btn-primary {
        width: 100%;
        max-width: 280px;
        padding: 10px 20px;
        font-size: 0.6rem;
        font-family: 'Roboto', sans-serif;
    }

    .cta-section .btn-primary .btn-logo-space {
        width: 18px;
        height: 18px;
    }


    .experts-section {
        padding: 20px 0;
    }

    .experts-section .section-content {
        padding: 0 20px;
    }

    .experts-section .section-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .experts-subtitle {
        font-size: 1rem;
        font-family: 'Roboto', sans-serif;
        margin-bottom: 32px;
    }

}

@supports (-webkit-touch-callout: none) {
    .hero-section {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
    }

    .btn,
    .cta-section .btn-primary,
    .carousel-btn,
    .slider-dot,
    .hexagon,
    .hero-btn-new {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        appearance: none;
        cursor: pointer;
    }

    .fullscreen-container,
    .section-content,
    .hero-new-design,
    .experts-section {
        -webkit-overflow-scrolling: touch;
    }

    .hexagon,
    .hexagon-inner {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }

    .section-bg-video {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .section-overlay--gradient {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* iOS-специфічні властивості залишаємо, візуальні властивості винесено в стандартні медіа-запити */

    /* 480px breakpoint видалено - використовуємо 767px для уніфікації */
}


/* ============================================ */
/* DARK THEME SUPPORT - HOME PAGE */
/* ============================================ */

[data-theme="dark"] {

    /* === HERO SECTION === */
    .hero-section {
        color: white;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .hero-title,
    .hero-subtitle {
        color: white;
        text-shadow: none;
    }

    .hero-btn-new {
        background: #ffffff;
        color: #000000;
    }

    .hero-btn-new:hover {
        background: #f0f0f0;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        text-decoration: none;
    }

    .no-courses {
        color: var(--color-text-light);
    }

    /* === EXPERT CARDS (Команда професіоналів) === */
    .experts-section {
        background: transparent;
    }

    .experts-section .section-title {
        color: var(--color-text);
    }

    .experts-subtitle {
        color: var(--color-text-light);
        text-shadow: none;
    }

    /* === MENTOR-COACHING SECTION === */
    .mentor-coaching-section {
        background: transparent;
    }

    .mentor-coaching-section .section-bg {
        display: none;
    }

    .mentor-coaching-section .section-overlay--dark {
        display: none;
    }

    .mentor-coaching-section .section-title {
        color: white;
        text-shadow: none;
    }

    .mentor-coaching-section .ecosystem-subtitle {
        color: white;
        text-shadow: none;
    }

    .mentor-coaching-section .hexagon h4 {
        color: white;
        text-shadow: none;
    }

    .mentor-coaching-section .hexagon {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    .mentor-coaching-section .hexagon:hover {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    }

    .hexagon-center-large {
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    }

    .hexagon-orbit-item {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    .connection-line {
        stroke: #ff6b35;
    }

    /* === SECTION TITLES === */
    .section-title {
        color: var(--color-text);
        text-shadow: none;
    }

    .featured-courses-section .section-title {
        color: white;
        text-shadow: none;
    }

    .courses-section .section-title {
        color: var(--color-text);
        text-shadow: none;
    }

    .mentor-coaching-section .section-title {
        color: white;
    }

    .cta-content {
        background: #1a1a1a;
    }

    .cta-title {
        color: #ffffff;
    }

    /* === CTA BUTTONS === */
    .cta-section .btn-primary {
        background: linear-gradient(90deg, #E50914 0%, #000000 100%);
        border: none;
        color: #ffffff;
    }

    .cta-section .btn-primary:hover {
        background: linear-gradient(90deg, #b8070f 0%, #1a1a1a 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    }

    /* === COURSES LINK === */
    .courses-link {
        color: var(--color-primary);
    }

    .courses-link:hover {
        color: var(--color-primary-light);
    }
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {

        /* === HERO SECTION === */
        .hero-section {
            color: white;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        }

        .hero-title,
        .hero-subtitle {
            color: white;
            text-shadow: none;
        }

        .hero-btn-new {
            background: #ffffff;
            color: #000000;
        }

        .hero-btn-new:hover {
            background: #f0f0f0;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
            text-decoration: none;
        }

        .no-courses {
            color: var(--color-text-light);
        }

        /* === EXPERT CARDS (Команда професіоналів) === */
        .experts-section {
            background: transparent;
        }

        .experts-section .section-title {
            color: var(--color-text);
        }

        .experts-subtitle {
            color: var(--color-text-light);
            text-shadow: none;
        }

        /* === MENTOR-COACHING SECTION === */
        .mentor-coaching-section {
            background: transparent;
        }

        .mentor-coaching-section .section-bg {
            display: none;
        }

        .mentor-coaching-section .section-overlay--dark {
            display: none;
        }

        .mentor-coaching-section .section-title {
            color: white;
            text-shadow: none;
            margin-top: var(--spacing-xxl);
        }

        .mentor-coaching-section .ecosystem-subtitle {
            color: white;
            text-shadow: none;
        }

        .mentor-coaching-section .hexagon h4 {
            color: white;
            text-shadow: none;
        }

        .mentor-coaching-section .hexagon {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        }

        .mentor-coaching-section .hexagon:hover {
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
        }

        .hexagon-center-large {
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
        }

        .hexagon-orbit-item {
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        }

        .connection-line {
            stroke: #ff6b35;
        }

        /* === SECTION TITLES === */
        .section-title {
            color: var(--color-text);
            text-shadow: none;
        }

        .featured-courses-section .section-title {
            color: white;
            text-shadow: none;
        }

        .courses-section .section-title {
            color: var(--color-text);
            text-shadow: none;
        }

        .mentor-coaching-section .section-title {
            color: white;
        }

        .cta-content {
            background: #1a1a1a;
        }

        .cta-title {
            color: #ffffff;
        }

        /* === CTA BUTTONS === */
        .cta-section .btn-primary {
            background: linear-gradient(90deg, #E50914 0%, #000000 100%);
            border: none;
            color: #ffffff;
        }

        .cta-section .btn-primary:hover {
            background: linear-gradient(90deg, #b8070f 0%, #1a1a1a 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
        }

        /* === COURSES LINK === */
        .courses-link {
            color: var(--color-primary);
        }

        .courses-link:hover {
            color: var(--color-primary-light);
        }
    }
}