/* ============================================
   DR. NEGIA CASTILLO — Medical Practice Website
   Custom Styles & Animations
   ============================================ */

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

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

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #0c1744;
    color: #d9e2ff;
}

/* ---------- Geometric Background Shapes ---------- */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: 15%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(69, 209, 131, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 10%;
    left: -8%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 71, 237, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.geo-square-1 {
    top: 45%;
    right: 5%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(69, 209, 131, 0.1);
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-triangle-1 {
    bottom: 30%;
    left: 8%;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(69, 209, 131, 0.04);
    animation: float-slow 18s ease-in-out infinite;
}

.geo-dots {
    top: 60%;
    right: 15%;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(69, 209, 131, 0.2) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.5;
    animation: float-slow 22s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(3deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

/* ---------- Navbar ---------- */
.nav-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-header.scrolled {
    background-color: rgba(12, 23, 68, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 500px;
}

.mobile-nav-link {
    display: block;
}

/* Menu button animation */
#bar1 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#bar2 {
    transition: opacity 0.3s ease;
}

#bar3 {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active #bar2 {
    opacity: 0;
}

#menu-btn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state for scroll-reveal elements (visible without JS) */
.scroll-reveal {
    transform: translateY(0);
    opacity: 1;
}

/* With JS enhancement — add staggered delays */
.scroll-reveal[data-delay="1"] { transition-delay: 0.1s; }
.scroll-reveal[data-delay="2"] { transition-delay: 0.2s; }
.scroll-reveal[data-delay="3"] { transition-delay: 0.3s; }
.scroll-reveal[data-delay="4"] { transition-delay: 0.4s; }
.scroll-reveal[data-delay="5"] { transition-delay: 0.5s; }
.scroll-reveal[data-delay="6"] { transition-delay: 0.6s; }

/* Reduced motion preference */
@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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3d6aff;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(69, 209, 131, 0.3);
    color: #f0f4ff;
}

/* ---------- Form Focus States ---------- */
input:focus,
textarea:focus {
    outline: none;
}

/* ---------- Button hover glow ---------- */
button, 
a[type="submit"] {
    position: relative;
}

/* ---------- Image placeholder fallback ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 768px) {
    .geo-circle-1,
    .geo-circle-2,
    .geo-square-1,
    .geo-triangle-1,
    .geo-dots {
        display: none;
    }
}

/* ---------- Print styles ---------- */
@media print {
    .geo-shape,
    .fixed,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
