/* Responsive Utilities - Shared Mobile & Responsive Patterns */

/* ===== MOBILE CAROUSEL SYSTEM ===== */
/* Shared carousel indicators for mobile components */
@media (max-width: 767px) {
    .mobile-carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .mobile-carousel-dot {
        cursor: pointer;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
    }
    
    .mobile-carousel-dot::before {
        content: '';
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        background-color: var(--color-gray-400);
        transition: background-color 0.3s ease;
    }
    
    .mobile-carousel-dot.active::before {
        background-color: var(--color-primary);
    }
    
    /* Active carousel item pattern */
    .mobile-carousel-item {
        display: none;
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
    }
    
    .mobile-carousel-item.active {
        display: block;
        opacity: 1;
    }
    
    /* Carousel container pattern */
    .mobile-carousel-container {
        position: relative;
        overflow: hidden;
    }
}

/* Desktop: Hide mobile carousel indicators */
@media (min-width: 768px) {
    .mobile-carousel-indicators {
        display: none !important;
    }
    
    /* Desktop: Show all carousel items */
    .mobile-carousel-item {
        display: block !important;
        opacity: 1 !important;
    }
}

/* ===== MOBILE CAROUSEL FOR PRESTATION SECTIONS ===== */
@media (max-width: 767px) {
    /* Mobile carousel containers with proper sizing */
    .intro-grid, .process-steps {
        position: relative;
        overflow: hidden;
        width: 100%;
        padding: 0 0.75rem;
        box-sizing: border-box;
    }
    
    .did-you-know-grid {
        position: relative;
        overflow: hidden;
        width: 100%;
        padding: 0; /* No horizontal padding for did-you-know */
        box-sizing: border-box;
    }
    
    /* Mobile carousel for intro sections */
    .intro-card {
        display: none;
        opacity: 0;
        width: 100%;
        margin: 0 auto;
        padding: 1rem 0.75rem;
        box-sizing: border-box;
        transition: opacity 0.5s ease-in-out;
    }
    
    .intro-card.active {
        display: block;
        opacity: 1;
    }
    
    /* Mobile carousel for process sections */
    .process-step {
        display: none;
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
        width: 100%;
        margin: 0 auto;
        padding: 1.5rem 1rem;
        box-sizing: border-box;
        /* Remove mobile hover effects */
        transform: none !important;
        box-shadow: none !important;
        border-color: var(--color-gray-200) !important;
    }
    
    .process-step.active {
        display: block;
        opacity: 1;
        /* Ensure no shadows on active mobile cards */
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Disable hover effects on process steps in mobile */
    .process-step:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: var(--color-gray-200) !important;
    }
    
    /* Disable hover effects on process step elements in mobile */
    .process-step:hover .process-step-title,
    .process-step:hover .process-step-number,
    .process-step:hover .process-step-icon,
    .process-step:hover .process-step-cta-text {
        transform: none !important;
        color: inherit !important;
        background: inherit !important;
        box-shadow: inherit !important;
    }
    
    /* Disable hover effects on process-card container in mobile */
    .process-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: var(--color-gray-200) !important;
    }
    
    .process-card:hover::before {
        opacity: 0 !important;
    }
    
    .process-card:hover .process-title {
        transform: none !important;
    }
    
    
    /* Mobile carousel for did-you-know sections - Higher specificity */
    /* Only apply carousel behavior to prestation pages (not index page stats) */
    .did-you-know-grid:not(#stats-grid) .fact-card {
        display: none !important; /* Force hide all fact cards by default on mobile */
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        width: 100%;
        margin: 0 auto;
        padding: 1rem 1rem; /* Increased horizontal padding to compensate */
        box-sizing: border-box;
    }
    
    .did-you-know-grid:not(#stats-grid) .fact-card.active {
        display: block !important; /* Force show only active fact card on mobile */
        opacity: 1;
    }
    
    /* Index page stats grid - show all cards on mobile */
    #stats-grid .fact-card {
        display: block !important;
        opacity: 1 !important;
        width: 100%;
        margin: 0 auto;
        padding: 1rem 1rem;
        box-sizing: border-box;
        transition: opacity 0.5s ease-in-out;
    }
    
    /* Touch-friendly carousel indicators */
    .mobile-carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding: 1rem;
        flex-wrap: wrap;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .mobile-carousel-dot {
        width: 44px;  /* Touch-friendly minimum */
        height: 44px; /* Touch-friendly minimum */
        border-radius: 50%;
        cursor: pointer;
        border: none;
        background: transparent;
        position: relative;
        padding: 0;
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-carousel-dot::before {
        content: '';
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: var(--color-gray-400);
        transition: all 0.3s ease;
    }
    
    .mobile-carousel-dot.active::before {
        background-color: var(--color-brand-cyan);
        transform: scale(1.3);
    }
    
    .mobile-carousel-dot:hover::before {
        background-color: var(--color-brand-cyan-light);
        transform: scale(1.2);
    }
}

/* ===== MOBILE HOVER DISABLING ===== */
/* Centralized hover disabling for mobile devices */
@media (max-width: 767px) {
    .mobile-disable-hover:hover,
    .mobile-disable-hover:hover * {
        transform: none !important;
    }
    
    /* Specific hover pattern resets */
    .mobile-hover-reset:hover {
        transform: none !important;
        box-shadow: inherit !important;
        border-color: inherit !important;
    }
    
    /* Title scaling reset for mobile */
    .mobile-title-reset:hover {
        transform: none !important;
    }
}

/* ===== TOUCH FRIENDLY UTILITIES ===== */

/* ===== RESPONSIVE TITLE SCALING ===== */
/* Standardized responsive title patterns */
@media (max-width: 767px) {
    .responsive-title-large {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .responsive-title-medium {
        font-size: 1.75rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }
    
    .responsive-title-small {
        font-size: 1.5rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .responsive-subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
}

/* ===== RESPONSIVE SPACING UTILITIES ===== */
/* Mobile padding adjustments */
@media (max-width: 767px) {
    .mobile-padding-small {
        padding: 1.5rem 1rem;
    }
    
    .mobile-padding-medium {
        padding: 2rem 1.5rem;
    }
    
    .mobile-padding-large {
        padding: 2.5rem 2rem;
    }
    
    /* Card padding adjustments */
    .mobile-card-padding {
        padding: 2rem 1.5rem;
    }
    
    /* Header margin adjustments */
    .mobile-header-margin {
        margin-bottom: 2rem;
    }
}

/* ===== MOBILE GRID UTILITIES ===== */
/* Responsive grid patterns */
@media (max-width: 767px) {
    .mobile-grid-single {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mobile-flex-column {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ===== MOBILE ELEMENT HIDING ===== */
/* Pattern for hiding complex elements on mobile */
}

/* ===== RESPONSIVE ICON SIZING ===== */
/* Standardized icon scaling for mobile */
@media (max-width: 767px) {
    .responsive-icon-large {
        font-size: 2.5rem;
    }
    
    .responsive-icon-medium {
        font-size: 2rem;
    }
    
    .responsive-icon-small {
        font-size: 1.5rem;
    }
}

/* ===== TABLET RESPONSIVE UTILITIES ===== */
/* Tablet-specific responsive patterns */
@media (max-width: 1023px) {
    .tablet-title-scale {
        font-size: 2.5rem;
    }
    
    .tablet-padding-adjust {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .tablet-icon-scale {
        font-size: 2rem;
    }
    
    .tablet-spacing-reduce {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }
    
    .tablet-arrow-adjust {
        height: 2.5rem;
        font-size: 1.25rem;
    }
}