/* ========================================
   Dr. Velazquez MD — Custom Styles
   ======================================== */

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

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

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

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #1c1c21;
}

#navbar.scrolled .nav-logo-sub {
    color: #ff6b35;
}

#navbar.scrolled a:not(.bg-coral-500) {
    color: #4e4f58;
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.geo-circle-1 {
    width: 400px;
    height: 400px;
    border: 2px solid rgba(255, 107, 53, 0.08);
    border-radius: 50%;
    top: 10%;
    right: -5%;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 107, 53, 0.04);
    border-radius: 50%;
    bottom: 20%;
    right: 15%;
    animation: float 6s ease-in-out infinite reverse;
}

.geo-square-1 {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 107, 53, 0.1);
    top: 30%;
    right: 35%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(255, 107, 53, 0.06);
    top: 60%;
    left: 5%;
    animation: float 7s ease-in-out infinite;
}

.geo-dot-group {
    top: 25%;
    left: 45%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100px;
}

.geo-dot-group::before,
.geo-dot-group::after {
    content: '';
    width: 8px;
    height: 8px;
    background: rgba(255, 107, 53, 0.2);
    border-radius: 50%;
}

.geo-dot-group::before {
    animation: pulse-dot 2s ease-in-out infinite;
}

.geo-dot-group::after {
    animation: pulse-dot 2s ease-in-out infinite 0.5s;
}

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

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

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg) translate(-50%, -50%); }
    to { transform: rotate(405deg) translate(-50%, -50%); }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ffb58f);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

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

/* ========================================
   Feature Cards (Why Choose Us)
   ======================================== */
.feature-card {
    position: relative;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 107, 53, 0.06);
    pointer-events: none;
}

/* ========================================
   Back to Top
   ======================================== */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#backToTop:not(.visible) {
    transform: translateY(1rem);
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s 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; }
}

/* Reduced motion: ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 200px;
        height: 200px;
    }

    .geo-square-1 {
        width: 40px;
        height: 40px;
    }

    .geo-triangle-1 {
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-bottom: 35px solid rgba(255, 107, 53, 0.06);
    }
}
