/*
 * responsive.css - Responsive Design Stylesheet
 * Happy Home Repair Education
 * Location: /assets/css/responsive.css
 */

/* ========================================
   TABLET STYLES (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-3xl: 4rem;
        --font-hero: clamp(2rem, 5vw, 3.5rem);
        --font-4xl: 2rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    /* Header */
    .header-inner {
        padding: 0 var(--spacing-md);
    }

    .main-nav ul {
        gap: var(--spacing-md);
    }

    .main-nav a {
        font-size: var(--font-sm);
    }

    /* Grid */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
        text-align: center;
    }

    .footer-brand img {
        margin: 0 auto var(--spacing-md);
    }

    /* Course Cards */
    .course-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hero */
    .hero-section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta-group .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ========================================
   MOBILE STYLES (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
        --font-hero: clamp(1.75rem, 6vw, 2.5rem);
        --font-4xl: 1.75rem;
        --font-3xl: 1.5rem;
        --font-2xl: 1.25rem;
    }

    html {
        font-size: 15px;
    }

    /* Header - Mobile Navigation */
    .site-header {
        padding: var(--spacing-sm) 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        transform: translateX(-100%);
        transition: var(--transition-normal);
        z-index: 1000;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
    }

    .main-nav a {
        font-size: var(--font-xl);
    }

    .header-cta {
        margin-top: var(--spacing-md);
    }

    /* Menu Toggle Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: calc(80px + var(--spacing-2xl)) var(--spacing-md) var(--spacing-2xl);
    }

    .hero-badge {
        font-size: var(--font-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: var(--font-md);
    }

    /* Grid */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: var(--spacing-lg);
    }

    .course-card-body {
        padding: var(--spacing-lg);
    }

    .course-price {
        font-size: var(--font-2xl);
    }

    /* Sections */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title {
        font-size: var(--font-2xl);
    }

    .section-subtitle {
        font-size: var(--font-md);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-sm);
        width: 100%;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    /* Map */
    .map-container {
        height: 300px;
    }

    /* Scroll Top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-lg);
    }

    .testimonial-text {
        font-size: var(--font-md);
    }

    /* Course Cards */
    .course-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SMALL MOBILE STYLES (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-md: 1rem;
        --font-hero: clamp(1.5rem, 7vw, 2rem);
        --font-4xl: 1.5rem;
        --font-3xl: 1.25rem;
    }

    html {
        font-size: 14px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Logo */
    .logo img {
        height: 40px;
    }

    .logo-text {
        font-size: var(--font-md);
    }

    /* Hero */
    .hero-section {
        padding-top: calc(70px + var(--spacing-lg));
    }

    .hero-title {
        font-size: var(--font-3xl);
    }

    /* Cards */
    .card {
        padding: var(--spacing-md);
    }

    .card-icon {
        font-size: 2rem;
    }

    .card-title {
        font-size: var(--font-lg);
    }

    /* Course Cards */
    .course-card-header {
        padding: var(--spacing-md);
    }

    .course-name {
        font-size: var(--font-xl);
    }

    .course-card-body {
        padding: var(--spacing-md);
    }

    .course-price {
        font-size: var(--font-xl);
    }

    .course-cta {
        padding: var(--spacing-sm);
        font-size: var(--font-md);
    }

    /* Footer */
    .site-footer {
        padding: var(--spacing-2xl) 0 var(--spacing-md);
    }

    .footer-column h4 {
        font-size: var(--font-md);
    }

    .business-info {
        padding: var(--spacing-sm);
    }

    .business-info p {
        font-size: 10px;
    }

    /* Contact */
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Map */
    .map-container {
        height: 250px;
    }
}

/* ========================================
   LANDSCAPE MOBILE
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-title {
        font-size: var(--font-2xl);
    }

    .main-nav {
        padding: var(--spacing-lg) 0;
    }

    .main-nav ul {
        gap: var(--spacing-sm);
    }

    .main-nav a {
        font-size: var(--font-md);
    }
}

/* ========================================
   LARGE DESKTOP STYLES (min-width: 1400px)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    :root {
        --font-hero: 4.5rem;
    }

    .hero-section {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .course-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   RETINA / HIGH DPI DISPLAYS
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   REDUCED MOTION (Accessibility)
   ======================================== */
@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;
    }

    .star {
        animation: none;
    }

    .btn::before {
        display: none;
    }

    .btn-pulse {
        animation: none;
    }
}

/* ========================================
   DARK MODE PREFERENCE
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, no changes needed */
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .site-header,
    .site-footer,
    .scroll-top,
    .cosmic-bg,
    .stars-bg,
    .page-loader {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .btn {
        border: 1px solid black;
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .hero-title,
    .section-title {
        background: none;
        -webkit-text-fill-color: black;
        color: black;
    }
}

/* ========================================
   TOUCH DEVICE STYLES
   ======================================== */
@media (hover: none) {
    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .feature-item:hover .feature-icon {
        transform: none;
    }

    /* Tap highlight for touch devices */
    a, button {
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
}

/* ========================================
   SLIDER RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .slider-container {
        height: 300px;
    }

    .slider-nav {
        display: none;
    }

    .slider-pagination {
        bottom: 10px;
    }

    .slider-pagination .dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 250px;
    }
}
