/**
 * მთავარი გვერდი (index.php) — სტრუქტურა, პრომო ბლოკები, მსუბუქი ოპტიმიზაცია
 */

.home-page {
    --home-radius: 16px;
    --home-radius-pill: 999px;
}

.home-page .section.home-section {
    scroll-margin-top: 5rem;
}

/* ========== Hero (sections/hero.php) ========== */
.hero-section {
    position: relative;
    min-height: min(90vh, 720px);
    overflow: hidden;
}

.hero-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: var(--desktop-bg);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: clamp(8rem, 28vh, 22rem);
    padding-bottom: 3rem;
    color: #fff;
    max-width: 46rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
    line-height: 1.15;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 1.75rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
    opacity: 0.96;
}

.hero-content .btn-primary {
    border-radius: var(--home-radius);
    padding: 0.75rem 1.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: min(85vh, 560px);
    }

    .hero-background {
        background-image: var(--mobile-bg);
    }

    .hero-content {
        padding-top: clamp(6rem, 22vh, 14rem);
    }
}

/* ========== Poland promo (sections/poland_promo.php) ========== */
.poland-promo-section-new {
    padding: clamp(3.5rem, 10vw, 6rem) 0;
    position: relative;
    background-image: url('../images/newsbanner.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    color: #fff;
}

.poland-promo-section-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.88) 0%, rgba(118, 75, 162, 0.88) 100%);
}

.poland-promo-section-new .container {
    position: relative;
    z-index: 1;
}

.promo-title-poland {
    font-size: clamp(1.85rem, 5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.promo-subtitle-poland {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.92;
}

.promo-btn-poland {
    border-radius: var(--home-radius-pill);
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid #fff;
    background-color: transparent;
    color: #fff;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-btn-poland:hover {
    background-color: #fff;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
}

/* ========== Library promo ========== */
.library-promo-section {
    padding: clamp(3.5rem, 10vw, 6rem) 0;
    position: relative;
    background-image: url('../images/library-bg.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    color: #fff;
}

.library-promo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 110, 140, 0.88) 0%, rgba(25, 167, 201, 0.88) 100%);
}

.library-promo-section .container {
    position: relative;
    z-index: 1;
}

.promo-title-library {
    font-size: clamp(1.85rem, 5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.promo-subtitle-library {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.92;
}

.promo-btn-library {
    border-radius: var(--home-radius-pill);
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid #fff;
    background-color: transparent;
    color: #fff;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-btn-library:hover {
    background-color: #fff;
    color: #146e8c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25);
}

/* დესკტოპზე პარალაქსი მხოლოდ მაშინ, როცა მომხმარებელს არ სურს ანიმაციის შემცირება */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .poland-promo-section-new,
    .library-promo-section {
        background-attachment: fixed;
    }
}

/* ========== Gallery promo (index) ========== */
.home-gallery-promo {
    content-visibility: auto;
    contain-intrinsic-size: 0 320px;
}

.home-gallery-promo .section-title span {
    color: var(--gallery-accent, #c9a227);
}

.home-gallery-promo .btn-gallery-promo {
    background-color: var(--gallery-accent, #c9a227);
    border-color: var(--gallery-accent, #c9a227);
    color: #0a0a0a;
    border-radius: var(--home-radius-pill);
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.home-gallery-promo .btn-gallery-promo:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    color: #0a0a0a;
}

/* ========== Weather + გლობალური ოვერრაიდი მობილურზე (style.css-ის შემდეგ) ========== */
@media (max-width: 991.98px) {
    .weather-promo-section {
        background-attachment: scroll !important;
    }
}

.home-weather-section .weather-promo-btn {
    border-radius: var(--home-radius-pill);
}

.home-team-cta {
    margin-top: 2.5rem;
}

/* ========== a11y: მოძრაობის შემცილება ========== */
@media (prefers-reduced-motion: reduce) {
    .promo-btn-poland:hover,
    .promo-btn-library:hover,
    .home-gallery-promo .btn-gallery-promo:hover {
        transform: none;
    }

    .poland-promo-section-new,
    .library-promo-section,
    .weather-promo-section {
        background-attachment: scroll !important;
    }
}
