/* ============================================
   Blair Dental Associates — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(161, 29, 63, 0.15);
    color: #6f1f34;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(161, 29, 63, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a11d3f, #c2274b);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

/* --- Mobile Menu --- */
.menu-line {
    transition: all 0.3s ease;
}

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

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

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

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    border-left: 2px solid transparent;
    transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    border-left-color: #a11d3f;
    padding-left: 12px;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #a11d3f 0%, #c2274b 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(161, 29, 63, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(161, 29, 63, 0.35);
    background: linear-gradient(135deg, #841d38 0%, #a11d3f 100%);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

/* --- Section Styles --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #a11d3f;
    background: linear-gradient(90deg, rgba(161, 29, 63, 0.08), rgba(161, 29, 63, 0.04));
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(161, 29, 63, 0.12);
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: #1a1a1a;
}

.section-desc {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #6b7280;
    margin-top: 12px;
}

/* --- Service Cards --- */
.service-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(161, 29, 63, 0.06);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a11d3f, #f87171, #a11d3f);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(161, 29, 63, 0.1);
    border-color: rgba(161, 29, 63, 0.1);
}

.service-card:hover::before {
    opacity: 1;
}

/* --- Experience Steps --- */
.experience-step {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-step:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    border: 1px solid rgba(161, 29, 63, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(161, 29, 63, 0.12);
    box-shadow: 0 16px 48px rgba(161, 29, 63, 0.08);
}

/* --- Form Inputs --- */
.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: #9ca3af;
}

.input-field:hover {
    border-color: #d1d5db;
}

.input-field:focus {
    border-color: #a11d3f;
    box-shadow: 0 0 0 3px rgba(161, 29, 63, 0.08);
}

.input-field:focus:hover {
    border-color: #a11d3f;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card,
    .testimonial-card,
    .experience-step,
    .btn-primary,
    .btn-secondary {
        transition: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover,
    .experience-step:hover {
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    #hero h1 {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
