/* Responsive Design */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.8rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu .nav-item {
        margin-bottom: 1rem;
    }
    
    .nav-menu .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        display: block;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    /* Statistics */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Download Section */
    .download-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .download-title {
        font-size: 2.5rem;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    /* Header */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav-actions .btn {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        margin-bottom: 2rem;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Floating Cards */
    .floating-card {
        position: static;
        margin: 1rem 0;
        justify-content: center;
    }
    
    .card-1, .card-2, .card-3 {
        position: static;
        animation: none;
    }
    
    /* Sections */
    .features, .download, .testimonials {
        padding: 60px 0;
    }
    
    .statistics {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-title {
        font-size: 1.3rem;
    }
    
    /* Statistics */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .stat-content .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-content .stat-label {
        font-size: 1rem;
    }
    
    /* Map Stat Card Responsive */
    .map-image {
        max-width: 100%;
    }
    
    .map-label {
        font-size: 0.95rem;
        letter-spacing: 1.2px;
    }
    
    /* Download */
    .download-title {
        font-size: 2rem;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .store-btn img {
        height: 50px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-description {
        margin-bottom: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    /* Hero Section Mobile Optimization */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        padding-right: 0;
        order: 1;
    }
    
    .hero-image {
        order: 2;
        margin-top: 2rem;
    }
    
    .hero-visual-content {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .hero-left-content {
        order: 2;
        max-width: 100%;
        align-items: center;
    }
    
    .hero-right-content {
        order: 1;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .app-mockup-hero {
        width: 250px;
        max-width: 80vw;
    }
    
    .feature-highlight,
    .trust-badge {
        min-width: 280px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
        padding: 1rem 1.5rem;
        margin: 1.5rem auto 0;
        max-width: 100%;
    }
    
    .stat-item {
        min-width: 80px;
        flex: 1;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Header */
    .logo-img {
        width: 35px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-actions {
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Sections */
    .features, .download, .testimonials {
        padding: 40px 0;
    }
    
    .statistics {
        padding: 35px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.3rem;
    }
    
    .feature-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-description {
        font-size: 0.95rem;
    }
    
    /* Statistics */
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .stat-content .stat-number {
        font-size: 2rem;
    }
    
    .stat-content .stat-label {
        font-size: 0.9rem;
    }
    
    /* Map Stat Card Responsive */
    .stat-card-map {
        padding: 1.25rem;
    }
    
    .map-container {
        gap: 0.75rem;
    }
    
    .map-image {
        max-width: 100%;
    }
    
    .map-label {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    /* Download */
    .download-title {
        font-size: 1.8rem;
    }
    
    .download-subtitle {
        font-size: 1rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .testimonial-rating {
        margin-bottom: 1rem;
    }
    
    .testimonial-rating i {
        font-size: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .author-location {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer-logo-text {
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.95rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .copyright {
        font-size: 0.9rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .download-title {
        font-size: 1.6rem;
    }
    
    .hero-stats {
        gap: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .feature-card, .testimonial-card, .stat-card {
        padding: 1rem;
    }
    
    .store-btn img {
        height: 45px;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    /* Hero Section Mobile Reordering */
    .hero-content {
        display: flex;
        flex-direction: column;
    }

    .hero-text {
        display: contents;
    }

    .hero-title {
        order: 1;
    }

    .hero-subtitle {
        order: 2;
        margin-bottom: 2rem;
    }

    /* Hero image container - comes after text but we'll reorder its children */
    .hero-image {
        order: 2;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .hero-visual-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .hero-left-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 1;
    }

    /* Step boxes (Create Account to Delivered to Door) - show first */
    .app-features-overlay {
        order: 1;
        margin: 0 0 1.5rem 0 !important;
        width: 100%;
    }

    /* Trust badges (Licensed Pharmacy to Secure Payments) - show second */
    .trust-indicators {
        order: 2;
        margin: 0 0 2rem 0 !important;
        width: 100%;
    }

    /* App mockup image - show after badges */
    .hero-right-content {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 2rem 0;
    }

    /* Download button - move to end (after app mockup) */
    .hero-actions {
        order: 4;
        margin: 2rem 0 1rem 0;
        width: 100%;
        text-align: center;
    }

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

      /* App store badges - show last */
      .hero-app-stores {
          order: 5;
          margin: 0 0 2rem 0;
          width: 100%;
      }

      /* Ensure app mockup is properly sized on mobile */
      .app-mockup-hero {
          max-width: 280px;
          height: auto;
      }

      /* Make all feature boxes same size on mobile */
      .feature-highlight,
      .trust-badge {
          width: 100% !important;
          min-width: unset !important;
          max-width: 100% !important;
          padding: 1.2rem 1.5rem !important;
      }
  }

/* Print Styles */
@media print {
    .header,
    .back-to-top,
    .floating-elements,
    .hamburger {
        display: none !important;
    }
    
    .hero {
        padding-top: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 18pt;
        page-break-after: avoid;
    }
    
    .feature-card,
    .testimonial-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-secondary,
    .btn-outline {
        border-width: 3px;
    }
    
    .feature-card,
    .testimonial-card {
        border: 2px solid #333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .header {
        background: rgba(26, 26, 26, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .hero {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    }
    
    .features {
        background: #1a1a1a;
    }
    
    .feature-card,
    .testimonial-card {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .download {
        background: #1a1a1a;
    }
    
    .testimonials {
        background: #1a1a1a;
    }
    
    .nav-link {
        color: #e0e0e0;
    }
    
    .hero-title,
    .section-title,
    .feature-title,
    .download-title {
        color: #fff;
    }
    
    .hero-subtitle,
    .section-subtitle,
    .feature-description,
    .download-subtitle {
        color: #ccc;
    }
}
