/* ============================================
   Coastal Mental Health Center — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #E8645A;
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #E8645A;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
    z-index: 100;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

/* ============================================
   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, #FFAB9B 0%, transparent 70%);
    top: -80px;
    right: -100px;
    animation: float1 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFCAC2 0%, transparent 70%);
    bottom: 10%;
    left: -60px;
    animation: float2 10s ease-in-out infinite;
}

.geo-circle-3 {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    top: 30%;
    left: 8%;
    animation: float3 7s ease-in-out infinite;
}

.geo-square-1 {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 171, 155, 0.4);
    top: 20%;
    right: 12%;
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
}

.geo-square-2 {
    width: 60px;
    height: 60px;
    background: rgba(232, 100, 90, 0.3);
    bottom: 25%;
    right: 25%;
    transform: rotate(30deg);
    animation: spin 15s linear infinite reverse;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 78px solid rgba(255, 171, 155, 0.25);
    top: 40%;
    left: 5%;
    animation: float1 9s ease-in-out infinite;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.25) 2px, transparent 2px);
    background-size: 16px 16px;
    bottom: 18%;
    right: 8%;
    animation: float2 11s ease-in-out infinite;
}

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

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

@keyframes float3 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   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, #E8645A, #FFAB9B);
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* ============================================
   Testimonial cards
   ============================================ */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================
   FAQ
   ============================================ */
.faq-item {
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: #fed2ce;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-content.open {
    max-height: 200px;
}

/* ============================================
   Scroll reveal animations
   (progressive enhancement — content is visible by default)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* ============================================
   Mobile menu
   ============================================ */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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