/* Oakhill Day School - Main CSS File */

/* RemixIcon Fix */
:where([class^="ri-"])::before { 
    content: "\f3c2"; 
}

/* Base Styles */
body {
    font-family: 'Quicksand', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Varela Round', sans-serif;
}

/* Hero Section Styles - FIXED LAYERING */
.hero-section {
    background-position: center;
    background-size: cover;
    position: relative;
    z-index: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Ensure ALL hero text and buttons appear above overlay */
.hero-content h1, 
.hero-content h2, 
.hero-content p, 
.hero-content a,
.hero-content .btn,
.hero-content button,
.hero-content * {
    position: relative;
    z-index: 15 !important;
    color: inherit;
}

/* Program Cards */
.program-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Team Cards */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Touch-friendly enhancements for mobile */
.touch-manipulation {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(27, 54, 93, 0.1);
    touch-action: manipulation;
}

.touch-manipulation:active {
    transform: scale(0.98);
    background-color: rgba(27, 54, 93, 0.05);
}

@media (max-width: 768px) {
    .touch-manipulation .opacity-0 {
        opacity: 1 !important;
    }

    .touch-manipulation:hover {
        transform: none;
    }

    .touch-manipulation:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Event Cards */
.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Program Tabs */
.program-tab {
    position: relative;
    transition: all 0.3s ease;
}

.program-tab.active {
    color: #1B365D;
    font-weight: 600;
}

.program-tab.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1B365D;
}

.program-content {
    display: none;
}

.program-content.active {
    display: block;
}

/* Vanilla Testimonial Carousel Styles */
.testimonial-carousel-container {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.testimonial-slide {
    min-width: 100%;
    flex: 0 0 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.testimonial-card {
    min-height: 350px;
    height: auto;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.testimonial-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Testimonial Carousel Navigation Buttons - Force Override */
.testimonial-carousel-container .testimonial-prev,
.testimonial-carousel-container .testimonial-next,
.testimonial-prev,
.testimonial-next,
#testimonial-prev,
#testimonial-next,
button#testimonial-prev,
button#testimonial-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #374151 !important;
    transition: all 0.3s ease !important;
    z-index: 15 !important;
    cursor: pointer !important;
    border: none !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 1.5rem !important;
    max-width: 1.5rem !important;
    min-height: 1.5rem !important;
    max-height: 1.5rem !important;
}

.testimonial-carousel-container .testimonial-prev:hover,
.testimonial-carousel-container .testimonial-next:hover,
.testimonial-prev:hover,
.testimonial-next:hover,
#testimonial-prev:hover,
#testimonial-next:hover,
button#testimonial-prev:hover,
button#testimonial-next:hover {
    color: #1B365D !important;
    background: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.testimonial-carousel-container .testimonial-prev,
.testimonial-prev,
#testimonial-prev,
button#testimonial-prev {
    left: 0.25rem !important;
}

.testimonial-carousel-container .testimonial-next,
.testimonial-next,
#testimonial-next,
button#testimonial-next {
    right: 0.25rem !important;
}

@media (min-width: 768px) {
    .testimonial-carousel-container .testimonial-prev,
    .testimonial-carousel-container .testimonial-next,
    .testimonial-prev,
    .testimonial-next,
    #testimonial-prev,
    #testimonial-next,
    button#testimonial-prev,
    button#testimonial-next {
        width: 1.75rem !important;
        height: 1.75rem !important;
        font-size: 0.875rem !important;
        min-width: 1.75rem !important;
        max-width: 1.75rem !important;
        min-height: 1.75rem !important;
        max-height: 1.75rem !important;
    }
    
    .testimonial-carousel-container .testimonial-prev,
    .testimonial-prev,
    #testimonial-prev,
    button#testimonial-prev {
        left: 0.5rem !important;
    }

    .testimonial-carousel-container .testimonial-next,
    .testimonial-next,
    #testimonial-next,
    button#testimonial-next {
        right: 0.5rem !important;
    }
}

/* Additional mobile-specific overrides */
@media (max-width: 767px) {
    .testimonial-carousel-container .testimonial-prev,
    .testimonial-carousel-container .testimonial-next,
    .testimonial-prev,
    .testimonial-next,
    #testimonial-prev,
    #testimonial-next,
    button#testimonial-prev,
    button#testimonial-next {
        width: 1.25rem !important;
        height: 1.25rem !important;
        font-size: 0.625rem !important;
        min-width: 1.25rem !important;
        max-width: 1.25rem !important;
        min-height: 1.25rem !important;
        max-height: 1.25rem !important;
    }
    
    .testimonial-carousel-container .testimonial-prev,
    .testimonial-prev,
    #testimonial-prev,
    button#testimonial-prev {
        left: 0.125rem !important;
    }

    .testimonial-carousel-container .testimonial-next,
    .testimonial-next,
    #testimonial-next,
    button#testimonial-next {
        right: 0.125rem !important;
    }
}

.testimonial-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.testimonial-pagination button {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 0.5rem;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Filter Buttons */
.filter-button {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-button.active {
    background-color: #1B365D;
    color: white;
}

/* Calendar Styles */
.view-toggle-btn {
    border: 1px solid #e2e8f0;
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    border-color: #1B365D;
    color: #1B365D;
}

.view-toggle-btn:hover {
    background-color: #f9fafb;
}

.calendar-container {
    height: 600px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .calendar-container {
        height: 400px;
    }
}

.add-to-calendar {
    display: inline-flex;
    align-items: center;
    color: #4b5563;
    transition: color 0.2s;
}

.add-to-calendar:hover {
    color: #1B365D;
}

/* Form Styles */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Fix CSS conflicts between hidden and flex classes */
/* Override Tailwind's conflicting display properties */
.hidden.flex {
    display: none !important;
}

.hidden.md\:flex {
    display: none !important;
}

@media (min-width: 768px) {
    .hidden.md\:flex {
        display: flex !important;
    }
}

/* Fix modal conflicts */
.fixed.hidden.flex {
    display: none !important;
}

.fixed.hidden.flex.items-center {
    display: none !important;
}

/* Mobile Navigation Fixes */
/* Ensure mobile menu button is visible on mobile */
@media (max-width: 767px) {
    .md\:hidden {
        display: flex !important;
    }

    /* Hide desktop navigation on mobile */
    nav.hidden.md\:flex {
        display: none !important;
    }

    /* Show mobile menu button */
    button.md\:hidden {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
    .md\:flex {
        display: flex !important;
    }
    .hidden.md\:flex {
        display: flex !important;
    }

    /* Hide mobile menu button on desktop */
    button.md\:hidden {
        display: none !important;
    }
}

/* Mobile menu overlay */
#mobileNavMenu {
    z-index: 60;
}

#mobileNavMenu.hidden {
    display: none !important;
}

#mobileNavMenu:not(.hidden) {
    display: flex !important;
    flex-direction: column;
}

/* Additional specificity for complex class combinations */
.md\:hidden.w-10.h-10.flex {
    display: flex !important;
}

@media (min-width: 768px) {
    .md\:hidden.w-10.h-10.flex {
        display: none !important;
    }
}

/* Accordion Styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

/* Button Color Fix */
.bg-secondary {
    background-color: #D35400 !important;
}

.bg-secondary:hover {
    background-color: rgba(211, 84, 0, 0.9) !important;
}

.text-secondary {
    color: #D35400 !important;
}

.border-secondary {
    border-color: #D35400 !important;
}

/* Procare Logo Fix */
.procare-logo {
    max-width: 60px !important;
    height: 16px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Enhanced Mobile Navigation Fixes */
/* Header should always stay visible and on top */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    background-color: #1f2937 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Full-width header container for laptop screens */
.header-full-width {
    width: 100% !important;
    max-width: none !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    margin: 0 !important;
    position: relative;
    z-index: 101;
}

/* Responsive padding for different screen sizes */
@media (min-width: 640px) {
    .header-full-width {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

@media (min-width: 1024px) {
    .header-full-width {
        padding-left: 4rem !important;
        padding-right: 4rem !important;
    }
}

@media (min-width: 1280px) {
    .header-full-width {
        padding-left: 5rem !important;
        padding-right: 5rem !important;
    }
}

@media (min-width: 1536px) {
    .header-full-width {
        padding-left: 6rem !important;
        padding-right: 6rem !important;
    }
}

/* Ensure header content is properly positioned */
header .container {
    position: relative;
    z-index: 101;
}

/* Override container max-width when using full-width header */
header .header-full-width {
    max-width: 100% !important;
}

/* Mobile menu button base styles */
button[aria-label="Toggle mobile menu"] {
    position: relative !important;
    z-index: 102 !important;
    width: 2.5rem;
    height: 2.5rem;
    color: white !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    transition: opacity 0.2s ease !important;
}

/* Mobile menu button responsive visibility */
@media (max-width: 1023px) {
    button[aria-label="Toggle mobile menu"] {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    button[aria-label="Toggle mobile menu"],
    #mobile-menu-button,
    .lg\:hidden[aria-label="Toggle mobile menu"] {
        display: none !important;
    }
}

button[aria-label="Toggle mobile menu"]:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

button[aria-label="Toggle mobile menu"]:active {
    opacity: 0.7 !important;
}

/* Responsive visibility for mobile menu button */
@media (max-width: 1023px) {
    /* Show mobile menu button on tablets and phones */
    .lg\:hidden {
        display: flex !important;
    }

    /* Hide desktop navigation on tablets and phones */
    nav.hidden.lg\:flex {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    /* Show desktop navigation on large screens */
    .lg\:hidden {
        display: none !important;
    }
    .lg\:flex {
        display: flex !important;
    }
    .hidden.lg\:flex {
        display: flex !important;
    }

    /* Hide mobile menu button on desktop screens */
    button[aria-label="Toggle mobile menu"],
    #mobile-menu-button,
    button.lg\:hidden {
        display: none !important;
    }
}

/* Mobile menu overlay - positioned below header */
#mobileNavMenu {
    position: fixed !important;
    top: 4rem !important; /* Start below the header */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 4rem) !important;
    background-color: rgba(31, 41, 55, 0.98) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 90 !important; /* Below header but above content */
    padding: 2rem 1rem 1.5rem 1rem !important;
    overflow-y: auto !important;
}

#mobileNavMenu.hidden {
    display: none !important;
}

#mobileNavMenu:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
}

/* Mobile menu links styling */
#mobileNavMenu nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

#mobileNavMenu a {
    display: block !important;
    padding: 1rem 0 !important;
    border-bottom: 1px solid rgba(107, 114, 128, 0.3) !important;
    color: #d1d5db !important;
    text-decoration: none !important;
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
    width: 100% !important;
}

#mobileNavMenu a:hover,
#mobileNavMenu a:focus {
    color: white !important;
}

#mobileNavMenu a.text-white {
    color: white !important;
    font-weight: 600 !important;
}

/* Mobile programs dropdown */
#mobile-programs-dropdown {
    padding-left: 1rem !important;
    margin-top: 0.5rem !important;
}

#mobile-programs-dropdown a {
    padding: 0.75rem 0 !important;
    font-size: 1rem !important;
    color: #9ca3af !important;
    border-bottom: none !important;
    font-weight: 400 !important;
}

#mobile-programs-dropdown a:hover {
    color: white !important;
}

/* Mobile menu buttons - consistent styling */
#mobileNavMenu .bg-white,
#mobileNavMenu a[href*="myprocare"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background-color: white !important;
    color: #374151 !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 500 !important;
    margin-top: 1.5rem !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s ease !important;
}

#mobileNavMenu .bg-white:hover,
#mobileNavMenu a[href*="myprocare"]:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}

#mobileNavMenu .bg-secondary,
#mobileNavMenu a[href*="schedule-tour"],
#mobileNavMenu a[href*="Book Your Tour"],
#mobileNavMenu a[href*="Schedule a Tour"] {
    display: block !important;
    background-color: #D35400 !important;
    color: white !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 500 !important;
    margin-top: 1rem !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s ease !important;
}

#mobileNavMenu .bg-secondary:hover,
#mobileNavMenu a[href*="schedule-tour"]:hover,
#mobileNavMenu a[href*="Book Your Tour"]:hover,
#mobileNavMenu a[href*="Schedule a Tour"]:hover {
    background-color: rgba(211, 84, 0, 0.9) !important;
    color: white !important;
}

/* Logo fixes - prevent stretching */
header img,
footer img,
.logo img,
img[alt*="logo"],
img[alt*="Logo"] {
    height: auto !important;
    max-height: 3rem !important;
    width: auto !important;
    object-fit: contain !important;
    aspect-ratio: auto !important;
}

/* Specific logo fixes */
header a img {
    height: 3rem !important;
    width: auto !important;
    max-width: none !important;
}

footer .flex img {
    height: 3rem !important;
    width: auto !important;
}

/* Procare logo specific fix */
.procare-logo,
img[alt*="Procare"],
img[alt*="procare"],
img[src*="procare"] {
    max-width: 60px !important;
    height: 20px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Button consistency fixes */
a[href*="myprocare"],
.bg-white.text-gray-800,
button.bg-white {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background-color: white !important;
    color: #374151 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    min-width: 140px !important;
    justify-content: center !important;
}

a[href*="myprocare"]:hover,
.bg-white.text-gray-800:hover,
button.bg-white:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}

.bg-secondary,
a[href*="schedule-tour"],
a[href*="Book Your Tour"],
button.bg-secondary {
    background-color: #D35400 !important;
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 140px !important;
}

.bg-secondary:hover,
a[href*="schedule-tour"]:hover,
a[href*="Book Your Tour"]:hover,
button.bg-secondary:hover {
    background-color: rgba(211, 84, 0, 0.9) !important;
    color: white !important;
}

/* Header navigation button alignment */
header nav .space-x-6 {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-wrap: nowrap !important;
}

/* Ensure header buttons stay on one line */
header nav a[href*="schedule-tour"],
header nav a[href*="myprocare"] {
    flex-shrink: 0 !important;
    min-width: 140px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    font-weight: 700 !important;
}

/* ProCare logo sizing in header */
header nav a[href*="myprocare"] img {
    height: 16px !important;
    width: auto !important;
    max-width: 50px !important;
    object-fit: contain !important;
    margin-right: 0.25rem !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1280px) {
    header nav a[href*="schedule-tour"],
    header nav a[href*="myprocare"] {
        min-width: 120px !important;
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    header nav a[href*="myprocare"] img {
        max-width: 45px !important;
    }
}

@media (max-width: 1200px) {
    header nav a[href*="schedule-tour"],
    header nav a[href*="myprocare"] {
        min-width: 110px !important;
        font-size: 0.75rem !important;
        padding: 0.5rem 0.625rem !important;
    }
    
    header nav a[href*="myprocare"] img {
        max-width: 40px !important;
        height: 14px !important;
    }
}


/* Enhanced Mobile Testimonial Carousel Fixes */
@media (max-width: 768px) {
    .testimonial-carousel-container {
        padding: 0 2rem;
        min-height: 400px;
        touch-action: pan-y pinch-zoom;
    }

    .testimonial-card {
        min-height: 350px;
        padding: 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .testimonial-carousel-container {
        padding: 0 1.5rem;
        min-height: 450px;
    }

    .testimonial-card {
        min-height: 400px;
        padding: 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .testimonial-carousel-container {
        padding: 0 1.25rem;
    }

    .testimonial-card {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile Navigation Improvements */
@media (max-width: 1023px) {
    #mobileNavMenu {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    #mobileNavMenu nav a {
        font-size: 1.125rem;
        padding: 1rem 0;
        transition: all 0.2s ease;
    }

    #mobileNavMenu nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 1rem;
    }

    /* Ensure mobile menu button is always visible */
    .lg\:hidden {
        display: flex !important;
    }

    /* Hide desktop navigation on mobile */
    .lg\:flex {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex !important;
    }

    .lg\:hidden {
        display: none !important;
    }
}


/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .hover\:bg-gray-50:hover {
        background-color: #f9fafb;
    }

    .hover\:text-white:hover {
        color: #fff;
    }

    .hover\:text-primary:hover {
        color: #1B365D;
    }
}


/* Touch improvements for mobile */
@media (max-width: 768px) {
    .testimonial-carousel-container {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .testimonial-track {
        touch-action: pan-y;
    }

    .testimonial-slide {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
}

/* Modal display fixes - ensure proper hiding/showing */
.modal-hidden {
    display: none !important;
}

.modal-show {
    display: flex !important;
}
