/* ============================================
   Responsive Design - Mobile First Approach
   ============================================ */

/* Tablet (768px and below) */
@media screen and (max-width: 768px) {

    /* Typography adjustments */
    :root {
        --font-size-5xl: 2.25rem;
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }

    /* Container */
    .container {
        --container-padding: 1.5rem;
    }

    /* Header / Navigation */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 78px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 78px);
        background-color: #2c2c2c;
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-2xl) var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-base);
        gap: var(--spacing-md);
    }

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

    .nav-link {
        font-size: var(--font-size-lg);
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid rgba(192, 196, 200, 0.2);
        width: 100%;
        color: var(--color-secondary-light);
    }

    .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 {
        min-height: calc(100vh - 70px);
        padding: var(--spacing-3xl) 0;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-md);
    }

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

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        min-height: 300px;
    }

    .stats {
        position: static;
        margin-top: var(--spacing-lg);
    }

    .value-item:hover {
        transform: none;
    }

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

    /* Team Section */
    .team-grid {
        grid-template-columns: 1fr;
    }

    /* Differentials Section */
    .differentials-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Section */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

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

    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .map-placeholder {
        height: 300px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto var(--spacing-md);
    }

    /* WhatsApp Float Button */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: var(--spacing-xl);
        right: var(--spacing-md);
        font-size: var(--font-size-2xl);
    }

    /* Back to Top Button */
    .back-to-top {
        bottom: calc(var(--spacing-xl) + 70px);
        right: var(--spacing-md);
        width: 45px;
        height: 45px;
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {

    /* Typography adjustments */
    :root {
        --font-size-5xl: 1.875rem;
        --font-size-4xl: 1.5rem;
        --font-size-3xl: 1.25rem;
    }

    /* Container */
    .container {
        --container-padding: 1rem;
    }

    /* Logo */
    .logo img {
        height: 40px;
    }

    /* Section spacing */
    .about,
    .services,
    .team,
    .differentials,
    .contact {
        padding: var(--spacing-3xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    /* Hero Section */
    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .scroll-indicator {
        bottom: var(--spacing-lg);
    }

    /* Services cards */
    .service-card {
        padding: var(--spacing-lg);
    }

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

    .service-icon i {
        font-size: var(--font-size-2xl);
    }

    /* Team members */
    .member-photo {
        width: 120px;
        height: 120px;
    }

    /* Differentials */
    .differential-item {
        padding: var(--spacing-lg);
    }

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

    .differential-icon i {
        font-size: var(--font-size-2xl);
    }

    /* Stats */
    .stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: var(--font-size-3xl);
    }

    /* Contact info items */
    .info-item {
        flex-direction: column;
        text-align: center;
    }

    .info-item i {
        width: 100%;
    }
}

/* Large screens (1400px and above) */
@media screen and (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print styles */
@media print {
    .header,
    .whatsapp-float,
    .back-to-top,
    .hero-buttons,
    .contact-form-wrapper,
    .scroll-indicator {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }

    body {
        font-size: 12pt;
    }

    .section-title {
        page-break-after: avoid;
    }

    .service-card,
    .team-member,
    .differential-item {
        page-break-inside: avoid;
    }
}

/* Landscape mode for small devices */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: var(--spacing-lg);
    }

    .scroll-indicator {
        display: none;
    }
}

/* Reduced motion preferences */
@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;
    }

    .whatsapp-float {
        animation: none;
    }

    .scroll-indicator a {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-text-primary: #000000;
        --color-border: #000000;
    }

    .btn {
        border-width: 3px;
    }

    .service-card,
    .team-member,
    .differential-item {
        border: 2px solid var(--color-border);
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
    /* Example:
    :root {
        --color-bg-white: #1a1a1a;
        --color-text-primary: #ffffff;
    }
    */
}
