/* ============================================
   Carolina Orthopedic Specialists — 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;
}

/* Custom Selection */
::selection {
    background: #2d6e38;
    color: #fefdf8;
}

/* ============================================
   Geometric Background Blobs (fixed, subtle)
   ============================================ */
.geo-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #4ECDC4;
    top: 10%;
    right: -10%;
    animation: float-slow 20s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #FF6B6B;
    bottom: 20%;
    left: -5%;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #FFD93D;
    top: 50%;
    left: 30%;
    animation: float-slow 18s ease-in-out infinite;
}

.blob-4 {
    width: 250px;
    height: 250px;
    background: #A78BFA;
    bottom: 10%;
    right: 20%;
    animation: float-slow 22s ease-in-out infinite reverse;
}

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

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

.shape-circle-1 {
    width: 400px;
    height: 400px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: spin-slow 60s linear infinite;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 217, 61, 0.1);
    border-radius: 50%;
    bottom: 15%;
    left: 5%;
    animation: pulse-gentle 4s ease-in-out infinite;
}

.shape-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(255, 107, 107, 0.12);
    top: 25%;
    left: 8%;
    transform: rotate(45deg);
    animation: rotate-slow 30s linear infinite;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(78, 205, 196, 0.15);
    top: 60%;
    right: 10%;
    animation: float-gentle 6s ease-in-out infinite;
}

.shape-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(rgba(255,255,255,0.25) 2px, transparent 2px);
    background-size: 16px 16px;
    top: 20%;
    right: 15%;
    animation: float-gentle 8s ease-in-out infinite reverse;
}

.shape-ring-1 {
    width: 150px;
    height: 150px;
    border: 4px solid rgba(255, 217, 61, 0.2);
    border-radius: 50%;
    bottom: 25%;
    right: 25%;
    animation: spin-slow 40s linear infinite reverse;
}

.shape-bar-1 {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    bottom: 35%;
    left: -50px;
    transform: rotate(-15deg);
}

.shape-bar-2 {
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    top: 40%;
    right: -30px;
    transform: rotate(25deg);
}

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

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

@keyframes pulse-gentle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(45, 110, 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, #FF6B6B, #4ECDC4, #FFD93D);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

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

.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; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
    width: 100%;
}

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

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

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 110, 56, 0.15);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-shape {
        display: none;
    }
    
    .shape-circle-1 {
        width: 250px;
        height: 250px;
    }
    
    .shape-square-1 {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 640px) {
    .geo-blob {
        display: none;
    }
}
