/* Responsive Styles */

/* Tablet - 1199px and below */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    .hero__title {
        font-size: 3rem;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }

    .catalog__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet - 991px and below */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Header */
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--color-white);
        transition: var(--transition-base);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        left: 0;
    }

    .nav__list {
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: 0;
    }

    .nav__item {
        border-bottom: 1px solid var(--color-gray);
    }

    .nav__link {
        display: block;
        padding: var(--spacing-md);
    }

    .burger {
        display: flex;
    }

    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .burger.active span:nth-child(2) {
        opacity: 0;
    }

    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .header__contacts {
        display: none;
    }

    /* About */
    .about__content {
        grid-template-columns: 1fr;
    }

    .about__image {
        order: -1;
    }

    /* Contact */
    .contact__content {
        grid-template-columns: 1fr;
    }

    /* Gallery */
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile - 767px and below */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    /* Spacing */
    section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
    }

    /* Hero */
    .hero {
        background-attachment: scroll;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1.125rem;
    }

    .hero__buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero__buttons .btn {
        width: 100%;
    }

    /* Stats */
    .stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .stats__item {
        padding: var(--spacing-md);
    }

    .stats__number {
        font-size: 2.5rem;
    }

    /* Features */
    .about__features {
        gap: var(--spacing-sm);
    }

    .feature-item {
        padding: var(--spacing-sm);
    }

    .feature-item__icon {
        font-size: 2rem;
    }

    /* Catalog */
    .catalog__grid {
        grid-template-columns: 1fr;
    }

    .product-card__image {
        height: 200px;
    }

    .product-card__footer {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }

    .product-card__footer .btn {
        width: 100%;
    }

    /* Advantages */
    .advantages__grid {
        grid-template-columns: 1fr;
    }

    .advantage-card {
        padding: var(--spacing-md);
    }

    /* Gallery */
    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item {
        height: 250px;
    }

    /* Footer */
    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer__legal {
        flex-direction: column;
    }
}

/* Mobile Small - 480px and below */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header__logo img {
        height: 40px;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.875rem;
    }

    .btn--large {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .product-card__title {
        font-size: 1.25rem;
    }

    .product-card__price {
        font-size: 1.25rem;
    }

    .stats__number {
        font-size: 2rem;
    }

    .contact__info-icon {
        font-size: 1.5rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-link svg {
        width: 24px;
        height: 24px;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xxl) 0;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    /* Optimize for retina displays if needed */
}

/* Print styles */
@media print {

    .header,
    .burger,
    .hero__buttons,
    .btn,
    .contact-form,
    .socials,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
    }
}