﻿/* ============================================
   RESPONSIVE SCALING SYSTEM
   Reference: 1920x1080 (ideal proportions)
   All resolutions scale proportionally
   Unified visual appearance from 1024px to 2560px
   ============================================ */

/* ============================================
   SMALL DESKTOP / TABLET LANDSCAPE (1024x768)
   Proportional scaling: ~53% of 1920px reference
   ============================================ */
@media (min-width: 900px) and (max-width: 1279px) {

    .header {
        background: var(--color-white) !important;
    }

    .nav-container {
        max-width: 92vw !important;
        margin: 0 auto !important;
        /* Увеличен отступ от края */
        padding: 0 1.5rem !important;
        height: 52px !important;
        display: flex !important;
        justify-content: space-between !important;
    }

    .nav-menu {
        justify-content: space-evenly !important;
        gap: 0 !important;
    }

    .nav-link {
        font-size: 0.68rem !important;
        letter-spacing: -0.01em !important;
        padding: 0.3rem 0.5rem !important;
    }

    .nav-actions {
        gap: 0.25rem !important;
    }

    /* Кнопки уменьшены на ~5% */
    .btn-sm {
        padding: 0.3rem 0.45rem !important;
        font-size: 0.64rem !important;
    }

    .lang-btn,
    .country-select {
        padding: 0.2rem 0.35rem !important;
        font-size: 0.6rem !important;
    }

    .country-select {
        min-width: 75px !important;
    }

    /* HERO - Пропорционально уменьшено, контент ниже середины */
    .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        /* Увеличен отступ сверху чтобы контент был ниже */
        padding-top: 2.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .hero-title {
        /* Пропорция: 1024/2560 * 2.4rem ≈ 0.96rem, округлено до 1.05rem */
        font-size: 1.05rem !important;
        font-weight: 800 !important;
        line-height: 1.15 !important;
        letter-spacing: -0.01em !important;
        margin-bottom: 0.3rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .hero-subtitle {
        /* Пропорция: 1024/2560 * 0.85rem ≈ 0.34rem */
        font-size: 0.34rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        color: rgba(0, 0, 0, 0.5) !important;
    }

    /* Строка поиска - пропорционально уменьшена */
    .search-box {
        min-height: 44px !important;
        max-width: 520px !important;
        padding: 3px !important;
        padding-left: 1rem !important;
        border-radius: 22px !important;
        display: flex !important;
        align-items: center !important;
        background: var(--color-white) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
    }

    .search-input {
        font-size: 0.72rem !important;
        flex: 1 !important;
        height: 100% !important;
    }

    .search-box button {
        height: 36px !important;
        width: 36px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--color-primary) !important;
        color: var(--color-white) !important;
        flex-shrink: 0 !important;
        transition: transform 0.2s ease !important;
    }

    .search-box button svg {
        width: 16px !important;
        height: 16px !important;
        stroke: white !important;
    }

    .search-box button:hover {
        transform: scale(1.05);
        background: var(--color-primary-dark) !important;
    }

    .hero-stats {
        margin-top: 0.8rem !important;
        gap: 0.5rem !important;
    }

    .stat-item {
        width: 120px !important;
        /* Significantly smaller blocks */
        height: 60px !important;
        padding: 0.5rem !important;
        border-radius: 6px !important;
    }

    .stat-number {
        font-size: 0.85rem !important;
    }

    .stat-label {
        font-size: 0.5rem !important;
    }

    /* PROMO BANNERS - The Bottom Anchor */
    .promo-banners-section {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0 !important;
    }

    .promo-banner {
        min-height: 70px !important;
        padding: 0.5rem 0.8rem !important;
    }

    .promo-banner-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.1rem !important;
    }

    .promo-banner-description {
        font-size: 0.75rem !important;
    }

    /* AI Widget sync - 150px from bottom */
    .ai-guide-widget {
        right: 24px !important;
        bottom: 150px !important;
    }

    /* BREADCRUMBS & FILTERS */
    .breadcrumbs {
        padding: 0.5rem 0 !important;
        font-size: 0.65rem !important;
        margin-bottom: 0.5rem !important;
    }

    .category-tabs-wrapper {
        top: 60px !important;
        padding: 0.5rem 0 !important;
    }

    .category-tab {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        gap: 0.3rem !important;
    }

    .category-tab img {
        width: 14px !important;
        height: 14px !important;
    }

    /* FILTER BAR - Compact high-end look */
    .filter-bar {
        padding: 0.6rem 0.8rem !important;
        gap: 0.8rem !important;
        margin-bottom: 1rem !important;
        border-radius: 8px !important;
    }

    .filter-group label {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
    }

    .filter-select {
        height: 32px !important;
        font-size: 0.7rem !important;
        padding: 0 0.5rem !important;
        border-radius: 6px !important;
    }

    .filter-checkbox-group {
        font-size: 0.65rem !important;
        gap: 0.5rem !important;
    }

    /* CATEGORY GRID (Home Page) */
    .category-grid {
        gap: 0.75rem !important;
    }

    .category-card {
        padding: 1.2rem 1rem !important;
        min-height: 220px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
    }

    .category-icon {
        width: 72px !important;
        /* Re-balanced from 84px to match ideal proportions */
        height: 72px !important;
        margin-bottom: 1rem !important;
    }

    .category-icon img {
        width: 38px !important;
        height: 38px !important;
    }

    .category-title {
        font-size: 1.05rem !important;
        /* Clearer weight */
        margin-bottom: 0.3rem !important;
        font-weight: 700 !important;
    }

    .category-description {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    .category-count {
        font-size: 0.7rem !important;
        margin-top: auto !important;
    }

    /* SERVICES GRID - 4 Columns proportional */
    .services-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.8rem !important;
    }

    /* UNIFIED CARD SYSTEM - Balanced & Premium */
    .card {
        border-radius: 12px !important;
        overflow: hidden !important;
        min-height: auto !important;
        background: var(--color-white) !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.05) !important;
        display: flex !important;
        flex-direction: column !important;
        transition: transform 0.3s ease !important;
    }

    .card-image {
        aspect-ratio: 16 / 9 !important;
        /* Refined for cinematic crop */
        min-height: 140px !important;
        /* Increased for punchier visuals */
        width: 100% !important;
        object-fit: cover !important;
    }

    .card-content {
        padding: 0.8rem !important;
        /* Balanced whitespace */
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .card-title {
        font-size: 0.95rem !important;
        /* Clear, authoritative weight */
        margin-bottom: 0.35rem !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
        color: var(--color-dark) !important;
    }

    .card-text {
        font-size: 0.75rem !important;
        /* Scaled up */
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
        color: rgba(0, 0, 0, 0.6) !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .card-footer {
        padding-top: 0.6rem !important;
        border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
        margin-top: auto !important;
    }

    .price-val {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
    }

    .card .btn {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
        height: 36px !important;
        font-weight: 600 !important;
    }

    /* SPECIFIC OVERRIDES FOR NEWS GRID */
    .homepage-news-card {
        min-height: 340px !important;
        /* Controlled height to prevent stretching */
        height: auto !important;
        /* Ensure content drives height */
    }

    .homepage-news-card .card-image-wrapper {
        height: 150px !important;
    }

    .news-main-grid {
        gap: 1rem !important;
    }

    .news-card-featured .card-title,
    .featured-content h2 {
        font-size: 1.35rem !important;
        /* Majestic title */
        line-height: 1.1 !important;
    }

    .news-card-featured .card-text,
    .featured-content p {
        font-size: 0.85rem !important;
    }

    .news-side-grid .card-title,
    .featured-news h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.2rem !important;
    }

    /* AI SEARCH PROMO */
    section[style*="background: var(--gradient-primary)"] h2 {
        font-size: 1.4rem !important;
    }

    section[style*="background: var(--gradient-primary)"] p {
        font-size: 0.85rem !important;
        margin-bottom: 1.2rem !important;
    }

    section[style*="background: var(--gradient-primary)"] .btn-lg {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* SECTIONS SCALING */
    .section {
        padding: 1.5rem 0 !important;
    }

    .section-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem !important;
    }

    .section-description {
        font-size: 0.7rem !important;
        margin-bottom: 1rem !important;
    }

    /* HIDE NOTHING - SCALE EVERYTHING */
    .promo-banners-section~section,
    .promo-banners-section~.section {
        display: block !important;
    }

    /* Footer - Compact but visible */
    .footer {
        display: block !important;
        padding: 2rem 0 1rem !important;
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }

    .footer-section h4 {
        font-size: 0.85rem !important;
        margin-bottom: 0.6rem !important;
    }

    .footer-links a,
    .footer p {
        font-size: 0.7rem !important;
    }
}

/* ============================================
   HD SCREENS (1280px - 1439px)
   Proportional scaling: ~67% of 1920px reference
   ============================================ */
@media (min-width: 1280px) and (max-width: 1439px) {

    .nav-container,
    .container,
    .news-container,
    .tours-container {
        max-width: 95vw !important;
    }

    .header {
        height: 60px;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* HERO - Пропорционально (1280/2560 = 0.5) */
    .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding-top: 1.5rem !important;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .hero-title {
        /* Пропорция: 1280/2560 * 2.4rem = 1.2rem */
        font-size: 1.2rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.01em !important;
        margin-bottom: 0.35rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .hero-subtitle {
        /* Пропорция: 1280/2560 * 0.85rem = 0.425rem */
        font-size: 0.42rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.7rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        color: rgba(0, 0, 0, 0.5) !important;
    }

    .search-box {
        min-height: 54px !important;
        max-width: 65vw !important;
        border-radius: 27px !important;
    }

    .search-box button {
        height: 46px !important;
        width: 46px !important;
        border-radius: 50% !important;
    }
}

/* ============================================
   MEDIUM DESKTOP (1440px - 1919px)
   Proportional scaling: ~75% of 1920px reference
   ============================================ */
@media (min-width: 1440px) and (max-width: 1919px) {

    .nav-container,
    .container,
    .news-container,
    .tours-container {
        max-width: 1320px !important;
    }

    /* HERO - Пропорционально (1440/2560 = 0.5625) */
    .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding-top: 1.8rem !important;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .hero-title {
        /* Пропорция: 1440/2560 * 2.4rem = 1.35rem */
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.01em !important;
        margin-bottom: 0.4rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .hero-subtitle {
        /* Пропорция: 1440/2560 * 0.85rem = 0.478rem */
        font-size: 0.48rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.9rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        color: rgba(0, 0, 0, 0.5) !important;
    }

    .search-box {
        min-height: 58px !important;
        max-width: 62vw !important;
        border-radius: 29px !important;
    }

    .search-box button {
        height: 50px !important;
        width: 50px !important;
        border-radius: 50% !important;
    }
}

/* ============================================
   REFERENCE RESOLUTION (1920px - 2559px)
   Proportional scaling: ~75-100% baseline
   ============================================ */
@media (min-width: 1920px) and (max-width: 2559px) {

    /* NAVIGATION - Reference Grade */
    .nav-container {
        max-width: 1400px !important;
        height: 75px !important;
        margin: 0 auto !important;
    }

    .nav-link {
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        padding: 0.5rem 1rem !important;
    }

    .logo-text {
        font-size: 1.6rem !important;
        font-weight: 800 !important;
    }

    /* HERO - Пропорционально (1920/2560 = 0.75) */
    .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding-top: 2.5rem !important;
        padding-bottom: 3rem !important;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .hero-title {
        /* Пропорция: 1920/2560 * 2.4rem = 1.8rem, уменьшено до 1.65rem для запаса */
        font-size: 1.65rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .hero-subtitle {
        /* Пропорция: 1920/2560 * 0.85rem = 0.64rem, уменьшено до 0.55rem */
        font-size: 0.55rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.2rem !important;
        white-space: nowrap !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        color: rgba(0, 0, 0, 0.5) !important;
    }

    /* SEARCH - Premium Pill Standard */
    .search-box {
        min-height: 64px !important;
        max-width: 960px !important;
        padding: 5px !important;
        padding-left: 2rem !important;
        border-radius: 32px !important;
        box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.08) !important;
        background: var(--color-white) !important;
        display: flex !important;
        align-items: center !important;
    }

    .search-input {
        font-size: 1.05rem !important;
        color: var(--color-dark) !important;
    }

    .search-box button {
        height: 54px !important;
        width: 54px !important;
        /* Perfect Circle */
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--color-primary) !important;
        color: white !important;
        flex-shrink: 0 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .search-box button svg {
        width: 26px !important;
        height: 26px !important;
        stroke-width: 3px !important;
    }

    /* STATS - 240x140px Flagship Blocks */
    .hero-stats {
        margin-top: 4rem !important;
        gap: 3rem !important;
    }

    .stat-item {
        width: 240px !important;
        height: 140px !important;
        padding: 2rem !important;
        border-radius: 24px !important;
    }

    .stat-number {
        font-size: 1.8rem !important;
        font-weight: 800 !important;
    }

    .stat-label {
        font-size: 0.9rem !important;
        font-weight: 500 !important;
    }

    /* BANNER COMPACTION FOR 1920x1080 FOLD */
    .promo-banners-section {
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
    }

    .promo-banner {
        min-height: 140px !important;
        padding: 2rem 2.5rem !important;
        border-radius: 20px !important;
    }

    .promo-banner-title {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
    }

    .promo-banner-description {
        font-size: 1rem !important;
    }

    .container,
    .news-container,
    .tours-container {
        max-width: 1400px !important;
    }
}

/* ============================================
   2K DISPLAYS
   2560px+
   ============================================ */
@media (min-width: 2560px) {

    .nav-container,
    .container,
    .news-container,
    .tours-container,
    .hero .container {
        max-width: 1800px !important;
        margin: 0 auto !important;
    }

    /* Идеальная центровка для 2K экранов */
    .hero {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .hero-title {
        /* Уменьшен для размещения в одну строку */
        font-size: 2rem !important;
        letter-spacing: -0.02em !important;
        font-weight: 800 !important;
        /* Центровка + одна строка */
        width: fit-content !important;
        max-width: 95vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .hero-subtitle {
        /* Пропорционально уменьшен */
        font-size: 0.65rem !important;
        width: fit-content !important;
        max-width: 95vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        white-space: nowrap !important;
        color: rgba(0, 0, 0, 0.5) !important;
        margin-bottom: 1.5rem !important;
    }

    .nav-container .nav-menu {
        justify-content: space-evenly;
        gap: 0;
    }
}