/* Lema Klinik — Tailwind enhancements */

:root {
    --header-height: 4.5rem;
    --mobile-cta-height: 4.5rem;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: calc(var(--header-height) + 0.5rem);
}

body {
    overflow-x: hidden;
    padding-bottom: 0;
}

img,
video,
iframe {
    max-width: 100%;
}

@media (min-width: 640px) {
    :root {
        --header-height: 5.75rem;
    }
}

@media (max-width: 1023px) {
    body {
        padding-bottom: calc(var(--mobile-cta-height) + env(safe-area-inset-bottom, 0px) + 0.5rem);
    }

    main {
        overflow-x: hidden;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-video {
        opacity: 0.5;
        filter: blur(2px) saturate(1.1);
    }

    .hero-cta-primary:active,
    .hero-cta-secondary:active {
        transform: scale(0.98);
    }

    .contact-tile {
        min-height: 118px;
        padding: 0.85rem 0.5rem;
        border-radius: 1rem;
    }

    .contact-tile i {
        font-size: 1.35rem !important;
    }

    .contact-tile .font-semibold {
        font-size: 0.8rem;
        line-height: 1.25;
    }

    .email-wrap {
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    #site-navbar .h-\[4\.5rem\] {
        height: 4.5rem;
    }

    #site-navbar .sm\:h-\[5\.75rem\] {
        height: 4.5rem;
    }

    @media (min-width: 640px) {
        #site-navbar .sm\:h-\[5\.75rem\] {
            height: 5.75rem;
        }
    }

    .site-navbar-mobile {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.menu-open {
        overflow: hidden;
    }

    footer {
        padding-bottom: 0.5rem;
    }
}

/* Mobile header quick actions */
.mobile-header-action,
.mobile-header-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: none;
    background: transparent;
    color: #e2e8f0;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-header-action:hover,
.mobile-header-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-header-wa {
    color: #6ee7b7;
}

.mobile-header-wa:hover {
    background: rgba(110, 231, 183, 0.15);
    color: #a7f3d0;
}

.mobile-header-menu {
    color: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-video {
        display: none;
    }

    .clinic-video {
        display: none;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: #1e3a8a;
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    outline: 3px solid #06b6d4;
    outline-offset: 2px;
}

.skip-link:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid #06b6d4;
    outline-offset: 2px;
}

/* Hero video background */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    filter: blur(1px) saturate(1.2);
    transform: scale(1.05);
}

.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(239, 246, 255, 0.48) 0%,
        rgba(255, 255, 255, 0.4) 45%,
        rgba(236, 254, 255, 0.46) 100%
    );
}

#hero > .max-w-7xl {
    position: relative;
    z-index: 1;
}

/* Clinic feature video */
.clinic-video-card {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    border: 4px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
}

.clinic-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #0f172a;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.5, 0, 0, 1), transform 0.75s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* FAQ accordion */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

.faq-visual {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    min-height: 420px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.faq-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.faq-visual-content {
    position: absolute;
    inset-inline: 1.25rem;
    bottom: 1.25rem;
    z-index: 1;
}

.faq-visual-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(191, 219, 254, 0.4);
    margin-bottom: 0.7rem;
}

@media (max-width: 1023px) {
    .faq-visual {
        min-height: 300px;
    }
}

/* Contact tiles */
.contact-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
    min-height: 140px;
    padding: 1.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1.25rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.contact-tile:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

.contact-tile-whatsapp:hover {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.25);
}

/* Visit / location section */
.visit-photo {
    position: relative;
    background: #0f172a;
}

.visit-photo-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.88) 0%,
        rgba(15, 23, 42, 0.25) 45%,
        transparent 100%
    );
    pointer-events: none;
}

.visit-photo-caption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    color: #f8fafc;
    font-size: 0.875rem;
    line-height: 1.4;
}

.visit-photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.visit-details {
    margin-top: 0;
}

.visit-detail-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.visit-detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
}

.visit-detail-icon-hours {
    background: #ecfeff;
    color: #0891b2;
}

.visit-detail-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.visit-detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.45;
    margin: 0;
}

/* Opening hours schedule */
.hours-schedule {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hours-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hours-schedule-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.hours-schedule-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e3a8a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hours-schedule--compact {
    margin-top: 0.35rem;
    gap: 0.2rem;
}

.hours-schedule--compact .hours-schedule-row {
    padding: 0.15rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}

.hours-schedule--compact .hours-schedule-row:last-child {
    border-bottom: none;
}

.hours-schedule--compact .hours-schedule-label,
.hours-schedule--compact .hours-schedule-time {
    font-size: 0.72rem;
}

.hours-schedule--compact .hours-schedule-time {
    color: #2563eb;
}

.hours-schedule--panel .hours-schedule-row,
.hours-schedule--card .hours-schedule-row {
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
}

.hours-schedule--panel .hours-schedule-row:nth-child(2),
.hours-schedule--card .hours-schedule-row:nth-child(2) {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
}

.hours-schedule--panel .hours-schedule-time,
.hours-schedule--card .hours-schedule-time {
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.75rem;
}

.hours-schedule--card {
    margin-top: 0.35rem;
}

.hours-panel {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.visit-detail-card-hours {
    align-items: flex-start;
}

@media (min-width: 640px) {
    .visit-detail-card-hours {
        grid-column: 1 / -1;
    }
}

.visit-map {
    background: #e2e8f0;
}

.visit-actions .contact-tile {
    min-height: 120px;
    padding: 1rem 0.5rem;
}

.visit-highlight {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.visit-highlight:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.08);
}

.visit-highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    color: #2563eb;
    font-size: 1rem;
}

.visit-highlight-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.visit-highlight-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

#contact {
    scroll-margin-top: calc(var(--header-height) + 0.5rem);
}

#location {
    scroll-margin-top: calc(var(--header-height) + 0.5rem);
}

/* Process section */
.process-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #172554 100%);
    color: #fff;
}

.process-section-bg {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.35), transparent 42%),
        radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.2), transparent 38%),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.85) 1px, transparent 1px);
    background-size: auto, auto, 24px 24px;
    pointer-events: none;
}

.process-visual {
    position: relative;
    min-height: 360px;
}

.process-visual-main {
    position: relative;
    z-index: 1;
    height: 320px;
    border-radius: 1.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.process-visual-inset {
    position: absolute;
    z-index: 2;
    bottom: -1.25rem;
    inset-inline-end: -0.75rem;
    width: 42%;
    min-width: 140px;
    max-width: 190px;
    aspect-ratio: 4 / 3;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 4px solid rgba(15, 23, 42, 0.92);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.process-visual-badge {
    position: absolute;
    z-index: 3;
    top: 1rem;
    inset-inline-start: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

.process-visual-badge-count {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.process-visual-badge-label {
    margin-top: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #bfdbfe;
}

.process-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    position: relative;
}

.process-timeline::before {
    content: "";
    position: absolute;
    top: 1.6rem;
    bottom: 1.6rem;
    inset-inline-start: 2.45rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(147, 197, 253, 0.5), rgba(147, 197, 253, 0.1));
    pointer-events: none;
}

.process-step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.process-step:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(147, 197, 253, 0.28);
    transform: translateX(4px);
}

.rtl-layout .process-step:hover {
    transform: translateX(-4px);
}

.process-step-marker {
    position: relative;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}

.process-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.process-step-number {
    position: absolute;
    top: -0.35rem;
    inset-inline-end: -0.35rem;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #fff;
    color: #1e3a8a;
    font-size: 0.65rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.process-step-title {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.process-step-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #bfdbfe;
}

@media (min-width: 1024px) {
    .process-visual {
        min-height: 420px;
    }

    .process-visual-main {
        height: 380px;
    }
}

@media (max-width: 1023px) {
    .process-visual {
        max-width: 28rem;
        margin-inline: auto;
    }
}

/* Footer layout */
.footer-main {
    margin-bottom: 1.4rem;
    padding: 1.2rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.52) 0%, rgba(15, 23, 42, 0.25) 100%);
    backdrop-filter: blur(4px);
}

.footer-col {
    min-height: 230px;
}

.footer-services-list {
    columns: 2;
    column-gap: 1.25rem;
}

.footer-services-list li {
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

.footer-meta {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

@media (max-width: 767px) {
    .footer-main {
        margin-bottom: 1rem;
        padding: 1rem 0.85rem;
        border-radius: 1rem;
    }

    .footer-col {
        min-height: auto;
    }

    .footer-services-list {
        columns: 1;
    }
}

/* Mobile bottom CTA — Call + WhatsApp */
.mobile-cta-bar {
    padding: 0.75rem 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.08);
}

.mobile-cta-inner {
    display: flex;
    gap: 0.75rem;
    max-width: 28rem;
    margin: 0 auto;
}

.mobile-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.mobile-cta-btn:active {
    transform: scale(0.98);
}

.mobile-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.22);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.mobile-cta-text {
    line-height: 1.2;
    white-space: nowrap;
}

.mobile-cta-call {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.mobile-cta-call:hover {
    color: #fff;
    filter: brightness(1.05);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.mobile-cta-wa {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.mobile-cta-wa:hover {
    color: #fff;
    filter: brightness(1.05);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

@media (max-width: 380px) {
    .mobile-cta-text {
        font-size: 0.8rem;
    }

    .mobile-cta-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }
}

/* Floating WhatsApp widget */
.floating-whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.floating-whatsapp i {
    font-size: 1.25rem;
    line-height: 1;
}

.floating-whatsapp:hover {
    background: #1fb758;
    color: #fff;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.45);
}

.floating-whatsapp:focus-visible {
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* RTL */
.rtl-layout {
    text-align: right;
}

.rtl-layout .reveal {
    direction: rtl;
}

/* Lang flags */
.lang-flag-img {
    display: inline-block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Navbar — dark bar for logo contrast and readable light nav text */
.site-navbar {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.96) 100%);
}

.site-navbar-mobile {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Navbar scrolled */
#site-navbar.is-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.99) 0%, rgba(30, 41, 59, 0.98) 100%);
}

    /* Lang menu — toggled via JS hidden class */
#location iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 0;
}
