/* ============================================
   RAMOS MEDICAL ASSOCIATES — Custom Styles
   ============================================ */

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

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   GEOMETRIC BACKGROUND SHAPES
   ============================================ */
.geo-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    will-change: transform;
}

.blob-mint-top {
    width: 600px;
    height: 600px;
    background: #99f6e0;
    top: -200px;
    right: -100px;
    animation: float-blob 20s ease-in-out infinite;
}

.blob-blue-mid {
    width: 400px;
    height: 400px;
    background: #a3b5cc;
    top: 50%;
    left: -100px;
    animation: float-blob 25s ease-in-out infinite reverse;
}

.blob-mint-bottom {
    width: 500px;
    height: 500px;
    background: #ccfbf1;
    bottom: -150px;
    right: 20%;
    animation: float-blob 22s ease-in-out infinite;
}

.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.08;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #0d9488;
    top: 30%;
    right: 5%;
    transform: rotate(15deg);
    animation: spin-slow 30s linear infinite;
    opacity: 0.06;
}

.shape-circle {
    width: 120px;
    height: 120px;
    border: 4px solid #14b8a6;
    border-radius: 50%;
    top: 60%;
    left: 8%;
    animation: float-blob 18s ease-in-out infinite;
    opacity: 0.1;
}

.shape-dots {
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, #0d9488 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    top: 45%;
    right: 15%;
    opacity: 0.12;
    animation: spin-slow 40s linear infinite reverse;
}

@keyframes float-blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

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

/* ============================================
   FLOATING STAT CARDS
   ============================================ */
.floating-card {
    position: relative;
    z-index: 20;
}

.card-stat-1 {
    margin-top: 2rem;
    animation: float-card-1 6s ease-in-out infinite;
}

.card-stat-2 {
    animation: float-card-2 7s ease-in-out infinite;
}

.card-stat-3 {
    animation: float-card-3 5s ease-in-out infinite;
}

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

@keyframes float-card-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(1deg); }
}

@keyframes float-card-3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
    background: rgba(240, 249, 249, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(153, 246, 224, 0.3);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(13, 32, 56, 0.08);
}

.nav-link {
    position: relative;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3xl 3xl 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   PATIENT INFO CARDS
   ============================================ */
.patient-card {
    position: relative;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-link {
    display: block;
    width: 100%;
    text-align: left;
}

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

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

/* ============================================
   SCROLL REVEAL ANIMATIONS
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .patient-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    }

    .service-card.reveal,
    .patient-card.reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    }

    .service-card.reveal.revealed,
    .patient-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure content is visible even without JS */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .patient-card,
    .floating-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .blob-mint-top {
        width: 300px;
        height: 300px;
    }
    .blob-blue-mid {
        width: 200px;
        height: 200px;
    }
    .blob-mint-bottom {
        width: 250px;
        height: 250px;
    }
    .shape-triangle,
    .shape-circle,
    .shape-dots {
        display: none;
    }
}

@media (max-width: 640px) {
    .card-stat-2,
    .card-stat-3 {
        display: none;
    }
}
