/* ============================================
   Rome Orthopedic Clinic — 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;
}

/* Selection Color */
::selection {
    background-color: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* ============================================
   Floating Card Animations
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

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

/* ============================================
   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, #0d9488, #5eead4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   Info Cards
   ============================================ */
.info-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.inactive {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .info-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    border-color 0.4s ease;
    }
}

/* ============================================
   Navbar Scroll State
   ============================================ */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* ============================================
   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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Utility: Thin separator lines
   ============================================ */
.divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, #0d9488, transparent);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: auto;
        padding: 8rem 0 4rem;
    }
    
    h1, .font-serif.text-5xl {
        font-size: 2.75rem !important;
        line-height: 1.1 !important;
    }
    
    h2, .font-serif.text-4xl {
        font-size: 2.25rem !important;
    }
    
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

@media (max-width: 640px) {
    #hero {
        padding: 7rem 0 3rem;
    }
    
    .service-card,
    .info-card {
        padding: 1.5rem;
    }
    
    .contact-form-section {
        padding: 3rem 1.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
