/* ESTEEM Medikal klinikasi — reklama sayti. Yorugʻ, zamonaviy uslub. */
:root {
  --blue: #1b2a9b;
  --blue-d: #121c75;
  --teal: #12a4b8;
  --ink: #12183a;
  --muted: #5b6488;
  --bg: #ffffff;
  --bg-alt: #f3f7fd;
  --line: #e3e9f5;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(27, 42, 155, 0.08);
  --shadow-lg: 0 20px 50px rgba(27, 42, 155, 0.14);
  --grad: linear-gradient(120deg, var(--blue), var(--teal));
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: "Times New Roman", Times, "Liberation Serif", serif; color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 19px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
button, input, select, textarea { font-family: inherit; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* Sarlavha */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: block; text-decoration: none; }
.logo { display: block; position: relative; overflow: hidden; width: 176px; aspect-ratio: 1040 / 360; }
.logo img { position: absolute; width: 192.3%; max-width: none; left: -3.85%; top: -38.9%; height: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 17px; color: var(--muted); transition: 0.2s; }
.nav a:hover { color: var(--blue); background: var(--bg-alt); }
.hdr-r { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; background: var(--bg-alt); border-radius: 999px; padding: 3px; }
.lang a { text-decoration: none; font-size: 15px; font-weight: 700; padding: 5px 11px; border-radius: 999px; color: var(--muted); }
.lang a.on { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(27, 42, 155, 0.15); }
.burger { display: none; width: 42px; height: 42px; border: 0; background: var(--bg-alt); border-radius: 12px; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger span { width: 18px; height: 2px; background: var(--blue); border-radius: 2px; transition: 0.2s; }

/* Tugmalar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 18px; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(27, 42, 155, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(27, 42, 155, 0.36); }
.btn-primary:disabled { opacity: 0.7; cursor: wait; transform: none; }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 16px; white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 0; background: linear-gradient(180deg, #f1f6ff 0%, #fff 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; pointer-events: none; }
.b1 { width: 460px; height: 460px; background: #b9c6ff; top: -140px; right: -60px; }
.b2 { width: 380px; height: 380px; background: #9be6ee; bottom: -160px; left: -80px; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-vis { position: relative; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 14px; color: var(--blue); background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); margin: 22px 0 18px; font-weight: 700; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.facts { position: relative; list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li { background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); display: flex; align-items: baseline; gap: 14px; }
.facts b { font-size: 32px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.facts span { color: var(--muted); font-weight: 600; }

/* Boʻlimlar */
.sec { padding: 88px 0; }
.sec.alt { background: var(--bg-alt); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head h2, .lab h2, .appt h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.sec-head p { color: var(--muted); margin-top: 12px; font-size: 18px; }
.lead2 { color: var(--muted); font-size: 18px; margin-top: 14px; max-width: 520px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cdd7f2; }
.card h3 { font-size: 21px; margin-top: 6px; }
.card p { color: var(--muted); font-size: 16px; flex: 1; }
.more { font-weight: 700; color: var(--blue); text-decoration: none; font-size: 15px; margin-top: 6px; }
.more:hover { color: var(--teal); }
.ico-wrap { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, #e8edff, #dff5f8); color: var(--blue); display: grid; place-items: center; }
.ico-wrap .ic { width: 28px; height: 28px; }
.ico-wrap.sm { width: 48px; height: 48px; flex: none; background: #fff; box-shadow: var(--shadow); }

.lab { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { background: #fff; border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--blue); box-shadow: 0 2px 8px rgba(27, 42, 155, 0.05); }

.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px; text-align: center; box-shadow: var(--shadow); }
.avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.doc h3 { font-size: 19px; }
.doc p { color: var(--teal); font-weight: 700; margin-top: 6px; font-size: 15px; }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.why-i { display: flex; gap: 16px; align-items: flex-start; }
.why-i h3 { font-size: 18px; margin-bottom: 6px; }
.why-i p { color: var(--muted); font-size: 16px; }

/* Ariza formasi */
.appt { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.mini { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.mini li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--blue); }
.mini a { text-decoration: none; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 16px; color: var(--muted); }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { font: inherit; font-size: 18px; color: var(--ink); background: var(--bg-alt); border: 2px solid transparent; border-radius: 14px; padding: 13px 16px; width: 100%; transition: 0.2s; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.form input.bad { border-color: #e5484d; background: #fff6f6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 24px; font-weight: 600; }
.msg.ok { color: #12805c; background: #e6f7f0; padding: 14px 16px; border-radius: 14px; }
.msg.err { color: #b3262b; background: #fdecec; padding: 14px 16px; border-radius: 14px; }
.note { font-size: 15px; color: var(--muted); }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.c-item { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); color: var(--blue); }
.c-item b { color: var(--ink); display: block; margin-bottom: 4px; }
.c-item p { color: var(--muted); }
.c-item p a { text-decoration: none; font-weight: 600; color: var(--blue); }

.ftr { background: var(--blue-d); color: #cfd6ff; padding: 36px 0; font-size: 15px; }
.ftr-in { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
.ftr .muted { color: #9aa5e6; font-size: 13px; }
.staff { color: #cfd6ff; font-size: 13px; opacity: 0.8; }

.fab { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: var(--grad); color: #fff; place-items: center; box-shadow: 0 10px 26px rgba(27, 42, 155, 0.4); }

/* Paydo boʻlish animatsiyasi */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rv { opacity: 1; transform: none; transition: none; } .btn, .card { transition: none; } }
.no-js .rv { opacity: 1; transform: none; }

/* Telefon va planshet */
@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 980px) {
  .hero-in, .lab, .appt { grid-template-columns: 1fr; gap: 36px; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .facts li { flex-direction: column; gap: 2px; }
  .burger { display: flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 20px 18px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 17px; }
  .hdr-r { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .sec { padding: 60px 0; }
  .hero { padding: 40px 0 56px; }
  .hide-sm { display: none; }
  .logo { width: 150px; }
  .form { grid-template-columns: 1fr; padding: 22px; border-radius: 22px; }
  .fab { display: grid; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- Illyustratsiyalar va animatsiyalar ---------- */
.art { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art { max-width: 520px; margin-inline: auto; filter: drop-shadow(0 24px 40px rgba(27, 42, 155, 0.14)); }
.float { animation: floaty 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.f2 { animation-delay: -1.2s; animation-duration: 6s; }
.f3 { animation-delay: -2.4s; animation-duration: 5.5s; }
.f4 { animation-delay: -3.3s; animation-duration: 6.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.beat { animation: beat 1.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes beat { 0%, 100% { transform: translate(260px, 230px) scale(1); } 14% { transform: translate(260px, 230px) scale(1.07); } 28% { transform: translate(260px, 230px) scale(1); } 42% { transform: translate(260px, 230px) scale(1.05); } 56% { transform: translate(260px, 230px) scale(1); } }
.ring { transform-box: fill-box; transform-origin: center; animation: ring 3s ease-out infinite; opacity: 0; }
.r2 { animation-delay: 1.5s; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.7); opacity: 0; } }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.plus { animation: twinkle 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.p2 { animation-delay: -1s; } .p3 { animation-delay: -2s; }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(90deg); } }

/* Yurak urishi chizigʻi (EKG) */
.ecg { position: relative; margin-top: 36px; height: 64px; color: var(--teal); opacity: 0.8; overflow: hidden; }
.ecg svg { width: 100%; height: 100%; display: block; }
.ecg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 4.5s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* Yuguruvchi yoʻnalishlar lentasi */
.marquee { overflow: hidden; background: var(--blue-d); color: #dfe6ff; padding: 16px 0; white-space: nowrap; }
.marquee-in { display: inline-flex; gap: 0; animation: marquee 60s linear infinite; }
.marquee span { padding: 0 26px; font-size: 18px; position: relative; }
.marquee span::after { content: "✚"; position: absolute; right: -6px; color: var(--teal); font-size: 12px; top: 50%; transform: translateY(-50%); }
.marquee:hover .marquee-in { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Laboratoriya */
.lab-vis { display: grid; gap: 22px; justify-items: center; }
.lab-art { max-width: 340px; }
.lab-vis .tags { justify-content: center; }
.bub { animation: bubble 3.2s ease-in infinite; }
.b2 { animation-delay: -1s; } .b3 { animation-delay: -2s; }
@keyframes bubble { 0% { transform: translateY(14px); opacity: 0; } 20% { opacity: 0.9; } 100% { transform: translateY(-70px); opacity: 0; } }

/* Shifokor kartochkasi */
.avatar { position: relative; box-shadow: 0 10px 24px rgba(27, 42, 155, 0.25); }
.badge-ico { position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(27, 42, 155, 0.2); }
.badge-ico .ic { width: 18px; height: 18px; }
.doc { transition: transform 0.25s, box-shadow 0.25s; }
.doc:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.doc:hover .avatar { animation: beat-s 0.9s ease-in-out; }
@keyframes beat-s { 30% { transform: scale(1.1); } 60% { transform: scale(1); } }

/* Yoʻnalish kartochkalari: ikonkaga hover animatsiya */
.card .ico-wrap { transition: transform 0.3s, background 0.3s, color 0.3s; }
.card:hover .ico-wrap { transform: rotate(-6deg) scale(1.08); background: var(--grad); color: #fff; }

/* Ariza boʻlimi */
.appt-art { max-width: 280px; margin: 26px 0 0; }
.pulse-cell { animation: cellp 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes cellp { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tick 2.6s ease-in-out infinite; }
@keyframes tick { 0%, 20% { stroke-dashoffset: 1; } 50%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }

/* Galereya (site/photos ichiga rasm qoʻyilsa) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Qoʻshimcha paydo boʻlish effektlari */
.cards .rv:nth-child(2), .docs .rv:nth-child(2) { transition-delay: 0.08s; }
.cards .rv:nth-child(3), .docs .rv:nth-child(3) { transition-delay: 0.16s; }
.cards .rv:nth-child(4), .docs .rv:nth-child(4) { transition-delay: 0.24s; }
.hero-txt > * { animation: rise 0.8s ease both; }
.hero-txt > *:nth-child(2) { animation-delay: 0.08s; } .hero-txt > *:nth-child(3) { animation-delay: 0.16s; } .hero-txt > *:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .float, .beat, .ring, .spin-slow, .plus, .bub, .pulse-cell, .draw, .marquee-in, .hero-txt > * { animation: none !important; }
  .ecg path, .draw { stroke-dashoffset: 0; }
  .ring { opacity: 0.3; }
}
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-vis { order: -1; max-width: 380px; margin-inline: auto; }
  .facts { grid-template-columns: 1fr; margin-top: 28px; }
  .facts li { flex-direction: row; gap: 14px; }
  .appt-art { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .hero { padding-top: 24px; }
  .hero-vis { max-width: 300px; }
  .marquee span { font-size: 16px; }
}
