/* ============================================
   James B. Brooks Pharmacy — Custom Styles
   ============================================ */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    background: rgba(250, 246, 241, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 191, 110, 0.15);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(250, 246, 241, 0.97);
    box-shadow: 0 1px 20px rgba(58, 34, 24, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-line {
    transition: all 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
}

/* Floating Cards */
.floating-card-1 {
    animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

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

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

/* ============================================
   Section Styles
   ============================================ */
.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #B85446;
    background: linear-gradient(135deg, rgba(184, 84, 70, 0.1), rgba(184, 84, 70, 0.05));
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(184, 84, 70, 0.15);
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    color: #3A2218;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.1rem;
    color: #6B5E55;
    line-height: 1.7;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #B85446, #e5a54a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

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

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 6rem;
    font-weight: 700;
    color: rgba(184, 84, 70, 0.06);
    line-height: 1;
    pointer-events: none;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

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

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

    .reveal-from-left {
        opacity: 0;
        transform: translateX(-30px);
    }

    .reveal-from-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-from-right {
        opacity: 0;
        transform: translateX(30px);
    }

    .reveal-from-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Buttons & Interactive Elements
   ============================================ */
a, button {
    -webkit-tap-highlight-color: transparent;
}

input:focus, textarea:focus {
    outline: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .floating-card-1,
    .floating-card-2 {
        display: none;
    }
}

@media (max-width: 640px) {
    .nav {
        background: rgba(250, 246, 241, 0.97);
    }

    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
}
