/* ===============================================
   Custom Responsive Enhancements
   =============================================== */

/* Ensure base responsive behavior */
* {
    max-width: 100%;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Desktop - Large screens (1200px and above) */
@media (min-width: 1200px) {
    .container, [class*="container"] {
        max-width: 1200px;
    }
}

/* Tablet - Medium screens (768px to 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    /* Adjust container padding */
    [data-testid="mesh-container-content"],
    .container {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }

    /* Adjust font sizes */
    h1, [class*="font_0"] {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    /* Team grid adjustments */
    [class*="team-grid"],
    [class*="repeater"] {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 2rem !important;
    }
}

/* Mobile - Small screens (up to 767px) */
@media (max-width: 767px) {
    /* Hide or adjust desktop-only elements */
    [data-testid="mesh-container-content"],
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Navigation adjustments */
    nav, [class*="navbar"] {
        padding: 1rem !important;
    }

    /* Hero section */
    [class*="hero"] h1,
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    /* Team section - stack cards vertically */
    [class*="team-grid"],
    [class*="repeater"],
    [role="list"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    [class*="team-card"],
    [class*="repeater__item"] {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* Images in cards */
    [class*="team-image"],
    [class*="wixui-image"] {
        width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
    }

    /* Text content */
    p, [class*="rich-text"] {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Buttons */
    button, [class*="button"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Forms */
    input, textarea, select {
        width: 100% !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* Section padding */
    section, [class*="section"] {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Column strips - stack columns */
    [class*="column-strip"] [data-testid="columns"],
    [class*="column-strip__column"] {
        flex-direction: column !important;
        width: 100% !important;
    }
}

/* Extra small mobile (up to 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    [data-testid="mesh-container-content"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    [class*="hero"] {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Print styles */
@media print {
    nav, [class*="navbar"],
    footer {
        display: none !important;
    }
}

/* Ensure touch-friendly tap targets on mobile */
@media (max-width: 767px) {
    a, button, [role="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
