/* ================================
   LOR Medical - Main CSS
================================ */

/* ---- Navbar ---- */
#navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.nav-logo-text { color: #1e3a8a; }
.nav-logo-sub { color: #3b82f6; }

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    background-color: #eff6ff;
    color: #2563eb;
}

.lang-btn {
    color: #374151;
    background: #f3f4f6;
    transition: background 0.2s;
}
.lang-btn:hover { background: #e5e7eb; }

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: background 0.2s;
}
.mobile-nav-link:hover { background: #eff6ff; color: #2563eb; }

/* ---- Hero ---- */
.hero-gradient {
    background: linear-gradient(135deg, #0c4a6e 0%, #1d4ed8 50%, #0284c7 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

/* ---- Cards ---- */
.service-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
    border-color: #93c5fd;
}

.doctor-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}
.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ---- Stats ---- */
.stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}
.stat-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-4px);
}

/* ---- Section Headers ---- */
.section-badge {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .section-title { font-size: 1.75rem; }
}

/* ---- Why Us ---- */
.why-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.why-card:hover {
    box-shadow: 0 15px 30px rgba(37,99,235,0.1);
    transform: translateY(-4px);
}

.why-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

/* ---- Booking Steps ---- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #9ca3af;
    z-index: 1;
    transition: all 0.3s;
}

.step-circle.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.step-circle.done {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin-top: -1.25rem;
    transition: background 0.3s;
}

.step-line.done { background: #16a34a; }

.step-label {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.4rem;
    text-align: center;
    max-width: 80px;
}

.step-label.active { color: #2563eb; font-weight: 600; }

/* ---- Time Slots ---- */
.time-slot {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}
.time-slot:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.time-slot.selected { background: #2563eb; border-color: #2563eb; color: white; }
.time-slot.booked { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; text-decoration: line-through; }

/* ---- Gallery ---- */
.gallery-item {
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    position: relative;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---- Lightbox ---- */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 0.75rem;
    object-fit: contain;
}

/* ---- Social Buttons ---- */
.social-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
    text-decoration: none;
}
.social-btn:hover { transform: translateY(-2px); }

/* ---- News Card ---- */
.news-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* ---- Form Inputs ---- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: white;
}
.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-confirmed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #ede9fe; color: #5b21b6; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-14px); }
}
@keyframes floatX {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(10px); }
}
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes pulse-ring {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(59,130,246,0.5); }
    70%  { transform: scale(1);   box-shadow: 0 0 0 16px rgba(59,130,246,0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.animate-fade-up    { animation: fadeInUp    0.6s cubic-bezier(0.16,1,0.3,1) forwards; }
.animate-fade-down  { animation: fadeInDown  0.6s cubic-bezier(0.16,1,0.3,1) forwards; }
.animate-fade-left  { animation: fadeInLeft  0.6s cubic-bezier(0.16,1,0.3,1) forwards; }
.animate-fade-right { animation: fadeInRight 0.6s cubic-bezier(0.16,1,0.3,1) forwards; }
.animate-scale-in   { animation: scaleIn     0.5s cubic-bezier(0.16,1,0.3,1) forwards; }
.animate-float      { animation: floatY 4s ease-in-out infinite; }
.animate-float-slow { animation: floatY 6s ease-in-out infinite; }
.animate-float-x    { animation: floatX 5s ease-in-out infinite; }
.animate-pulse-ring { animation: pulse-ring 2s infinite; }

/* ---- Scroll Reveal (Intersection Observer) ---- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.revealed { opacity: 1; transform: translateX(0); }

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

.reveal-scale {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
                transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-100 { transition-delay: 0.1s !important; }
.delay-150 { transition-delay: 0.15s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }
.delay-600 { transition-delay: 0.6s !important; }

/* ---- Scroll Progress Bar ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9, #06b6d4);
    background-size: 200% 100%;
    animation: gradientShift 2s ease infinite;
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ---- Hero Enhancements ---- */
.hero-gradient {
    background: linear-gradient(135deg, #0c4a6e 0%, #1d4ed8 50%, #0284c7 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Floating orbs in hero */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.hero-orb-1 {
    width: 500px; height: 500px;
    top: -150px; right: -100px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    animation: floatY 8s ease-in-out infinite;
}
.hero-orb-2 {
    width: 300px; height: 300px;
    bottom: -80px; left: -50px;
    background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, transparent 70%);
    animation: floatY 6s ease-in-out infinite reverse;
}
.hero-orb-3 {
    width: 200px; height: 200px;
    top: 30%; left: 20%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    animation: floatX 7s ease-in-out infinite;
}

/* Hero content above orbs */
.hero-gradient > .container { position: relative; z-index: 1; }

/* Typing cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #60a5fa;
    margin-left: 2px;
}

/* ---- Parallax wrapper ---- */
.parallax-bg {
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ---- Section Dividers ---- */
.wave-divider {
    position: relative;
    overflow: hidden;
}
.wave-divider svg {
    display: block;
    position: relative;
}

/* ---- Cards enhanced ---- */
.service-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }
.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 48px rgba(37,99,235,0.14);
    border-color: #93c5fd;
}

.doctor-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}

.news-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ---- Why cards ---- */
.why-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}
.why-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}
.why-card:hover::after { transform: scaleX(1); }
.why-card:hover {
    box-shadow: 0 20px 40px rgba(37,99,235,0.12);
    transform: translateY(-6px);
}

.why-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.why-card:hover .why-icon {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    transform: rotate(-5deg) scale(1.1);
}
.why-card:hover .why-icon svg { color: white !important; stroke: white; }

/* ---- Shimmer loading ---- */
.shimmer-text {
    background: linear-gradient(90deg, #fff 0%, #bfdbfe 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ---- Stat card glow ---- */
.stat-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 1.25rem;
    padding: 1.75rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(255,255,255,0.3);
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, #0c4a6e 0%, #1d4ed8 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    padding: 8rem 0 4rem;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,30 C360,60 1080,0 1440,30 L1440,60 L0,60 Z' fill='%23f9fafb'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 50%, #0ea5e9 100%);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    border-radius: 2rem;
    padding: 4.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -60%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatY 6s ease-in-out infinite;
}

/* ---- Scroll-to-top button ---- */
#scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    border: none;
    box-shadow: 0 4px 20px rgba(37,99,235,0.4);
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}
#scroll-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
#scroll-top:hover {
    background: #1d4ed8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37,99,235,0.5);
}

/* ---- Section separator ---- */
.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    border-radius: 2px;
    margin: 0 auto 1rem;
}

/* ---- Smooth scrollbar ---- */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #0ea5e9);
    border-radius: 3px;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .section-title { font-size: 1.75rem; }
    .hero-orb { display: none; }
    #scroll-top { bottom: 1.5rem; right: 1.5rem; }
}
