/* =============================================================
   Template 20 — Klinik THT / ENT Clinic
   layout.css — Right Pill Nav, Topbar, Footer, Base
   Prefix: .tht-
   ============================================================= */

/* ── Base Variables ─────────────────────────────────────────── */
:root {
    --brand-primary:   #0D9488;
    --brand-secondary: #14B8A6;
    --brand-accent:    #7DD3FC;
    --brand-warm:      #FDE68A;
    --brand-dark:      #134E4A;
    --brand-light:     #F0FDFA;
    --brand-mid:       #CCFBF1;
    --brand-gray:      #64748B;

    --tht-font-display: 'Lexend', system-ui, sans-serif;
    --tht-font-body:    'Lexend Deca', system-ui, sans-serif;

    --tht-radius:    12px;
    --tht-radius-lg: 20px;
    --tht-shadow:    0 4px 20px rgba(13,148,136,0.10);
    --tht-shadow-lg: 0 12px 48px rgba(19,78,74,0.16);
    --tht-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

    --tht-pill-width: 56px;
}

/* ── Reset & Global ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.tht-body {
    font-family: var(--tht-font-body);
    color: #1e3a38;
    background: #fff;
    overflow-x: hidden;
    line-height: 1.65;
    /* Push content left to make room for right pill nav on desktop */
    padding-right: calc(var(--tht-pill-width) + 28px);
}

.tht-main {
    min-height: 100vh;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--brand-light); }
::-webkit-scrollbar-thumb {
    background: var(--brand-secondary);
    border-radius: 4px;
}

::selection {
    background: var(--brand-secondary);
    color: #fff;
}

/* ================================================================
   RIGHT VERTICAL PILL NAV
   Fixed kanan layar, pill vertikal, tooltip ke kiri
   ================================================================ */
.tht-pillnav {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tht-pillnav-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(19, 78, 74, 0.88);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--tht-shadow-lg);
}

.tht-pillnav-item {
    position: relative;
}

.tht-pillnav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--tht-transition), background var(--tht-transition);
}

.tht-pillnav-link:hover,
.tht-pillnav-link.active {
    color: #fff;
    background: var(--brand-secondary);
}

/* Tooltip — slide dari kanan ke kiri */
.tht-pillnav-tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--brand-dark);
    color: #fff;
    font-family: var(--tht-font-display);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Tooltip arrow pointing right */
.tht-pillnav-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--brand-dark);
    border-right: 0;
}

.tht-pillnav-link:hover .tht-pillnav-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* CTA calendar button below pill */
.tht-pillnav-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-secondary);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.45);
    transition: background var(--tht-transition), transform var(--tht-transition);
    border: 2px solid rgba(255,255,255,0.2);
}

.tht-pillnav-cta:hover {
    background: var(--brand-primary);
    color: #fff;
    transform: scale(1.1);
}

.tht-pillnav-tooltip--cta {
    right: calc(100% + 14px);
}

.tht-pillnav-cta:hover .tht-pillnav-tooltip--cta {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ================================================================
   TOP BAR — Only visible on mobile / small screens
   ================================================================ */
.tht-topbar {
    display: none; /* hidden on desktop, shown on mobile */
    position: sticky;
    top: 0;
    z-index: 950;
    background: rgba(19, 78, 74, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tht-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 16px;
}

.tht-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.tht-topbar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tht-topbar-name {
    font-family: var(--tht-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.tht-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tht-topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 100px;
    background: var(--brand-secondary);
    color: #fff;
    font-family: var(--tht-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--tht-transition);
}

.tht-topbar-cta:hover {
    background: var(--brand-accent);
    color: var(--brand-dark);
}

/* Hamburger toggle */
.tht-topbar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
}

.tht-topbar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.tht-topbar-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.tht-topbar-toggle.open span:nth-child(2) { opacity: 0; }
.tht-topbar-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu dropdown */
.tht-mobile-menu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
    background: var(--brand-dark);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.tht-mobile-menu.open {
    max-height: 500px;
}

.tht-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.tht-mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-family: var(--tht-font-display);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: color var(--tht-transition), background var(--tht-transition), padding var(--tht-transition);
}

.tht-mobile-link:hover {
    color: var(--brand-accent);
    background: rgba(255,255,255,0.04);
    padding-left: 28px;
}

.tht-mobile-link i {
    width: 18px;
    text-align: center;
    color: rgba(255,255,255,0.35);
}

/* ================================================================
   FOOTER
   ================================================================ */
.tht-footer-wave {
    line-height: 0;
    overflow: hidden;
    margin-bottom: -2px;
}

.tht-footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.tht-footer {
    background: var(--brand-dark);
    color: rgba(255,255,255,0.55);
    padding-bottom: 0;
}

.tht-footer-inner {
    padding-top: 48px;
    padding-bottom: 0;
}

/* Logo */
.tht-footer-logo {
    margin-bottom: 14px;
}

.tht-footer-logo img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
}

.tht-footer-tagline {
    font-family: var(--tht-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.4;
}

.tht-footer-desc {
    font-size: 0.81rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.35);
    margin: 0 0 18px;
}

/* Social */
.tht-footer-socials { display: flex; gap: 8px; }

a.tht-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.07);
    transition: all var(--tht-transition);
}

a.tht-footer-social:hover {
    background: var(--brand-secondary);
    color: #fff;
    border-color: var(--brand-secondary);
}

/* Footer headings */
.tht-footer-heading {
    font-family: var(--tht-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.3);
    margin: 0 0 14px;
}

/* Footer links */
.tht-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tht-footer-links a {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.42);
    text-decoration: none;
    transition: color var(--tht-transition), padding var(--tht-transition);
    display: inline-block;
}

.tht-footer-links a:hover {
    color: var(--brand-accent);
    padding-left: 4px;
}

/* Contact rows */
.tht-footer-contact-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.tht-footer-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(20,184,166,0.12);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.tht-footer-contact-label {
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.2);
    margin-bottom: 3px;
}

.tht-footer-contact-val {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.48);
    line-height: 1.5;
}

a.tht-footer-link {
    text-decoration: none;
    color: rgba(255,255,255,0.48);
    transition: color var(--tht-transition);
}

a.tht-footer-link:hover { color: var(--brand-accent); }

/* Hearing Test Easter Egg */
.tht-hearing-test {
    margin-top: 20px;
    padding: 18px 18px;
    background: rgba(20,184,166,0.08);
    border: 1px solid rgba(20,184,166,0.18);
    border-radius: var(--tht-radius);
}

.tht-hearing-test-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tht-font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.tht-hearing-test-badge {
    font-size: 0.65rem;
    background: var(--brand-secondary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: auto;
}

.tht-hearing-test-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin: 0 0 12px;
}

.tht-freq-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tht-freq-btn {
    padding: 5px 12px;
    border-radius: 100px;
    border: 1.5px solid rgba(20,184,166,0.3);
    background: rgba(20,184,166,0.06);
    color: rgba(255,255,255,0.6);
    font-family: var(--tht-font-display);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tht-freq-btn:hover,
.tht-freq-btn.playing {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}

.tht-hearing-test-hint {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    margin: 0 0 12px;
    font-style: italic;
}

.tht-hearing-test-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--tht-font-display);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-accent);
    text-decoration: none;
    transition: color var(--tht-transition);
}

.tht-hearing-test-cta:hover { color: #fff; }

/* Bottom bar */
.tht-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 40px;
    font-size: 0.77rem;
    color: rgba(255,255,255,0.22);
}

.tht-footer-bottom a {
    color: var(--brand-secondary);
    text-decoration: none;
}
.tht-footer-bottom a:hover { color: #fff; }

/* ================================================================
   RESPONSIVE — Remove right padding on mobile, show topbar
   ================================================================ */
@media (max-width: 991px) {
    body.tht-body {
        padding-right: 0;
    }

    .tht-pillnav {
        display: none; /* hide vertical pill on mobile */
    }

    .tht-topbar {
        display: block; /* show topbar on mobile */
    }
}

@media (max-width: 575px) {
    .tht-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}