/* ═══════════════════════════════════════════════════════════════════════════
   OFM Hospital UK Landing Page - Mobile-First Responsive Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   BASE STYLES
   ───────────────────────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TOUCH TARGETS (Apple HIG: 44px minimum)
   ───────────────────────────────────────────────────────────────────────────── */
.tap-target {
    min-height: 44px;
    min-width: 44px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SAFE AREA SUPPORT (iPhone X+)
   ───────────────────────────────────────────────────────────────────────────── */
.safe-area-top {
    padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BACKGROUND & VISUAL EFFECTS
   ───────────────────────────────────────────────────────────────────────────── */
.bg-gradient-mesh {
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(31, 78, 121, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(8, 145, 178, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 165, 116, 0.04) 0%, transparent 60%),
        linear-gradient(180deg, #FAFBFC 0%, #FFFFFF 100%);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.text-gradient {
    background: linear-gradient(135deg, #1F4E79 0%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CARD EFFECTS
   ───────────────────────────────────────────────────────────────────────────── */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable hover effects on touch devices */
@media (hover: hover) and (pointer: fine) {
    .card-hover:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(31, 78, 121, 0.15);
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Animation Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-float,
    .animate-bounce,
    .animate-pulse,
    .animate-pulse-glow {
        animation: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SCROLLBAR
   ───────────────────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

::-webkit-scrollbar-thumb {
    background: #1F4E79;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #153657;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FAQ ACCORDION
   ───────────────────────────────────────────────────────────────────────────── */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-content.open {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.rotated {
    transform: rotate(180deg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   STICKY MOBILE CTA
   ───────────────────────────────────────────────────────────────────────────── */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    padding-bottom: env(safe-area-inset-bottom);
}

.sticky-cta.visible {
    transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   REVEAL ON SCROLL
   ───────────────────────────────────────────────────────────────────────────── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOCUS STATES (Accessibility)
   ───────────────────────────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0891B2;
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE STYLES
   ───────────────────────────────────────────────────────────────────────────── */

/* Extra small devices (portrait phones, less than 640px) */
@media (max-width: 639px) {
    /* Touch targets */
    a, button {
        min-height: 44px;
    }
    
    /* Cards */
    .treatment-card {
        padding: 1.25rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    /* Form */
    .form-input {
        padding: 0.875rem 1rem;
        min-height: 52px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        min-height: 52px;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    /* Hide sticky mobile CTA on desktop */
    .sticky-cta {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   TOUCH DEVICE OPTIMIZATIONS
   ───────────────────────────────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover transforms on touch devices */
    .card-hover:hover {
        transform: none;
    }
    
    /* Active state for touch feedback */
    .card-hover:active {
        transform: scale(0.98);
    }
    
    a:active,
    button:active {
        opacity: 0.8;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────────────────────── */
@media print {
    .sticky-cta,
    .whatsapp-widget,
    #exit-popup,
    #mobile-menu,
    .animate-float,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}
