/* ============================================
   Two Rivers Surgical Associates — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* Base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(201, 162, 39, 0.3);
    color: #fff;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #C9A227 0%, #B8941F 100%);
    color: #050A14;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D4AF72 0%, #C9A227 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(201, 162, 39, 0.3);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
}

.btn-secondary:hover {
    border-color: rgba(168, 230, 207, 0.5);
    color: #A8E6CF;
    background: rgba(168, 230, 207, 0.05);
    transform: translateY(-2px);
}

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

#navbar.scrolled {
    background: rgba(5, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.1);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #D4AF72 !important;
}

/* Mobile menu */
#mobile-menu {
    z-index: 50;
}

.mobile-link {
    font-family: 'Cormorant Garamond', serif;
}

.menu-line {
    display: block;
}

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

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

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-badge {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-fade {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-fade:nth-of-type(1) {
    animation-delay: 0.6s;
}

.hero-fade:nth-of-type(2) {
    animation-delay: 0.7s;
}

.hero-fade:nth-of-type(3) {
    animation-delay: 0.8s;
}

.hero-visual {
    opacity: 0;
    animation: fadeInRight 1s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.3s; }
.service-card:nth-child(4) { transition-delay: 0.4s; }
.service-card:nth-child(5) { transition-delay: 0.5s; }
.service-card:nth-child(6) { transition-delay: 0.6s; }

/* ============================================
   About Section
   ============================================ */
.about-visual {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-visual.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Patient Cards
   ============================================ */
.patient-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.patient-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.patient-card:nth-child(1) { transition-delay: 0.1s; }
.patient-card:nth-child(2) { transition-delay: 0.2s; }
.patient-card:nth-child(3) { transition-delay: 0.3s; }
.patient-card:nth-child(4) { transition-delay: 0.4s; }

/* ============================================
   CTA Section
   ============================================ */
.cta-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cta-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-info {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-form-wrapper {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-form-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   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;
    }
    
    .section-header,
    .service-card,
    .patient-card,
    .about-visual,
    .about-content,
    .cta-content,
    .contact-info,
    .contact-form-wrapper {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C9A227;
    outline-offset: 2px;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 12px;
    }
    
    #hero {
        padding-top: 100px;
    }
}
