/* ============================================
   C & M Wellness and Rehab — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(116, 63, 74, 0.08);
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
    color: #9c6473;
    transform: translateY(-2px);
}

/* --- Hero Animations --- */
.hero-tag {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-headline {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-stats {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-image {
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-image-wrapper {
    animation: scaleIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-card {
    animation: slideUpRight 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUpRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -12px; }
    100% { top: 32px; }
}

/* --- Section Tags & Titles --- */
.section-tag {
    display: inline-block;
}

.section-title {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    transition: background 0.4s ease;
}

.service-card:hover {
    background: #faf8f9;
}

.service-card:hover svg circle,
.service-card:hover svg path:first-of-type {
    stroke: #ffd65c;
}

/* --- About Image --- */
.about-image {
    transition: transform 0.8s ease;
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.03);
}

/* --- Approach Steps --- */
.approach-step {
    position: relative;
}

.approach-step::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd65c, #f5a623);
    transition: width 0.5s ease;
}

.approach-step:hover::after {
    width: 60px;
}

/* --- Form Inputs --- */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #9c6473;
    box-shadow: 0 0 0 3px rgba(156, 100, 115, 0.08);
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.form-submit:hover::before {
    left: 100%;
}

/* --- Contact Items --- */
.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(4px);
}

/* --- Scroll Reveal (below fold only) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-card {
        position: relative;
        top: auto;
        left: auto;
        margin-top: 16px;
        max-width: 100%;
    }
    
    .hero-image {
        height: 360px !important;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
