/* ===== RESPONSIVE OPTIMIZATIONS ===== */

/* Mobile First Approach */
@media (max-width: 480px) {
    /* Typography */
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .services-page-title,
    .projects-page-title,
    .about-page-title,
    .contact-page-title,
    .partnerships-page-title {
        font-size: 2rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .service-card,
    .project-card,
    .service-detailed-card {
        padding: 1.5rem;
    }
    
    /* Grid adjustments */
    .services-grid,
    .projects-container,
    .services-detailed-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Header */
    .top-contact-bar {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    
    .top-contact-bar .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .nav {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .nav.active {
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-list li {
        margin: 0.5rem 0;
    }
    
    /* Hero adjustments */
    .hero {
        padding: 6rem 0 4rem;
        margin-top: 80px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero-stat {
        padding: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 2rem;
    }
    
    /* Contact form */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Performance simple */
    .performance-simple {
        flex-direction: column;
        gap: 1rem;
    }
    
    .performance-item {
        min-width: auto;
        width: 100%;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-detailed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .performance-simple {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Desktop */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-detailed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-detailed-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before,
    .services-page-header::before,
    .projects-page-header::before,
    .about-page-header::before,
    .contact-page-header::before,
    .partnerships-page-header::before {
        background-size: 20px 20px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .top-contact-bar,
    .mobile-menu-toggle,
    .chat-toggle,
    .back-to-top {
        display: none !important;
    }
    
    .hero,
    .services-page-header,
    .projects-page-header,
    .about-page-header,
    .contact-page-header,
    .partnerships-page-header {
        margin-top: 0 !important;
        padding: 2rem 0 !important;
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f8fafc;
        --text-light: #cbd5e1;
        --bg-white: #1e293b;
        --bg-light: #334155;
        --border-color: #475569;
    }
    
    .service-card,
    .project-card,
    .service-detailed-card,
    .testimonial-card,
    .team-member,
    .partner-card {
        background: var(--bg-white);
        border-color: var(--border-color);
    }
    
    .hero::before,
    .services-page-header::before,
    .projects-page-header::before,
    .about-page-header::before,
    .contact-page-header::before,
    .partnerships-page-header::before {
        opacity: 0.1;
    }
}

/* Focus States for Accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
