/* ========================================
   MaineGeneral Eye Center — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0a1628;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Hero Overlay
   ======================================== */
.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.88) 0%,
        rgba(15, 34, 64, 0.75) 50%,
        rgba(10, 22, 40, 0.60) 100%
    );
}

/* ========================================
   Geometric Background Shapes
   ======================================== */
.geo-shape {
    position: fixed;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    border: 2px solid #e8b828;
    border-radius: 50%;
    top: -100px;
    right: -150px;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: #e8b828;
    border-radius: 50%;
    bottom: 20%;
    left: -80px;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 260px solid #e8b828;
    top: 40%;
    right: 5%;
    opacity: 0.03;
}

.geo-square-rotated {
    width: 200px;
    height: 200px;
    border: 2px solid #e8b828;
    top: 60%;
    left: 10%;
    transform: rotate(45deg);
    opacity: 0.04;
}

.geo-circle-3 {
    width: 150px;
    height: 150px;
    background: #1e4480;
    border-radius: 50%;
    top: 20%;
    left: 5%;
}

/* ========================================
   Floating Animations
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 7s ease-in-out infinite;
}

.animate-float-delay-2 {
    animation: float-delay-2 5s ease-in-out infinite;
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
}

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

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #e8b828;
    transition: width 0.3s ease;
    margin-top: 2px;
}

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

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu.open {
    max-height: 400px;
}

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

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

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

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

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Select Dropdown
   ======================================== */
select option {
    background: #0a1628;
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

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

/* ========================================
   Selection
   ======================================== */
::selection {
    background: rgba(232, 184, 40, 0.3);
    color: #ffffff;
}

/* ========================================
   Focus Visible
   ======================================== */
:focus-visible {
    outline: 2px solid #e8b828;
    outline-offset: 2px;
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
