/* ===================================
   Responsive Design
   =================================== */

/* Large Screens (Desktops) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
}

/* Medium Large Screens */
@media (max-width: 1199px) {
    .hero-container {
        gap: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Medium Screens (Tablets) */
@media (max-width: 991px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

/* Small Medium Screens */
@media (max-width: 768px) {
    /* Enhanced mobile navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg) var(--spacing-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        transition: all 0.3s ease;
        font-weight: 500;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background-color: var(--light-blue);
        color: var(--white);
        transform: translateX(8px);
    }
    
    .nav-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-md);
        transition: background-color 0.3s ease;
    }
    
    .nav-toggle:hover {
        background-color: var(--light-gray);
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Enhanced dropdown adjustments for mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--light-gray);
        margin-top: var(--spacing-xs);
        margin-left: var(--spacing-md);
        opacity: 1;
        visibility: visible;
        transform: none;
        border-radius: var(--radius-md);
        border-left: 3px solid var(--primary-blue);
    }
    
    /* Two-column dropdown adjustments for mobile */
    .dropdown-menu.two-column {
        flex-direction: column;
        min-width: auto;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .dropdown-column {
        min-width: auto;
    }
    
    .dropdown-heading {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        background-color: rgba(20, 58, 222, 0.1);
        border-radius: var(--radius-sm);
        border-bottom: none;
    }
    
    .dropdown-menu li a {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 40px;
        display: flex;
        align-items: center;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
        transition: all 0.3s ease;
    }
    
    .dropdown-menu li a:hover {
        background-color: var(--primary-blue);
        color: var(--white);
        transform: translateX(4px);
    }
    
    .dropdown:hover .dropdown-menu {
        transform: none;
    }
    
    /* Enhanced typography for better mobile readability */
    h1 { 
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: var(--spacing-md);
    }
    h2 { 
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: var(--spacing-sm);
    }
    h3 { 
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: var(--spacing-sm);
    }
    
    p {
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Button adjustments */
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Card adjustments */
    .feature-card,
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Section spacing */
    .hero,
    .features,
    .services-preview,
    .cta-section,
    .footer {
        padding: var(--spacing-xl) 0;
    }
}

/* Small Screens (Mobile) */
@media (max-width: 576px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .navbar .container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-brand .logo {
        height: 35px;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Cards */
    .feature-card,
    .service-card {
        padding: var(--spacing-md);
        text-align: center;
    }
    
    .feature-icon,
    .service-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto var(--spacing-sm);
    }
    
    .feature-icon i,
    .service-icon i {
        font-size: 1.5rem;
    }
    
    /* Responsive images */
    img {
        max-width: 100%;
        height: auto;
        border-radius: var(--radius-md);
    }
    
    .hero-img {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
    }
    
    .logo {
        max-width: 100%;
        height: auto;
    }
    
    /* Buttons with proper touch targets */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Ensure all clickable elements have proper touch targets */
    .nav-link,
    .dropdown-menu a,
    .footer-links a,
    .social-link {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-sm);
    }
    
    .footer-links a {
        justify-content: flex-start;
        padding-left: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .contact-info {
        align-items: center;
    }

    .contact-info p {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
        font-size: 0.9rem;
        justify-content: center;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

/* Extra Small Screens */
@media (max-width: 420px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .btn {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
        min-height: 44px;
        width: 100%;
    }
    
    .feature-card,
    .service-card {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Improved form elements for very small screens */
    .form-control,
    .dropdown-selected {
        padding: var(--spacing-sm);
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Better footer spacing */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-content {
        gap: var(--spacing-sm);
    }
    
    /* Navigation improvements */
    .nav-menu {
        padding: var(--spacing-md) var(--spacing-sm);
    }
}

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

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features,
    .services-preview {
        padding: var(--spacing-lg) 0;
    }
}

/* Print Styles */
@media print {
    .nav-toggle,
    .dropdown-menu,
    .hero-buttons,
    .btn,
    .footer-social {
        display: none !important;
    }
    
    .hero,
    .features,
    .services-preview,
    .cta-section {
        padding: var(--spacing-md) 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    body {
        color: black;
        background: white;
    }
    
    .feature-card,
    .service-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .btn:hover {
        transform: none;
    }
} 