/*
 * ODS of Tech UK - Responsive Stylesheet
 * Mobile-First Responsive Design
 */

/* ===== TABLET (768px and below) ===== */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Header & Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: var(--spacing-md);
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    /* Mobile menu toggle active state */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Hero Section */
    .hero {
        min-height: 500px;
        padding: var(--spacing-lg) 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Sections */
    section {
        padding: var(--spacing-xl) 0;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1.125rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-stats {
        justify-content: space-around;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* CTA Section */
    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1.125rem;
    }

    /* Service Detail */
    .service-detail-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-xl);
    }

    .service-detail-item.reverse {
        direction: ltr;
    }

    /* Process Timeline */
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    /* Overview Grid */
    .overview-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Mission & Vision */
    .mv-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Values Grid */
    .values-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Expertise Stats */
    .expertise-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Footer */
    .footer-grid {
        
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* ===== MOBILE (576px and below) ===== */
@media (max-width: 576px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.125rem; }

    html {
        font-size: 15px;
    }

    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Logo */
    .logo-text {
        font-size: 1.25rem;
    }

    /* Hero Section */
    .hero {
        min-height: 450px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    /* Sections */
    section {
        padding: var(--spacing-lg) 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* Page Header */
    .page-header {
        padding: var(--spacing-lg) 0;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Service Cards */
    .service-card {
        padding: var(--spacing-md);
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon svg {
        width: 40px;
        height: 40px;
    }

    /* About Stats */
    .about-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .stat-item h3 {
        font-size: 1.75rem;
    }

    /* Feature Number */
    .feature-number {
        font-size: 1.5rem;
    }

    /* CTA Section */
    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Process Timeline */
    .process-timeline {
        grid-template-columns: 1fr;
    }

    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Mission & Vision Icons */
    .mv-icon {
        width: 60px;
        height: 60px;
    }

    .mv-icon svg {
        width: 35px;
        height: 35px;
    }

    /* Value Cards */
    .value-card {
        padding: var(--spacing-md);
    }

    /* Stat Box */
    .stat-box {
        padding: var(--spacing-md);
    }

    /* Contact Item */
    .contact-item {
        padding: var(--spacing-sm);
    }

    .contact-icon {
        width: 35px;
        height: 35px;
    }

    .contact-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Contact Form */
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    /* Footer */
    .site-footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    .footer-grid {
        gap: var(--spacing-md);
    }

    .social-links a {
        width: 35px;
        height: 35px;
    }

    .social-links svg {
        width: 18px;
        height: 18px;
    }
}

/* ===== SMALL MOBILE (400px and below) ===== */
@media (max-width: 400px) {
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* ===== LARGE DESKTOP (1400px and above) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 2.75rem;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }

    .page-header {
        padding: var(--spacing-md) 0;
    }

    section {
        padding: var(--spacing-md) 0;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .btn {
        min-height: 44px;
        padding: 12px 28px;
    }

    .nav-menu li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .service-card:hover,
    .feature-item:hover,
    .value-card:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-light:hover {
        transform: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .mobile-menu-toggle,
    .hero-buttons,
    .cta-section,
    .site-footer {
        display: none;
    }

    .main-content {
        margin-top: 0;
    }

    body {
        font-size: 12pt;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }

    a {
        text-decoration: underline;
    }

    .page-header {
        background: none;
        color: var(--text-dark);
    }

    .page-header h1 {
        color: var(--text-dark);
    }
}

/* ===== ACCESSIBILITY - REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0052a3;
        --text-dark: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }

    .btn {
        border-width: 3px;
    }

    .form-group input,
    .form-group textarea {
        border-width: 3px;
    }
}
