/* ===================================
   Southeast Georgia Physicians Associates
   Custom Styles
   =================================== */

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #d44a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b93030;
}

/* Selection */
::selection {
    background: #fce7e7;
    color: #3b0a0a;
}

/* ===================================
   Navbar
   =================================== */
#navbar {
    background: rgba(250, 249, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(185, 130, 130, 0.1);
}

#navbar.scrolled {
    background: rgba(250, 249, 247, 0.95);
    box-shadow: 0 1px 20px rgba(107, 27, 27, 0.06);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeSlideDown 0.4s ease forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Menu Button Animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* ===================================
   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, #b93030, #d44a4a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===================================
   Scroll Reveal (Progressive Enhancement)
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .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 - ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

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

#back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 27, 27, 0.3);
}

/* ===================================
   Form Styles
   =================================== */
input:focus,
select:focus,
textarea:focus {
    border-color: #b93030 !important;
    box-shadow: 0 0 0 3px rgba(185, 48, 48, 0.1);
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    #hero h1 span:last-child {
        font-size: 1.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 4.5rem;
    }
}

/* ===================================
   Image Hover Effects
   =================================== */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    
    body {
        background: white;
        color: #1a1a1a;
    }
    
    .service-card {
        break-inside: avoid;
    }
}
