/* Mobile First Responsive Design */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 40px 0 30px !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 0.9rem !important;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        font-size: 2.5rem !important;
    }
    
    .feature-title {
        font-size: 1.25rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    .step-number {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
    }
    
    .step-title {
        font-size: 1.1rem !important;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .feature-card {
        min-height: 300px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .feature-card {
        min-height: 320px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-hero,
    .feature-card,
    .card {
        transition: none;
    }
    
    .btn-hero:active {
        transform: scale(0.95);
    }
    
    .feature-card:active {
        transform: translateY(-5px);
    }
}

/* Landscape Orientation Adjustments */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        padding: 30px 0 20px !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .features-section,
    .how-it-works-section,
    .stats-section {
        padding: 40px 0 !important;
    }
}

/* High DPI/Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section,
    .cta-section {
        background-attachment: scroll;
    }
}

/* 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;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed in the future */
}

/* Print Styles */
@media print {
    .hero-section,
    .navbar,
    .footer,
    .btn-hero,
    #enableNotifications {
        display: none !important;
    }
    
    .feature-card,
    .step-card {
        page-break-inside: avoid;
    }
}

/* Very Small Devices (phones in portrait, less than 360px) */
@media (max-width: 359.98px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .btn-hero {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .section-title {
        font-size: 1.25rem !important;
    }
}

/* iPad and Tablet Specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-section {
        padding: 60px 0 50px;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .navbar {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}
