﻿/* ===================================
   HAMBURGER MENU - Mobile Navigation (BULLETPROOF)
   =================================== */

/* Desktop: Force Hide */
.hamburger {
    display: none !important;
}

/* Mobile: Force Show */
@media (max-width: 991px) {
    .hamburger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 32px !important;
        height: 24px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        position: relative !important;
    }

    /* Ensure lines are visible */
    .hamburger-line {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background-color: #000000 !important;
        /* Force Black */
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    /* Pushes hamburger to the right if in flex container */
    .navbar .container {
        justify-content: space-between !important;
    }

    /* Hide desktop nav menu but KEEP button visible */
    .nav-menu {
        display: none;
        /* Changed via JS to flex/block */
    }

    /* Hide CTA in header on mobile to prevent crowding */
    /* Hide CTA in header on mobile to prevent crowding */
    /* Hide CTA in header on mobile to prevent crowding */
    html body .navbar .cta-btn {
        display: none !important;
    }
}

/* RESTORE DESKTOP MENU (Safety Net) */
@media (min-width: 992px) {
    .nav-menu {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        transform: none !important;
    }

    .mobile-overlay {
        display: none !important;
    }
}

/* Active state - X animation */
.hamburger.active .hamburger-line {
    background-color: #000000 !important;
    /* Force Black Lines */
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Fix hamburger positioning when menu is open */
.hamburger.active {
    display: flex !important;
    position: fixed !important;
    top: 25px !important;
    /* Adjust based on your header height */
    right: 25px !important;
    z-index: 10001 !important;
    /* Higher than menu (9998) and overlay */
    background: transparent !important;
}

/* Remove legacy hover crap that might interfere */

/* Color variants */
.hamburger.light .hamburger-line {
    background: #FFFFFF;
}

.hamburger.dark .hamburger-line {
    background: var(--color-dark);
}

/* ===================================
   RESPONSIVE.CSS - OutMídia Outdoor
   Mobile-First Responsive Design
   =================================== */

/* ===================================
   BASE - MOBILE FIRST (320px+)
   =================================== */

/* Ensure proper viewport behavior */
body {
    overflow-x: hidden;
    min-width: 320px;
}

/* Fluid containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===================================
   NAVIGATION - MOBILE
   =================================== */

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

@media (max-width: 991px) {

    /* 1. Reset Desktop Menu Styles */
    .nav-menu {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        padding: 5rem 2rem 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        z-index: 9998;
        transform: translateX(100%);
        /* Start off-screen */
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        visibility: hidden;
    }

    /* 2. Hamburger Button */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 9999;
        /* Position relative usually, but fixed when open to follow scroll */
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #000;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    /* 3. Open State (Triggered by JS adding .nav-open to BODY) */

    /* Reveal Menu when Body has .nav-open */
    body.nav-open .nav-menu {
        display: flex !important;
        transform: translateX(0) !important;
        /* Slide in */
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        /* Re-affirm fixed */
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 20000 !important;
    }

    /* Fixed Hamburger Animation when Open */
    body.nav-open .hamburger {
        position: fixed !important;
        /* Fixed relative to viewport is safer to avoid scrolling away */
        top: 25px !important;
        right: 25px !important;
        z-index: 2147483647 !important;
        /* Max integer value to be absolutely sure */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateZ(0);
        /* Force GPU layer */
    }

    body.nav-open .hamburger-line {
        background-color: #000000 !important;
    }

    body.nav-open .hamburger-line:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

    body.nav-open .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .hamburger-line:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }

    /* Overlay */
    /* Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10000;
        /* Below menu */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(4px);
    }

    body.nav-open .mobile-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Utilities */
    .mobile-menu-toggle {
        display: none !important;
    }

    .navbar .cta-btn {
        display: none !important;
    }

    /* CRITICAL FIX: Prevent Navbar Transform from trapping fixed elements */
    body.nav-open .navbar {
        transform: none !important;
        /* Ensure navbar doesn't move when menu is open */
        z-index: 20001 !important;
        /* Ensure it stays on top if needed, but menu overrides */
    }
}

.nav-link {
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.125rem;
}

.navbar .cta-btn {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

/* Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}
}

/* ===================================
   HERO SECTION
   =================================== */

@media (max-width: 767px) {
    .hero {
        padding: 6rem 0 3rem !important;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem;
    }

    .hero-label,
    .badge-premium {
        font-size: 0.75rem !important;
        padding: 0.5rem 1rem !important;
    }

    .hero-actions {
        flex-direction: column !important;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   GRIDS - RESPONSIVE
   =================================== */

/* Work/Portfolio Grid */
@media (max-width: 767px) {

    .work-grid,
    .portfolio-grid,
    .portfolio-grid-full,
    .service-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* HIGH SPECIFICITY OVERRIDE for Locations */
    html body .locations-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    html body .locations-grid>* {
        min-width: 0;
        /* Prevent flex/grid blowout */
        width: 100% !important;
        /* Force full width in column */
    }
}

@media (min-width: 768px) and (max-width: 1200px) {

    .work-grid,
    .portfolio-grid,
    .service-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* HIGH SPECIFICITY OVERRIDE for Locations */
    html body .locations-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Analytics Dashboard */
@media (max-width: 767px) {

    .analytics-grid,
    .metrics-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===================================
   CARDS
   =================================== */

@media (max-width: 767px) {

    .metric-card,
    .service-card,
    .portfolio-item,
    .work-item,
    .location-card {
        margin-bottom: 1.5rem;
        /* Ensure z-index is handled */
        position: relative;
        z-index: 1;
    }

    /* Ensure no clipping on mobile */
    .service-grid,
    .portfolio-grid,
    .work-grid {
        padding: 1rem 0.5rem !important;
        overflow: visible !important;
    }

    /* Portfolio full items - stack image and content */
    .portfolio-item-full {
        flex-direction: column !important;
    }

    .portfolio-image,
    .portfolio-info {
        width: 100% !important;
    }
}

/* ===================================
   CTA SECTIONS
   =================================== */

@media (max-width: 767px) {
    .cta-box {
        flex-direction: column !important;
        text-align: center;
        padding: 2rem 1.5rem !important;
        gap: 1.5rem !important;
    }

    .cta-icon {
        margin: 0 auto 1rem !important;
    }

    .cta-content h2 {
        font-size: 1.75rem !important;
    }

    .cta-content p {
        font-size: 1rem !important;
    }

    .cta-actions {
        width: 100%;
        flex-direction: column !important;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

/* ===================================
   FORMS - CONTACT
   =================================== */

@media (max-width: 767px) {

    .contact-grid,
    .contact-wrapper {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }
}

/* ===================================
   TABLES - BI-SEMANAS
   =================================== */

@media (max-width: 767px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    table {
        min-width: 600px;
        font-size: 0.875rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem !important;
        white-space: nowrap;
    }

    /* Period card premium - mobile adjustments */
    .period-card-premium {
        padding: 2rem 1.5rem !important;
    }

    .period-dates {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .date-separator {
        transform: rotate(90deg);
    }
}

/* ===================================
   FOOTER
   =================================== */

@media (max-width: 767px) {
    .footer-content {
        flex-direction: column !important;
        gap: 2.5rem;
    }

    .footer-brand,
    .footer-links {
        width: 100% !important;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem;
    }

    .footer-legal {
        justify-content: center !important;
    }
}

/* ===================================
   SECTIONS - SPACING
   =================================== */

@media (max-width: 767px) {
    section {
        padding: 3rem 0 !important;
    }

    .section-header,
    .section-intro {
        margin-bottom: 2rem !important;
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
    }

    .section-subtitle {
        font-size: 1rem !important;
    }
}

/* ===================================
   TABLET (768px - 1023px)
   =================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 2rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
    }

    /* 2-column layouts */
    .about-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===================================
   DESKTOP SMALL (1024px - 1279px)
   =================================== */

@media (min-width: 1024px) and (max-width: 1279px) {
    .container {
        padding: 0 3rem;
    }
}

/* ===================================
   DESKTOP LARGE (1280px+)
   =================================== */

@media (min-width: 1280px) {
    .container {
        padding: 0 4rem;
    }
}

/* ===================================
   UTILITY CLASSES - RESPONSIVE
   =================================== */

/* Hide/Show by breakpoint */
.mobile-only {
    display: block;
}

.tablet-up {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }

    .tablet-up {
        display: block;
    }
}

/* Fluid spacing */
.section-spacing {
    padding: clamp(3rem, 6vw, 6rem) 0;
}

.container-spacing {
    padding-left: clamp(1rem, 4vw, 4rem);
    padding-right: clamp(1rem, 4vw, 4rem);
}

/* Touch targets */
@media (max-width: 767px) {

    button,
    .btn,
    a.btn,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===================================
   TEXT OVERFLOW & ELLIPSIS
   =================================== */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {

    h1,
    h2,
    h3 {
        word-break: break-word;
        /* hyphens removed */
    }
}

/* ===================================
   RESET & GLOBAL STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* GLOBAL FIX: Prevent weird word breaks/hyphens */
    hyphens: manual !important;
    -webkit-hyphens: manual !important;
    -ms-hyphens: manual !important;
    overflow-wrap: break-word !important;
    /* Ensure long words break if needed */
}

/* ===================================
   IMAGES - RESPONSIVE
   =================================== */

img {
    max-width: 100%;
    height: 100%;
}

.img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   CONTACT PAGE PREMIUM
   =================================== */

@media (max-width: 767px) {
    .contact-container {
        grid-template-columns: 1fr !important;
    }

    .contact-info,
    .contact-form-container {
        max-width: 100% !important;
    }

    .contact-card {
        padding: 1.5rem !important;
    }
}

/* ===================================
   BI-SEMANAS PREMIUM
   =================================== */

@media (max-width: 767px) {
    .period-header {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem !important;
    }

    .period-number {
        font-size: 2.25rem !important;
    }

    .period-actions {
        text-align: center;
    }

    .btn-outline-gold {
        width: 100%;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {

    .navbar,
    .footer,
    .cta-section,
    .mobile-menu-toggle,
    .mobile-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
        color: #000 !important;
    }
}

/* ===================================
   CONTACT PAGE - RESPONSIVE ENHANCEMENTS
   =================================== */

/* Prevent horizontal scroll on mobile */
html {
    overflow-x: hidden !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

.container {
    max-width: 100%;
    /* overflow-x: hidden; REMOVED to fix shadows/blobs clipping */
    overflow: visible !important;
}

/* Fix for elements that might overflow */
.contact,
.contact-grid,
.contact-form,
.contact-info {
    max-width: 100%;
    /* overflow-x: hidden; REMOVED to fix shadows/blobs clipping */
    overflow: visible !important;
}

/* Tablet - 768px and below */
@media (max-width: 768px) {
    .hero-internal {
        padding-top: 180px !important;
        padding-bottom: 3rem !important;
    }

    .hero-internal .page-title {
        font-size: 2.5rem !important;
    }

    .hero-internal .page-subtitle {
        font-size: 1.125rem !important;
    }

    .contact {
        padding: 2.5rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .contact-card {
        flex-direction: row;
        gap: 1.25rem;
    }

    .contact-icon {
        width: 55px;
        height: 55px;
    }

    .contact-icon i {
        font-size: 1.5rem;
    }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {

    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }

    .hero-internal {
        padding-top: 160px !important;
        padding-bottom: 2.5rem !important;
    }

    .hero-internal .page-title {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-internal .page-subtitle {
        font-size: 1rem !important;
        padding: 0 1rem;
    }

    .contact {
        padding: 2rem 0;
    }

    .contact-grid {
        gap: 2rem;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.5rem;
    }

    .contact-intro {
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .contact-card {
        padding: 1.125rem;
        gap: 1rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-icon i {
        font-size: 1.4rem;
    }

    .contact-card h4 {
        font-size: 1rem;
    }

    .contact-card p {
        font-size: 0.875rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem 1rem;
        font-size: 16px;
        /* Prevents iOS zoom */
        border-radius: 10px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .btn-full {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .map-container {
        border-radius: 16px;
    }

    .map-container iframe {
        height: 300px;
        border-radius: 16px;
    }

    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Extra small mobile - 360px and below */
@media (max-width: 360px) {
    .hero-internal .page-title {
        font-size: 1.6rem !important;
        hyphens: none;
    }

    .hero-internal .page-title span {
        white-space: nowrap;
        display: inline-block;
    }

    .contact-info h2,
    .contact-form h2 {
        font-size: 1.35rem;
    }

    .contact-card {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.25rem 0.875rem;
    }

    .btn-full {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}

/* ===================================
   BI-SEMANAS RESPONSIVE FIX
   =================================== */
@media (max-width: 900px) {
    .bisemana-grid-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .period-card-premium {
        margin-top: 2rem !important;
        padding: 1.5rem !important;
    }

    .bisemana-info-col {
        order: 2;
        /* Info below card on mobile if desired, or keep as is. Default is fine. */
    }
}
}

/* ===================================
   CRITICAL FIXES - FORCE EQUAL HEIGHTS
   =================================== */
html body .contact-premium .contact-grid,
html body .contact-grid {
    align-items: stretch !important;
    display: grid !important;
    grid-auto-rows: 1fr !important;
}

html body .contact-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 100% !important;
}

html body .contact-card-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* FORCE 3 EQUAL COLUMNS ON DESKTOP */
@media (min-width: 992px) {
    html body .contact-premium .contact-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        width: 100% !important;
    }

    html body .contact-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ===================================
   HOMEPAGE SPECIFIC GRID FIX (RESPONSIVE)
   =================================== */

/* BASE (Mobile/Tablet/Desktop): Standardized Row Layout */
html body .contact-grid.contact-grid-home {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
}

/* Apply Card Styling to BOTH Home and Contact Page Cards */
/* Apply Card Styling to BOTH Home and Contact Page Cards */
html body .contact-grid .contact-card,
html body .contact-grid.contact-grid-home .contact-card {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    /* Always Row */
    align-items: center !important;
    /* Vertically Center Icon */
    gap: 1rem !important;
    /* REDUCED GAP from 1.5rem to 1rem for tighter feel */
    padding: 1.5rem !important;
    text-align: left !important;
    overflow: hidden !important;
    /* Prevent Card Overflow */
}

/* Reorder Contact Page on Mobile: Form First */
@media (max-width: 991px) {
    html body .contact-form {
        order: -1 !important;
        margin-bottom: 2rem !important;
    }
}

/* Ensure content wrapper handles overflow */
html body .contact-grid .contact-card-content,
html body .contact-grid.contact-grid-home .contact-card-content {
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    /* Critical for text-overflow to work in flex child */
    flex: 1 !important;
}

html body .contact-card .card-title {
    margin-bottom: 0.2rem !important;
    /* Reduced spacing */
}

/* Fix for long emails/addresses */
html body .contact-card .card-info,
html body .contact-card .card-info a {
    word-break: break-word !important;
    /* Wrap long words like emails */
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    line-height: 1.4 !important;
    /* Enhance readability on wrap */
    display: block !important;
}

/* DESKTOP (992px+): 3 Columns Grid for HOME ONLY */
@media (min-width: 992px) {

    html body .contact-grid.contact-grid-home {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }

    /* Ensure Row Layout persists on Desktop */
    html body .contact-grid .contact-card,
    html body .contact-grid.contact-grid-home .contact-card {
        flex-direction: row !important;
        text-align: left !important;
        align-items: center !important;
    }

    html body .contact-grid .contact-card-content,
    html body .contact-grid.contact-grid-home .contact-card-content {
        text-align: left !important;
        align-items: flex-start !important;
    }
}

/* ===================================
   MOBILE STATS FIX: Horizontal Layout 
   =================================== */
/* Fix class mismatch and enforce grid on all screens (including mobile) */
html body .hero-metrics {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    margin-top: 2rem !important;
    width: 100% !important;
}

/* Adjust card padding for tight mobile fit */
html body .hero-metrics .metric {
    padding: 0.75rem 0.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: auto !important;
}

/* Adjust text sizes for mobile */
html body .hero-metrics .metric-value {
    font-size: 1.75rem !important;
    /* Compact but visible */
    line-height: 1 !important;
    margin-bottom: 0.25rem !important;
}

html body .hero-metrics .metric-label {
    font-size: 0.6rem !important;
    /* Small enough to prevent wrap issues */
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    opacity: 0.9 !important;
}

/* Desktop Overrides for Stats */
@media (min-width: 992px) {
    html body .hero-metrics {
        gap: 2rem !important;
    }

    html body .hero-metrics .metric {
        padding: 2rem !important;
    }

    html body .hero-metrics .metric-value {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    html body .hero-metrics .metric-label {
        font-size: 0.875rem !important;
        letter-spacing: 1px !important;
    }
}