/* ========================================
   DailyCal - Responsive Styles
   Mobile-First Responsive Design
   ======================================== */

/* Tablet Styles (768px - 1023px) */
@media (max-width: 1023px) {
    .container {
        padding: 0 30px;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content {
        gap: 2rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    /* Section */
    .section-title {
        font-size: 2rem;
    }

    /* CTA */
    .cta-title {
        font-size: 2rem;
    }
}

/* Mobile Styles (max-width: 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-wrapper .btn-primary {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
    }

    .dropdown-menu a {
        padding: 0.5rem 1rem;
        text-align: center;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .app-screenshot {
        max-width: 240px !important;
    }
    
    .hero-screenshots {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .logo-only {
        height: 40px;
        width: 40px;
    }
    
    .nav-left {
        gap: 1rem;
    }

    .calorie-ring {
        width: 150px;
        height: 150px;
    }

    .calorie-ring::before {
        width: 120px;
        height: 120px;
    }

    .calories {
        font-size: 2rem;
    }

    .macro-stats {
        gap: 1.5rem;
    }

    /* Floating Shapes */
    .shape-1,
    .shape-2,
    .shape-3 {
        width: 200px;
        height: 200px;
    }

    /* Sections */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

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

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon svg {
        width: 32px;
        height: 32px;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    /* How It Works */
    .steps-container {
        padding: 0;
    }

    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .step-number {
        font-size: 2.5rem;
        min-width: auto;
    }

    .step-line {
        width: 2px;
        height: 40px;
        margin: 0 auto;
    }

    /* Screenshots */
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .screenshot-img {
        max-width: 250px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* CTA Banner */
    .cta-banner {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .cta-subtitle {
        font-size: 0.95rem;
    }

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

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

    .footer-links {
        text-align: center;
    }

    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Extra Small Devices (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .phone-mockup {
        width: 220px;
        height: 440px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .step-number {
        font-size: 2rem;
    }

    .step-title {
        font-size: 1.25rem;
    }

    .cta-title {
        font-size: 1.25rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        width: 85%;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        display: none;
    }
}

/* Large Desktop (min-width: 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .cta-title {
        font-size: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-link {
        padding: 1rem;
    }

    .social-link {
        width: 50px;
        height: 50px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shape {
        animation: none;
    }

    .animate-float {
        animation: none;
    }
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .feature-card,
    .testimonial-card {
        border-width: 2px;
    }

    .btn-primary {
        border: 2px solid var(--bg-black);
    }
}

/* Print Styles */
@media print {
    .header,
    .hamburger,
    .back-to-top,
    .cta-banner,
    .floating-shape {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .section-title,
    .hero-title,
    .feature-title {
        color: black;
    }
}
