/* ============================================
   Children's Hospital Greer — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* ============================================
   Geometric Shape Animations (Hero)
   ============================================ */
.geo-shape {
    position: absolute;
    opacity: 0.12;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-circle-1 {
    width: 300px;
    height: 300px;
    border: 3px solid #fde047;
    border-radius: 50%;
    top: 15%;
    right: 5%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.shape-circle-2 {
    width: 180px;
    height: 180px;
    background: #d4a017;
    border-radius: 50%;
    top: 60%;
    right: 15%;
    animation-delay: -3s;
    animation-duration: 12s;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #fde047;
    top: 25%;
    right: 25%;
    animation-delay: -2s;
    animation-duration: 9s;
    opacity: 0.08;
}

.shape-square {
    width: 120px;
    height: 120px;
    border: 3px solid #fde047;
    top: 70%;
    left: 5%;
    transform: rotate(45deg);
    animation-delay: -4s;
    animation-duration: 11s;
}

.shape-ring {
    width: 200px;
    height: 200px;
    border: 4px solid rgba(253, 224, 71, 0.4);
    border-radius: 50%;
    top: 40%;
    left: 10%;
    animation-delay: -1s;
    animation-duration: 13s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) rotate(-3deg);
    }
    75% {
        transform: translateY(-15px) rotate(2deg);
    }
}

/* ============================================
   Hero Badge Animation
   ============================================ */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

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

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Always visible for reduced motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar {
    background: transparent;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    perspective: 1000px;
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

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

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

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #1e3a5f;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 150px;
        height: 150px;
    }
    
    .shape-circle-2 {
        width: 90px;
        height: 90px;
    }
    
    .shape-triangle {
        border-left: 40px solid transparent;
        border-right: 40px solid transparent;
        border-bottom: 70px solid #fde047;
    }
    
    .shape-square {
        width: 60px;
        height: 60px;
    }
    
    .shape-ring {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    
    .geo-shape {
        display: none;
    }
    
    .geo-shape.shape-circle-1,
    .geo-shape.shape-circle-2 {
        display: block;
    }
}
