/* ===================================
   TRUSTY CHECKER - RESPONSIVE STYLES
   Mobile-First Approach
   =================================== */

/* ========== MOBILE SMALL (320px) ========== */
@media screen and (max-width: 374px) {
    :root {
        --h1-size: 2rem;
        --h2-size: 1.5rem;
        --h3-size: 1.25rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero__content h1 {
        font-size: 2rem;
    }

    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========== MOBILE MEDIUM (375px) - Default ========== */
/* Base styles are mobile-first */

/* ========== MOBILE LARGE (425px) ========== */
@media screen and (min-width: 425px) {
    .hero__buttons {
        flex-direction: row;
    }
}

/* ========== TABLET & BELOW (max-width: 768px) ========== */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: var(--shadow-xl);
        padding: var(--spacing-xl) var(--spacing-lg);
        transition: right var(--transition-base);
        z-index: var(--z-fixed);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .nav__link.active::after {
        bottom: -0.25rem;
    }

    .nav__toggle,
    .nav__close {
        display: block;
        font-size: 1.5rem;
    }

    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .nav__cta {
        display: none;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 2rem) 0 var(--spacing-xl);
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero__content {
        text-align: center;
    }

    .hero__content p {
        max-width: 100%;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__image {
        order: -1;
        width:100px;
    }

       .hero__image svg{
        order: -1;
        width:370px;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    /* Footer */
    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Floating CTA - Show on mobile */
    .floating-cta {
        display: flex;
        bottom: 1rem;
        right: 1rem;
    }

    /* Typography adjustments */
    :root {
        --h1-size: 2rem;
        --h2-size: 1.75rem;
        --h3-size: 1.5rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-title {
        margin-bottom: var(--spacing-lg);
    }
}

/* ========== TABLET (768px - 1023px) ========== */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    :root {
        --h1-size: 2.5rem;
        --h2-size: 2rem;
        --h3-size: 1.625rem;
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer__content {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Condensed navigation */
    .nav__list {
        gap: var(--spacing-md);
    }

    .nav__link {
        font-size: 0.875rem;
    }
}

/* ========== LAPTOP (1024px - 1439px) ========== */
@media screen and (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .nav__menu {
        display: flex;
        align-items: center;
    }

    .hero__container {
        grid-template-columns: 1.1fr 0.9fr;
        gap: var(--spacing-xl);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer__content {
        grid-template-columns: 2fr repeat(3, 1fr);
    }

    /* Hide floating CTA on desktop */
    .floating-cta {
        display: none !important;
    }
}

/* ========== DESKTOP (1440px - 1919px) ========== */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    :root {
        --h1-size: 3.5rem;
        --h2-size: 2.5rem;
        --h3-size: 2rem;
    }

    .hero__content h1 {
        font-size: clamp(3rem, 5vw, 4rem);
    }

    .hero__content p {
        font-size: 1.25rem;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== LARGE DESKTOP (1920px+) ========== */
@media screen and (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    :root {
        --h1-size: 4rem;
        --h2-size: 3rem;
        --h3-size: 2.25rem;
    }

    .section {
        padding: 6rem 0;
    }
}

/* ========== COMPONENT-SPECIFIC RESPONSIVE STYLES ========== */

/* Buttons */
@media screen and (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.938rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero__buttons .btn {
        width: 100%;
    }
}

/* Cards */
@media screen and (max-width: 768px) {
    .card {
        padding: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-md);
    }
}

/* Forms */
@media screen and (max-width: 768px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Footer */
@media screen and (max-width: 768px) {
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer__column {
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }

    .footer__links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .footer__content {
        gap: var(--spacing-lg);
    }
}

/* ========== ACCESSIBILITY & TOUCH TARGETS ========== */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn,
    .nav__link,
    .footer__link,
    .footer__social-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav__link {
        padding: var(--spacing-xs) 0;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero__image {
        animation: none;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 0 0 1px currentColor;
        --shadow-md: 0 0 0 2px currentColor;
        --shadow-lg: 0 0 0 3px currentColor;
    }

    .btn-primary {
        border: 2px solid var(--white);
    }

    .feature-card,
    .card {
        border: 2px solid var(--primary-blue);
    }
}

/* ========== DARK MODE (Optional) ========== */
@media (prefers-color-scheme: dark) {
    /* You can add dark mode styles here if needed */
    /* For now, keeping the light theme consistent */
}

/* ========== PRINT STYLES ========== */
@media print {
    .header,
    .footer,
    .nav__toggle,
    .floating-cta,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 1rem) 0 var(--spacing-lg);
    }

    .hero__content h1 {
        font-size: 2rem;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
}
