/* ================================
   Spine & Strength Chiropractic
   Complete Stylesheet
   ================================ */

/* ================================
   CSS Variables & Base Styles
   ================================ */

:root {
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-emerald-500: #10b981;
    --color-teal-600: #0d9488;
    --color-orange-500: #f97316;
    --color-rose-500: #f43f5e;
    --color-sky-500: #0ea5e9;
    --color-violet-500: #8b5cf6;
    --color-purple-600: #9333ea;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   Navigation Styles
   ================================ */

.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-logo {
    font-family: 'Lexend', sans-serif;
    letter-spacing: -0.02em;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ================================
   Button Styles
   ================================ */

.btn-shadow {
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-shadow:hover {
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15);
}

.btn-book {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: opacity 0.2s ease;
}

.btn-book:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-outline:hover {
    background-color: #f8fafc;
}

/* ================================
   Image Styles
   ================================ */

.img-container {
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.7s ease;
}

/* ================================
   Animations
   ================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Service Card Staggered Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    opacity: 0;
    animation: slideUp 0.5s ease-out forwards;
}

/* Pulse animation for badges */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Spin animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Bounce animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%) rotate(45deg);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0) rotate(45deg);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Ping animation */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ================================
   Modal Styles
   ================================ */

/* NOTE:
   Modal visibility and transitions are handled via Tailwind utility classes
   in the HTML (`hidden`, `opacity-0`, `translate-y-4`, etc).
   We intentionally avoid setting `display: none` here because it prevents
   the JS from showing the modal by removing `hidden`.
*/

/* ================================
   Gradient Classes for Services & Modal
   ================================ */

.gradient-chiropractic {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.gradient-rehab {
    background: linear-gradient(135deg, #10b981, #0d9488);
}

.gradient-decompression {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.gradient-shockwave {
    background: linear-gradient(135deg, #f97316, #f43f5e);
}

.gradient-physiotherapy {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.gradient-myotherapy {
    background: linear-gradient(135deg, #8b5cf6, #9333ea);
}

.gradient-decompression_case {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* ================================
   Hero Fade Transition
   ================================ */

.hero-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    z-index: 20;
    pointer-events: none;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 18%,
        rgba(255, 255, 255, 0.28) 40%,
        rgba(255, 255, 255, 0.7) 75%,
        rgba(255, 255, 255, 1) 100%
    );
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* ================================
   Page Sections
   ================================ */

.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* ================================
   Price Row Styles
   ================================ */

.price-row {
    border-bottom: 1px solid #f1f5f9;
}

.price-row:last-child {
    border-bottom: none;
}

/* ================================
   Utility Classes
   ================================ */

.blur-3xl {
    filter: blur(64px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
    .service-card {
        animation-delay: 0ms !important;
    }
    
    #modalPanel {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* ================================
   Focus Styles for Accessibility
   ================================ */

button:focus-visible,
a:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ================================
   Scrollbar Styles
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ================================
   Selection Styles
   ================================ */

::selection {
    background: rgba(59, 130, 246, 0.2);
    color: #1e293b;
}

/* ================================
   Print Styles
   ================================ */

@media print {
    .glass-nav,
    #mobile-menu,
    #serviceModal,
    footer {
        display: none !important;
    }
    
    .page-section {
        display: block !important;
    }
}
