/* ============================================
   Grassmere Family Medical Center
   Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #6ee7b7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #059669;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(5, 95, 70, 0.08);
}

.navbar-scrolled .nav-link {
    color: #064e3b;
}

.navbar-scrolled .logo-text {
    color: #064e3b;
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    display: block;
}

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

.geo-circle-1 {
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.6) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    bottom: 10%;
    left: 5%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid rgba(110, 231, 183, 0.3);
    top: 25%;
    left: 8%;
    animation: float-medium 12s ease-in-out infinite;
}

.geo-square-1 {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    top: 20%;
    right: 12%;
    transform: rotate(45deg);
    animation: float-medium 10s ease-in-out infinite;
}

.geo-square-2 {
    width: 60px;
    height: 60px;
    background: rgba(110, 231, 183, 0.2);
    bottom: 25%;
    right: 20%;
    transform: rotate(20deg);
    animation: float-medium 8s ease-in-out infinite reverse;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(110, 231, 183, 0.15);
    top: 40%;
    right: 5%;
    animation: float-slow 18s ease-in-out infinite;
}

/* Dot grid pattern */
.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

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

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

/* --- 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, #059669, #34d399, #6ee7b7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .geo-shape {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* --- Form Styles --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Selection --- */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}
