/* Responsive CSS for CosmosWiFi Website */

/* Extra Large Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 3.5rem;
    }
}

/* Large Screens (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .features-content {
        gap: 3rem;
    }
}

/* Medium Large Screens (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Medium Screens (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
        z-index: 999;
    }

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

    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 0;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .features-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .features-image {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Small Screens (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .hero-section {
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-card {
        padding: 2rem 1.5rem;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .features-text h2 {
        font-size: 2.2rem;
    }
    
    .features-text p {
        font-size: 1.1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

/* Extra Small Screens (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .navbar {
        padding: 0.8rem 0;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        top: 65px;
        padding: 1.5rem 0;
    }
    
    .nav-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-section {
        min-height: 450px;
        padding: 0 5px;
    }
    
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .title-line-1,
    .title-line-2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        gap: 0.8rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        max-width: 250px;
    }
    
    .about-section,
    .features-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .about-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .about-card p {
        font-size: 0.9rem;
    }
    
    .features-text h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .features-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .feature-item {
        gap: 0.8rem;
    }
    
    .feature-content h4 {
        font-size: 1rem;
    }
    
    .feature-content p {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-logo span {
        font-size: 1.1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .scroll-icon {
        font-size: 1.3rem;
    }
}

/* Landscape orientation on mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        height: auto;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        margin-top: 1rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .video-background video {
        display: none;
    }
    
    .video-background {
        background: linear-gradient(
            45deg,
            rgba(37, 99, 235, 0.8) 0%,
            rgba(59, 130, 246, 0.7) 50%,
            rgba(16, 185, 129, 0.8) 100%
        ) !important;
    }
}

/* Print styles */
@media print {
    .header,
    .video-background,
    .scroll-indicator,
    .hamburger {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
        background: white !important;
        color: black !important;
    }
    
    .video-overlay {
        display: none;
    }
    
    .hero-title,
    .hero-subtitle {
        color: black !important;
    }
    
    .btn {
        border: 1px solid black !important;
        background: white !important;
        color: black !important;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        border-top: 1px solid #ccc;
    }
    
    .social-links {
        display: none;
    }
}

/* Accessibility enhancements */
@media (prefers-contrast: high) {
    .nav-link:hover,
    .nav-link.active {
        background: rgba(37, 99, 235, 0.2);
        border: 2px solid #2563eb;
    }
    
    .btn-primary {
        border: 2px solid #1d4ed8;
    }
    
    .btn-outline {
        border: 3px solid white;
    }
    
    .about-card:hover {
        border: 2px solid #2563eb;
    }
}

/* Focus styles for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .social-links a:focus {
        outline: 3px solid #60a5fa;
        outline-offset: 2px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .btn:hover,
    .about-card:hover {
        transform: none;
    }
    
    .nav-link:active,
    .btn:active {
        transform: scale(0.98);
    }
    
    .about-card:active {
        transform: scale(0.95);
    }
    
    /* Increase touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Custom breakpoints for specific content */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .title-line-1,
    .title-line-2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        max-width: 200px;
    }
    
    .about-card {
        padding: 1.2rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* Extremely wide screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
}

/* Specific optimizations for common device sizes */

/* iPhone SE */
@media (max-width: 375px) and (max-height: 667px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
}

/* iPad */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro */
@media (min-width: 1024px) and (max-width: 1366px) {
    .features-content {
        gap: 4rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
