/*
 * Responsive Utilities CSS
 * Miracle Child Website - Mobile-First Responsive Design
 * Date: December 12, 2025
 */

/* ============================================
   ROOT VARIABLES - Responsive Typography & Spacing
   ============================================ */
:root {
    /* Fluid Typography */
    --fs-hero: clamp(2rem, 5vw + 1rem, 5rem);
    --fs-h1: clamp(1.75rem, 4vw + 1rem, 3.5rem);
    --fs-h2: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
    --fs-h3: clamp(1.25rem, 2vw + 0.5rem, 2rem);
    --fs-h4: clamp(1.1rem, 1.5vw + 0.5rem, 1.5rem);
    --fs-body: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    --fs-small: clamp(0.75rem, 0.8vw + 0.4rem, 0.875rem);
    
    /* Responsive Spacing */
    --spacing-xs: clamp(0.5rem, 2vw, 1rem);
    --spacing-sm: clamp(1rem, 3vw, 1.5rem);
    --spacing-md: clamp(1.5rem, 4vw, 2.5rem);
    --spacing-lg: clamp(2rem, 5vw, 4rem);
    --spacing-xl: clamp(3rem, 8vw, 6rem);
    
    /* Container Widths */
    --container-max: 1200px;
    --container-padding: clamp(1rem, 5vw, 3rem);
}

/* ============================================
   FLEXIBLE CONTAINER UTILITIES
   ============================================ */
.flex-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--container-padding);
}

/* Safari iOS fix for 100vh */
@supports (-webkit-touch-callout: none) {
    .flex-container {
        min-height: -webkit-fill-available;
    }
}

.responsive-section {
    padding: var(--spacing-lg) 0;
}

.responsive-padding {
    padding: var(--spacing-md);
}

.responsive-margin {
    margin: var(--spacing-md) 0;
}

/* ============================================
   RESPONSIVE TYPOGRAPHY UTILITIES
   ============================================ */
.hero-text {
    font-size: var(--fs-hero) !important;
    line-height: 1.2;
}

.responsive-h1 {
    font-size: var(--fs-h1) !important;
    line-height: 1.3;
}

.responsive-h2 {
    font-size: var(--fs-h2) !important;
    line-height: 1.3;
}

.responsive-h3 {
    font-size: var(--fs-h3) !important;
    line-height: 1.4;
}

.responsive-h4 {
    font-size: var(--fs-h4) !important;
    line-height: 1.4;
}

.responsive-body {
    font-size: var(--fs-body) !important;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE IMAGE UTILITIES
   ============================================ */
.responsive-img-wrapper {
    width: 100%;
    max-width: 100%;
    height: auto;
    position: relative;
}

.responsive-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.responsive-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fluid-img-card {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
}

/* Aspect Ratio Utilities */
.aspect-3-4 {
    aspect-ratio: 3 / 4;
}

.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-1-1 {
    aspect-ratio: 1 / 1;
}

/* ============================================
   NAVIGATION RESPONSIVE FIXES
   ============================================ */
.logo-img {
    display: flex;
    align-items: center;
    justify-content: center;
}  

.logo-img a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-img img {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-img span {
    font-size: clamp(0.7rem, 0.9vw, 0.95rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    text-align: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    max-width: 180px;
}


@media (max-width: 991px) {
    .slider_area {
        padding-top: 90px !important;
        margin-top: 0 !important;
    }
    
    .logo-img {
        justify-content: flex-start;
        padding: 0 3px !important;
        margin: 0 !important;
        min-height: 46px;
        height: 46px;
    }
    
    .logo-img a {
        flex-direction: row;
        gap: 6px;
        align-items: center;
        padding: 0;
        margin: 0;
    }
    
    .logo-img img {
        margin: 0;
        height: 38px;
    }
    
    .logo-img span {
        font-size: 0.62rem;
        max-width: 130px;
        text-align: left;
        line-height: 1.08;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 576px) {
    .logo-img {
        padding: 0 2px !important;
        min-height: 42px;
        height: 42px;
    }
    
    .logo-img img {
        height: 34px;
    }
    
    .logo-img span {
        font-size: 0.56rem;
        max-width: 115px;
        line-height: 1.05;
    }
}

/* ============================================
   LAYOUT GRID UTILITIES
   ============================================ */
.responsive-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.responsive-flex {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.responsive-flex > * {
    flex: 1 1 280px;
}

/* ============================================
   CARD & CONTENT BOX UTILITIES
   ============================================ */
.responsive-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-md);
    border-radius: 8px;
}

.responsive-content-box {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* ============================================
   MOBILE-SPECIFIC OVERRIDES
   ============================================ */
@media (max-width: 767px) {
    /* Typography Adjustments */
    .hero-text {
        font-size: clamp(1.75rem, 8vw, 3rem) !important;
    }
    
    /* Spacing Reductions */
    .responsive-section {
        padding: var(--spacing-md) 0;
    }
    
    .responsive-padding {
        padding: var(--spacing-sm);
    }
    
    .responsive-card {
        padding: var(--spacing-sm);
    }
    
    .responsive-content-box {
        padding: var(--spacing-sm);
    }
    
    /* Grid Adjustments */
    .responsive-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .responsive-flex {
        gap: var(--spacing-sm);
    }
    
    .responsive-flex > * {
        flex: 1 1 100%;
    }
    
    /* Image Cards */
    .fluid-img-card {
        max-width: 100%;
    }
    
    /* Remove excessive spacing */
    [style*="padding: 40px"],
    [style*="padding: 50px"] {
        padding: 20px !important;
    }
}

/* ============================================
   TABLET ADJUSTMENTS (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .responsive-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .logo-img img {
        margin-left: 40px;
    }
}

/* ============================================
   TOUCH TARGET UTILITIES
   ============================================ */
.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   FLOATING BUTTONS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #floatingActionBtn,
    #contactBtn {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        padding: 12px !important;
    }
    
    #floatingActionBtn {
        bottom: 80px !important;
        right: 20px !important;
    }
    
    #contactBtn {
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* ============================================
   MODAL RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .modal-content {
        width: 95% !important;
        max-width: 100% !important;
        padding: 20px !important;
        margin: 10px auto !important;
    }
    
    .modal-content h2 {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   FOOTER RESPONSIVE - MOBILE
   ============================================ */
/* Base styles for larger screens */
.footer_logo_section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 30px;
}

.footer_logo_section .footer_logo {
    width: 80px;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.footer_logo_section .footer_org_name {
    font-size: clamp(0.875rem, 1.2vw, 1.125rem);
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    text-align: left;
    max-width: 220px;
    display: block;
}

.footer_action_links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.footer_action_links li {
    margin-bottom: 10px;
}

.footer_action_links li:last-child {
    margin-bottom: 0;
}

.footer_action_links a {
    color: #BABABA;
    text-decoration: none;
    font-size: clamp(0.875rem, 1vw, 1rem);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer_action_links a:hover {
    color: #A70000;
    padding-left: 5px;
}

/* Mobile styles - hide logo and center content */
@media (max-width: 767px) {
    /* Hide logo and organization name on mobile */
    .footer .footer_logo_section {
        display: none !important;
    }
    
    /* Center all footer content */
    .footer .footer_widget {
        text-align: center;
    }
    
    .footer .footer_title {
        text-align: center;
    }
    
    .footer .footer_text {
        text-align: center;
    }
    
    .footer .footer_widget ul {
        text-align: center;
        padding: 0;
    }
    
    .footer .footer_widget ul li {
        text-align: center;
    }
    
    .footer .footer_action_links {
        text-align: center;
        list-style: none;
        padding: 0;
    }
    
    .footer .socail_links {
        text-align: center;
    }
    
    .footer .socail_links ul {
        justify-content: center;
    }
    
    .footer .newsletter_form {
        text-align: center;
    }
    
    .footer .newsletter_text {
        text-align: center;
    }
}

/* ============================================
   FORM RESPONSIVE
   ============================================ */
.responsive-form input,
.responsive-form textarea,
.responsive-form select {
    width: 100%;
    padding: 12px 15px;
    font-size: var(--fs-body);
    border-radius: 4px;
    border: 1px solid #ddd;
}

@media (max-width: 576px) {
    .responsive-form input,
    .responsive-form textarea,
    .responsive-form select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-responsive {
    font-size: var(--fs-body);
}

.no-overflow-mobile {
    overflow-x: hidden;
}

@media (max-width: 767px) {
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-hide {
        display: none !important;
    }
}

/* ============================================
   MOBILE MENU RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    /* Ensure mobile menu is visible and properly positioned */
    .mobile_menu {
        display: block;
        width: 100%;
    }
    
    .slicknav_menu {
        background: #450000;
        margin: 0;
        padding: 0;
    }
    
    .slicknav_nav {
        background: #450000;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .slicknav_nav li {
        width: 100%;
    }
    
    .slicknav_nav a {
        display: block;
        width: 100%;
        padding: 14px 20px;
        transition: all 0.3s ease;
    }
}

@media (max-width: 575px) {
    .mobile-menu-toggle-btn {
        right: 10px !important;
    }
    
    .slicknav_nav a {
        padding: 16px 15px;
        font-size: 15px;
    }
    
    .header-area .logo-img img {
        max-width: 50px;
    }
    
    .header-area .logo-img span {
        font-size: 11px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .slicknav_nav a {
        padding: 15px 18px;
        font-size: 15.5px;
    }
}

/* ============================================
   REACH OUT TO US SECTION RESPONSIVE
   ============================================ */
/* Extra margin-top for mobile screens */
@media (max-width: 575px) {
    .help_area {
        margin-top: 60px !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .help_area {
        margin-top: 50px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .help_area {
        margin-top: 40px !important;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.will-animate {
    will-change: transform;
}

@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 {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
}
