/**
 * ============================================
 * RESPONSIVE.CSS — Адаптивные стили
 * ============================================
 * Брейкпоинты:
 * - Mobile: 320px - 575px
 * - Tablet: 576px - 991px  
 * - Desktop: 992px+
 * - Large: 1200px+
 * - XLarge: 1440px+
 * ============================================
 */

/* ========== MOBILE FIRST ========== */

/* Extra Small (< 576px) */
@media (max-width: 575.98px) {
    :root {
        --container-padding: 1rem;
    }
    
    /* Typography Scale Down */
    .section__title {
        font-size: var(--font-size-2xl);
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .hero__subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Hero */
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero__content {
        text-align: left;
    }
    
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero__stats {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: var(--spacing-lg);
    }
    
    .hero__stat {
        min-width: 100px;
        text-align: left;
    }
    
    .hero__image {
        order: -1;
    }
    
    .hero__img {
        max-width: 280px;
        margin: 0;
    }
    
    /* Header */
    .header__nav {
        display: none;
    }
    
    .header__burger {
        display: flex;
    }
    
    .header__phone span {
        display: none;
    }
    
    /* Offers */
    .offers__grid {
        grid-template-columns: 1fr;
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: 1fr;
    }
    
    /* Features */
    .features__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature {
        padding: var(--spacing-md);
    }
    
    /* Form Section */
    .form-section__container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: left;
    }
    
    .form-section__title {
        font-size: var(--font-size-2xl);
    }
    
    .form-section__text {
        font-size: var(--font-size-base);
    }
    
    .form {
        max-width: 100%;
    }
    
    .form-section__qr {
        display: none;
    }
    
    /* FAQ */
    .faq__question {
        font-size: var(--font-size-base);
        padding: var(--spacing-md) 0;
    }
    
    /* Footer */
    .footer__top {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer__nav {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer__bottom {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .footer__apps {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Small (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero */
    .hero__container {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    .hero__actions {
        justify-content: flex-start;
    }
    
    .hero__stats {
        justify-content: flex-start;
    }
    
    .hero__image {
        order: -1;
    }
    
    .hero__img {
        max-width: 320px;
        margin: 0;
    }
    
    /* Header */
    .header__nav {
        display: none;
    }
    
    .header__burger {
        display: flex;
    }
    
    /* Offers */
    .offers__grid {
        grid-template-columns: 1fr;
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: 1fr;
    }
    
    /* Features */
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Form Section */
    .form-section__container {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .form {
        max-width: 100%;
    }
    
    .form-section__qr {
        display: none;
    }
    
    /* Footer */
    .footer__top {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__nav {
        grid-column: span 2;
    }
}

/* Medium (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero */
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    /* Header */
    .header__nav-list {
        gap: var(--spacing-lg);
    }
    
    .header__nav-link {
        font-size: var(--font-size-sm);
    }
    
    /* Offers */
    .offers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .offers__grid .offer-card:last-child {
        grid-column: span 2;
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Features */
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Form Section */
    .form-section__container {
        gap: var(--spacing-xl);
    }
    
    .qr-code {
        display: none;
    }
    
    /* Footer */
    .footer__top {
        grid-template-columns: 1fr 2fr;
    }
    
    .footer__contacts {
        grid-column: span 2;
    }
    
    .footer__nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero */
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    /* Offers */
    .offers__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Features */
    .features__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439.98px) {
    :root {
        --container-max: 1140px;
    }
}

/* XXL (1440px+) */
@media (min-width: 1440px) {
    :root {
        --container-max: 1320px;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .hero__subtitle {
        font-size: var(--font-size-xl);
    }
}

/* ========== HOVER STATES (Pointer Devices) ========== */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .offer-card:hover {
        transform: translateY(-8px);
    }
    
    .service-card:hover {
        transform: translateY(-8px);
    }
}

/* ========== TOUCH DEVICES ========== */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
    }
    
    .offer-card:active,
    .service-card:active {
        transform: scale(0.99);
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== DARK MODE (Optional) ========== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support */
    /*
    :root {
        --color-bg-primary: #1F1F22;
        --color-bg-secondary: #2C2C2E;
        --color-text-primary: #FFFFFF;
        --color-text-secondary: #AEAEB2;
        --color-border: #3A3A3C;
    }
    
    .header {
        background-color: rgba(31, 31, 34, 0.95);
    }
    
    .offer-card,
    .service-card {
        background-color: var(--color-bg-secondary);
    }
    */
}

/* ========== PRINT STYLES ========== */
@media print {
    .header,
    .footer,
    .hero__actions,
    .form-section,
    .header__burger {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .section {
        padding: 20pt 0;
        page-break-inside: avoid;
    }
    
    .offer-card,
    .service-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #008000;
        --color-text-secondary: #000;
        --color-border: #000;
    }
    
    .btn--outline {
        border-width: 3px;
    }
    
    .faq__item {
        border-width: 2px;
    }
}

/* ========== MOBILE MENU (Active State) ========== */
.header__nav--open {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background-color: var(--color-bg-primary);
    padding: var(--spacing-xl);
    z-index: var(--z-modal);
    animation: slideIn 0.3s ease;
}

.header__nav--open .header__nav-list {
    flex-direction: column;
    gap: var(--spacing-lg);
}

.header__nav--open .header__nav-link {
    font-size: var(--font-size-xl);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border-light);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Burger Animation */
.header__burger--active .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger--active .header__burger-line:nth-child(2) {
    opacity: 0;
}

.header__burger--active .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Body Scroll Lock */
body.menu-open {
    overflow: hidden;
}
