/* ===================================
   Direct On Demands - Responsive Styles
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   Tablet & Below (max-width: 1024px)
   =================================== */

@media (max-width: 1024px) {
    /* Typography Adjustments */
    :root {
        --fs-h1: clamp(2rem, 4vw, 3rem);
        --fs-h2: clamp(1.75rem, 3.5vw, 2.5rem);
        --spacing-3xl: 4rem;
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .hero-visual {
        order: -1;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    /* Dashboard Preview */
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--spacing-lg);
    }

    /* Why Us Grid */
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    /* Process Steps */
    .process-steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    /* Results Grid */
    .results-grid {
        grid-template-columns: 1fr;
    }

    /* CTA Banner */
    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    /* Contact Wrapper */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
}

/* ===================================
   Mobile & Below (max-width: 768px)
   =================================== */

@media (max-width: 768px) {
    /* Base Adjustments */
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 3rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Header & Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        padding: var(--spacing-3xl) var(--spacing-lg);
        transition: right var(--transition-normal);
        z-index: calc(var(--z-header) + 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav-link {
        font-size: 1.125rem;
    }

    .menu-toggle {
        display: flex;
        z-index: calc(var(--z-header) + 2);
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero Section */
    .hero-section {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }

    .hero-text {
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-indicators {
        justify-content: center;
    }

    .dashboard-preview {
        padding: var(--spacing-md);
    }

    .dashboard-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .dashboard-chart {
        height: 150px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    .section-description {
        font-size: 1rem;
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .service-card {
        padding: var(--spacing-lg);
    }

    /* Why Us Section */
    .feature-card {
        padding: var(--spacing-lg);
    }

    .feature-title {
        font-size: 1.5rem;
    }

    .process-flow {
        padding: var(--spacing-lg);
    }

    .step {
        min-width: 100%;
    }

    /* Results Section */
    .result-card {
        margin-bottom: var(--spacing-md);
    }

    .result-metrics {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .metric {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .cta-banner {
        padding: var(--spacing-lg);
    }

    .cta-content h3 {
        font-size: 1.5rem;
    }

    /* CTA Banner Actions */
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
    }

    /* Breadcrumb Navigation */
    .breadcrumb-nav {
        margin-top: 60px;
        padding: 0.5rem 0;
    }

    .breadcrumb-item {
        font-size: 0.8125rem;
    }

    /* Testimonials Section */
    .testimonial-card {
        padding: var(--spacing-lg);
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    /* Contact Section */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem; /* Increased spacing for touch targets */
    }

    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    /* Enhanced form element spacing */
    .form-group + .form-group {
        margin-top: 1.25rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        max-width: 300px;
    }

    .social-links {
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .footer-certifications {
        justify-content: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form .btn {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* Scroll to Top */
    .scroll-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        width: 44px;
        height: 44px;
    }
}

/* ===================================
   Small Mobile (max-width: 480px)
   =================================== */

@media (max-width: 480px) {
    /* Typography */
    :root {
        --fs-h1: 2rem;
        --fs-h2: 1.5rem;
        --fs-h3: 1.25rem;
        --fs-h4: 1.125rem;
        font-size: 14px;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }

    /* Hero Section */
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Services */
    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }

    .service-card {
        padding: var(--spacing-md);
    }

    /* Why Us */
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }

    .stat-highlight {
        font-size: 2rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 0.875rem;
    }

    /* Results */
    .result-image {
        height: 150px;
    }

    .result-content {
        padding: var(--spacing-md);
    }

    /* Testimonials */
    .quote-icon {
        font-size: 2rem;
    }

    .author-avatar {
        width: 56px;
        height: 56px;
    }

    /* Contact */
    .contact-icon {
        width: 40px;
        height: 40px;
    }

    /* Footer */
    .footer-logo {
        font-size: 1.25rem;
    }

    .cert-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ===================================
   Large Desktop (min-width: 1440px)
   =================================== */

@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    :root {
        --spacing-3xl: 8rem;
    }

    /* Hero Section */
    .hero-section {
        padding-top: calc(80px + var(--spacing-2xl));
    }

    .dashboard-preview {
        transform: scale(1.05);
    }

    /* Services Grid - Max 3 per row */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Results Grid - Max 3 per row */
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   Extra Large Desktop (min-width: 1920px)
   =================================== */

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    :root {
        font-size: 18px;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .header,
    .scroll-to-top,
    .menu-toggle,
    .nav-actions,
    .hero-actions,
    .cta-banner,
    .contact-section,
    .footer {
        display: none !important;
    }

    .hero-section {
        page-break-after: always;
    }

    .service-card,
    .feature-card,
    .result-card,
    .testimonial-card {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* ===================================
   Accessibility Enhancements
   =================================== */

/* Focus Styles */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .shape {
        animation: none;
    }

    .status-dot {
        animation: none;
    }

    .wheel {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #FF4500;
        --secondary-color: #0066CC;
        --dark: #000000;
        --white: #FFFFFF;
    }

    .btn-secondary {
        border-width: 3px;
    }

    .nav-link::after {
        height: 3px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment and customize if dark mode needed */
    /*
    :root {
        --dark: #FFFFFF;
        --white: #1A1A2E;
        --lighter-gray: #2C2C3E;
        --light-gray: #3C3C4E;
        --medium-gray: #ACACBE;
    }
    */
}

/* ===================================
   Landscape Mobile Adjustments
   =================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .hero-visual {
        order: 2;
    }

    .dashboard-preview {
        padding: var(--spacing-sm);
    }

    .dashboard-chart {
        height: 120px;
    }
}

/* ===================================
   Touch Device Optimization
   =================================== */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 48px;
        min-width: 48px;
    }

    .nav-link {
        padding: var(--spacing-sm) 0;
    }

    .social-link,
    .nav-btn,
    .scroll-to-top {
        width: 48px;
        height: 48px;
    }

    /* Remove hover effects */
    .service-card:hover,
    .feature-card:hover,
    .result-card:hover {
        transform: none;
    }

    /* Tap highlight color */
    * {
        -webkit-tap-highlight-color: rgba(255, 107, 0, 0.2);
    }
}
