/* Mobile First - Base styles are for mobile */

/* Tablet (769px and up) */
@media (min-width: 769px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Header */
    .header__nav {
        display: block;
    }
    
    .header__phone {
        display: flex;
    }
    
    .header__burger {
        display: none;
    }
    
    /* Hero */
    .hero__inner {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    
    .hero__content {
        text-align: left;
    }
    
    .hero__features {
        justify-content: flex-start;
    }
    
    /* Steps */
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Cases */
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* About */
    .about__inner {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Pricing */
    .pricing__row {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    /* Reviews */
    .review-card {
        flex: 0 0 calc(50% - var(--spacing-lg) / 2);
    }
    
    /* CTA */
    .form__row {
        grid-template-columns: 1fr 1fr auto;
    }
    
    .cta__contact {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Footer */
    .footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Desktop (1025px and up) */
@media (min-width: 1025px) {
    /* Typography */
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    /* Container */
    .container {
        padding: 0 2rem;
    }
    
    /* Header */
    .header__cta {
        display: inline-block;
    }
    
    /* Hero */
    .hero {
        padding: 140px 0 var(--spacing-xxl);
    }
    
    .hero__title {
        font-size: 3rem;
    }
    
    /* Steps */
    .steps {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Services */
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Cases */
    .cases__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Reviews */
    .review-card {
        flex: 0 0 calc(33.333% - var(--spacing-lg) * 2 / 3);
    }
    
    .reviews__arrow--prev {
        left: -60px;
    }
    
    .reviews__arrow--next {
        right: -60px;
    }
    
    /* Footer */
    .footer__inner {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-lg);
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        pointer-events: none;
    }
    
    .header__nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .header__menu {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .header__link {
        display: block;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--bg-light);
    }
    
    /* Pricing Table - Mobile Stacked */
    .pricing__row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .pricing__cell {
        padding: 0.5rem 0;
    }
    
    .pricing__row--header {
        display: none;
    }
    
    .pricing__cell::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--text-primary);
    }
    
    /* Reviews - Single Column */
    .reviews__arrow {
        display: none;
    }
    
    /* Footer - Adjust spacing */
    .footer__inner {
        gap: var(--spacing-lg);
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero__features {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero__feature {
        justify-content: center;
    }
    
    .form__row {
        grid-template-columns: 1fr;
    }
    
    .btn--large {
        padding: 14px 32px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero__form-wrapper,
    .cta,
    .footer__social,
    .reviews__arrow,
    .cases__filters {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 {
        font-size: 24pt;
    }
    
    h2 {
        font-size: 18pt;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0052CC;
        --secondary: #008060;
        --accent: #E67700;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .form__input {
        border-width: 2px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --bg-white: #1A1A1A;
        --bg-light: #2A2A2A;
        --bg-dark: #0A0A0A;
        --text-primary: #FFFFFF;
        --text-secondary: #CCCCCC;
    }
    
    .header {
        background-color: var(--bg-dark);
    }
    
    .form,
    .service-card,
    .case-card,
    .review-card {
        background-color: var(--bg-light);
    }
    */
}


/* Prices Section - Responsive */
@media (max-width: 768px) {
    .prices-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .prices-tab {
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
        border-bottom: 1px solid #ddd;
        padding: 1rem;
    }
    
    .prices-tab:first-child {
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }
    
    .prices-tab:last-child {
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
        border-bottom: none;
    }
    
    .prices-tab span {
        display: inline;
    }
    
    .prices-tab::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        transition: var(--transition);
    }
    
    .prices-tab.active::after {
        transform: rotate(180deg);
    }
    
    .prices-subtabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .prices-subtab {
        width: 100%;
        text-align: center;
    }
    
    .price-table {
        font-size: 0.875rem;
    }
    
    .price-table th,
    .price-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .price-table tbody tr.popular::before {
        position: static;
        display: block;
        margin-bottom: 0.5rem;
        border-radius: var(--radius-sm);
        text-align: center;
    }
    
    /* Stacked layout for narrow tables */
    .price-table.stacked {
        display: block;
    }
    
    .price-table.stacked thead {
        display: none;
    }
    
    .price-table.stacked tbody,
    .price-table.stacked tr,
    .price-table.stacked td {
        display: block;
        width: 100%;
    }
    
    .price-table.stacked tr {
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--bg-light);
        border-radius: var(--radius-sm);
        padding: var(--spacing-md);
    }
    
    .price-table.stacked td {
        padding: 0.5rem 0;
        border: none;
    }
    
    .price-table.stacked td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--primary);
    }
    
    .price-notes__list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .prices-tab span {
        display: inline;
    }
    
    .price-notes__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .prices-tabs {
        gap: var(--spacing-md);
    }
    
    .price-table {
        font-size: 1rem;
    }
}

/* Horizontal scroll for wide tables on mobile */
@media (max-width: 768px) {
    .price-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: var(--spacing-lg);
    }
    
    .price-table-wrapper .price-table {
        min-width: 600px;
    }
}
