/* ============================================
   NYARARI SOLUTIONS - Responsive Styles
   Mobile-first breakpoints
   ============================================ */

/* ---------- Extra Large Devices (1400px and down) ---------- */
@media (max-width: 1400px) {
    :root {
        --container-width: 1140px;
    }
}

/* ---------- Large Devices (1200px and down) ---------- */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .footer-brand img {
        margin: 0 auto 20px auto;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .process-step::after {
        display: none;
    }
}

/* ---------- Medium Devices (992px and down) ---------- */
@media (max-width: 992px) {
    :root {
        --container-width: 720px;
        --section-padding: 80px 0;
    }

    /* Typography */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--navy);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    }

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

    .nav-menu .nav-link {
        font-size: 1.1rem;
        color: var(--white);
    }

    .nav-menu .nav-cta {
        margin-left: 0;
        margin-top: 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .navbar.scrolled .nav-menu .nav-link {
        color: var(--white);
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }

    .about-image::before {
        top: -15px;
        right: -15px;
    }

    /* Values */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        order: -1;
    }

    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Hero Buttons - Stack on tablet */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ---------- Small Devices (768px and down) ---------- */
@media (max-width: 768px) {
    :root {
        --container-width: 540px;
        --section-padding: 60px 0;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 40px;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .tagline {
        font-size: 1rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-box {
        padding: 30px 20px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }

    /* Pricing Tables */
    .pricing-table {
        overflow-x: auto;
    }

    .pricing-table table {
        min-width: 600px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        padding: 60px 0 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer h5::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contact {
        max-width: max-content;
        margin: 0 auto;
    }

    .footer-contact li {
        justify-content: flex-start;
        text-align: left;
    }

    /* Contact Form */
    .contact-form {
        padding: 30px 20px;
    }

    /* Map */
    .map-container iframe {
        height: 300px;
    }

    /* WhatsApp Button */
    .whatsapp-btn {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn::before,
    .whatsapp-btn::after {
        display: none;
    }

    /* Page Header */
    .page-header {
        padding: 140px 0 60px;
    }
}

/* ---------- Extra Small Devices (576px and down) ---------- */
@media (max-width: 576px) {
    :root {
        --container-padding: 0 15px;
    }

    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    body {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Navigation */
    .nav-logo img {
        height: 45px;
    }

    .nav-logo-text {
        font-size: 1rem;
    }

    .navbar {
        padding: 15px 0;
    }

    .navbar.scrolled {
        padding: 10px 0;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-content .tagline {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    /* Cards */
    .card {
        padding: 25px 20px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    .card-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Stats */
    .stats {
        padding: 60px 0;
    }

    .stats-grid {
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 60px 0;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    /* Value Cards */
    .value-card {
        padding: 30px 20px;
    }

    /* Contact Cards */
    .contact-card {
        flex-direction: column;
        text-align: center;
    }

    .contact-card-icon {
        margin: 0 auto;
    }

    /* Form */
    .form-control {
        padding: 12px 15px;
    }

    /* Pricing Tables - Stack on mobile */
    .pricing-table-header {
        padding: 15px 20px;
    }

    .pricing-table-header h3 {
        font-size: 1.1rem;
    }

    /* Page Header */
    .page-header {
        padding: 120px 0 50px;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }
}

/* ---------- Landscape Mobile ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 100px 0 50px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .hero-content .tagline {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ---------- High Resolution Displays ---------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure sharp images on retina displays */
    .nav-logo img,
    .footer-brand img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .navbar,
    .whatsapp-btn,
    .scroll-indicator,
    .hero-video,
    .footer-social {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-overlay {
        background: var(--navy) !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }

    section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        border: 1px solid #000;
        background: transparent !important;
        color: #000 !important;
    }
}

/* ---------- Touch Device Optimizations ---------- */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work on touch */
    .btn:hover {
        transform: none;
    }

    .card:hover,
    .feature-box:hover,
    .value-card:hover,
    .contact-card:hover {
        transform: none;
    }

    /* Ensure touch targets are large enough */
    .nav-link {
        padding: 10px 0;
    }

    .footer-links a {
        padding: 8px 0;
        display: block;
    }
}

/* ---------- Dark Mode Support (Future) ---------- */
@media (prefers-color-scheme: dark) {
    /* Placeholder for future dark mode implementation */
    /* Currently using light mode only as per design */
}
