/* ===== Custom Styles for King Chiropractic & Wellness Center ===== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 175, 55, 0.1);
}

#navbar.scrolled .menu-line {
    background: #D4AF37;
}

/* ===== Hero Floating Cards ===== */
.floating-card-1 {
    animation: float-1 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-2 7s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-3 5s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

/* ===== Scroll Indicator ===== */
.animate-scroll-indicator {
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 120px;
    font-family: 'Cormorant Garamond', serif;
    color: rgba(212, 175, 55, 0.05);
    line-height: 1;
    pointer-events: none;
}

/* ===== Scroll Reveal Animations ===== */
/* Default: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* When JS adds the hidden state, content is still visible by default */
/* JS will add .hidden-init then .revealed for animation */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobile-menu.open .mobile-link {
    animation: fade-in-up 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-link {
    opacity: 0;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mobile Menu Button Animation ===== */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 6px;
}

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ===== Selection ===== */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fff;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.5);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}
