:root {
  --color-primary: #534EB4;
  --color-primary-dark: #3F3A96;
  --color-primary-light: #7470D2;
  --color-accent-blue: #3169FA;
  --color-sky-soft: #EAF2FF;
  --color-bg: #F7F9FC;
  --color-white: #FFFFFF;
  --color-text: #243044;
  --color-heading: #172033;
  --color-muted: #6F7B8F;
  --color-soft-text: #526075;
  --color-border: #E5EAF3;
  --color-success: #12B76A;
  --color-warning: #F79009;
  --color-danger: #F04438;
  --font-sans: "Nunito Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-family: var(--font-sans); }
body { margin: 0; font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
button, input, select, textarea, table { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p { margin-top: 0; font-family: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--color-heading); font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; letter-spacing: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.15; letter-spacing: 0; }
h3 { line-height: 1.24; font-weight: 700; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.narrow { max-width: 780px; }
.section { padding: 96px 0; }
.compact { padding: 42px 0; }
.tint { background: var(--color-white); }
.lead { font-size: 1.1rem; color: var(--color-soft-text); max-width: 680px; }
.eyebrow { color: var(--color-primary-dark); text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.strong { color: var(--color-primary); font-weight: 600; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--color-border); backdrop-filter: blur(16px); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--color-heading); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--color-primary), var(--color-accent-blue)); transition: transform .25s ease, box-shadow .25s ease; }
.brand-logo { width: auto; height: 42px; max-width: 170px; object-fit: contain; display: block; }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); box-shadow: 0 12px 26px rgba(83,78,180,.24); }
.nav-links { display: flex; gap: 22px; align-items: center; margin-left: auto; color: var(--color-muted); font-weight: 600; }
.nav-links a:hover { color: var(--color-primary); }
.nav-toggle { display: none; border: 0; background: var(--color-sky-soft); color: var(--color-primary); padding: 10px 14px; border-radius: 999px; font-weight: 700; }
.nav-cta { margin-left: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { position: relative; overflow: hidden; background: var(--color-primary); color: white; box-shadow: 0 14px 30px rgba(83,78,180,.25); }
.btn-primary:after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); transition: transform .6s ease; }
.btn-primary:hover:after { transform: translateX(120%); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: white; color: var(--color-primary); border-color: rgba(83,78,180,.22); }
.btn-light { background: white; color: var(--color-primary); }
.text-link { color: var(--color-primary); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero { padding: 82px 0 70px; background: linear-gradient(180deg, white 0%, var(--color-bg) 100%); overflow: hidden; }
.hero-grid, .two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.hero-copy h1 { max-width: 720px; }
.hero-visual { position: relative; min-height: 460px; border-radius: 42px 42px 42px 120px; background: linear-gradient(135deg, var(--color-sky-soft), #f5efff); padding: 26px; box-shadow: 0 30px 80px rgba(49,105,250,.16); animation: softFloat 7s ease-in-out infinite; }
.hero-visual img { width: 100%; height: 410px; object-fit: cover; border-radius: 34px 34px 34px 100px; }
.clinic-illustration { height: 410px; display: grid; place-items: center; text-align: center; border-radius: 34px 34px 34px 100px; background: radial-gradient(circle at 25% 20%, #fff 0 20%, transparent 21%), linear-gradient(135deg, var(--color-primary), var(--color-accent-blue)); color: white; padding: 28px; }
.clinic-illustration strong { font-size: 2rem; }
.tooth-shape { display: grid; place-items: center; width: 108px; height: 108px; margin-bottom: 18px; border-radius: 40px 40px 70px 70px; background: white; color: var(--color-primary); font-size: 3rem; font-weight: 700; animation: gentlePulse 3.4s ease-in-out infinite; }
.trust-badge { position: absolute; right: -12px; bottom: 42px; background: white; border-radius: 26px; padding: 18px 22px; box-shadow: 0 18px 50px rgba(16,24,40,.14); animation: badgeFloat 4.8s ease-in-out infinite; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat-badge { min-height: 128px; display: grid; place-items: center; text-align: center; border-radius: 999px; background: white; border: 1px solid var(--color-border); box-shadow: 0 16px 40px rgba(16,24,40,.06); }
.stat-badge strong { font-size: 2rem; color: var(--color-primary); }
.stat-badge span { color: var(--color-muted); font-weight: 600; }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.feature-grid, .card-grid { display: grid; gap: 22px; }
.feature-grid { grid-template-columns: repeat(5, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }
.four { grid-template-columns: repeat(4, 1fr); }
.card, .feature-item, .panel, .staff-card { background: white; border: 1px solid var(--color-border); border-radius: 24px; padding: 24px; box-shadow: 0 18px 50px rgba(16,24,40,.06); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.feature-item { overflow: hidden; padding: 0; }
.feature-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, var(--color-sky-soft), #F8F3FF); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.feature-media:after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0) 45%, rgba(255,255,255,.78) 100%); pointer-events: none; }
.feature-media-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--color-primary); font-size: 1.2rem; font-weight: 700; }
.feature-content { padding: 22px 24px 24px; }
.feature-item:hover .feature-media img { transform: scale(1.055); }
.card:hover, .feature-item:hover, .staff-card:hover { transform: translateY(-6px); border-color: rgba(83,78,180,.24); box-shadow: 0 24px 60px rgba(16,24,40,.1); }
.service-card, .blog-card, .doctor-card { min-height: 100%; }
.icon-bubble { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--color-primary); background: var(--color-sky-soft); font-weight: 700; margin-bottom: 18px; transition: transform .25s ease, background .25s ease; }
.service-icon { overflow: hidden; padding: 0; }
.service-icon img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .icon-bubble, .feature-item:hover .icon-bubble { transform: scale(1.08) rotate(-3deg); background: #eef0ff; }
.card p, .feature-item p { color: var(--color-soft-text); }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--color-muted); font-size: .9rem; margin: 18px 0; }
.doctor-photo, .doctor-profile-image { background: linear-gradient(135deg, var(--color-sky-soft), #f7efff); border-radius: 24px; display: grid; place-items: center; overflow: hidden; color: var(--color-primary); font-size: 3rem; font-weight: 700; }
.doctor-photo { aspect-ratio: 1 / .85; margin-bottom: 18px; }
.doctor-photo img, .doctor-profile-image img { width: 100%; height: 100%; object-fit: cover; }
.doctor-profile-image { min-height: 390px; border-radius: 38px; }
.roster-section { background: linear-gradient(180deg, #FFFFFF 0%, var(--color-bg) 100%); }
.roster-list { display: grid; gap: 14px; }
.roster-row { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) auto; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--color-border); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 18px 45px rgba(16,24,40,.06); transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.roster-row:hover { transform: translateY(-4px); border-color: rgba(83,78,180,.22); box-shadow: 0 24px 60px rgba(16,24,40,.09); }
.roster-doctor { display: flex; align-items: center; gap: 14px; min-width: 0; }
.roster-doctor h3 { margin-bottom: 2px; font-size: 1.1rem; }
.roster-doctor p { margin-bottom: 0; color: var(--color-soft-text); }
.roster-avatar { width: 66px; height: 66px; flex: 0 0 66px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--color-sky-soft), #F7F1FF); color: var(--color-primary); font-size: 1.35rem; font-weight: 700; }
.roster-avatar img { width: 100%; height: 100%; object-fit: cover; }
.roster-time { display: grid; gap: 3px; padding: 12px 16px; border-radius: 18px; background: var(--color-sky-soft); color: var(--color-soft-text); }
.roster-time span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--color-primary-dark); }
.roster-time strong { color: var(--color-heading); font-weight: 700; line-height: 1.35; }
.stars { color: var(--color-warning); margin-bottom: 12px; }
.cta-banner { position: relative; overflow: hidden; margin: 20px 0 80px; display: flex; justify-content: space-between; gap: 24px; align-items: center; border-radius: 34px; padding: 44px; color: white; background: linear-gradient(135deg, var(--color-primary), var(--color-accent-blue)); box-shadow: 0 22px 70px rgba(83,78,180,.28); }
.cta-banner:before { content: ""; position: absolute; inset: -40% auto auto -20%; width: 42%; height: 180%; transform: rotate(18deg); background: rgba(255,255,255,.14); animation: ctaSweep 8s ease-in-out infinite; }
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: white; }
.cta-banner .eyebrow { color: white; opacity: .85; }
.contact-strip { background: var(--color-primary-dark); color: white; padding: 22px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; font-weight: 700; }

.page-hero { padding: 88px 0 56px; background: linear-gradient(180deg, white, var(--color-bg)); }
.detail-image { min-height: 340px; border-radius: 36px; display: grid; place-items: center; background: var(--color-sky-soft); overflow: hidden; color: var(--color-primary); font-size: 5rem; font-weight: 700; }
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; align-items: start; }
.detail-layout article { background: white; border-radius: 28px; padding: 34px; border: 1px solid var(--color-border); }
.sticky-card { position: sticky; top: 100px; }
.check-list { padding-left: 0; list-style: none; }
.check-list li { margin: 10px 0; padding-left: 30px; position: relative; }
.check-list li:before { content: "✓"; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }
.step-list li { margin-bottom: 12px; }
details { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 18px; padding: 16px 18px; margin: 12px 0; }
summary { color: var(--color-heading); font-weight: 700; cursor: pointer; }
.filter-row, .search-form, .staff-filter { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-row a { padding: 10px 16px; border-radius: 999px; background: white; border: 1px solid var(--color-border); color: var(--color-muted); font-weight: 600; transition: transform .2s ease, background .2s ease, color .2s ease; }
.filter-row a:hover { transform: translateY(-2px); color: var(--color-primary); }
.filter-row a.active { background: var(--color-primary); color: white; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid figure { margin: 0; background: white; border-radius: 24px; overflow: hidden; border: 1px solid var(--color-border); }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-grid figcaption { padding: 14px 16px; color: var(--color-heading); font-weight: 700; }
.gallery-grid figcaption span { display: block; color: var(--color-muted); font-weight: 500; }
.article-image { width: 100%; max-height: 460px; object-fit: cover; border-radius: 34px; margin-bottom: 42px; }
.article-body { background: white; border: 1px solid var(--color-border); border-radius: 28px; padding: 36px; font-size: 1.08rem; }
.prose { background: white; border-radius: 28px; padding: 34px; border: 1px solid var(--color-border); }

.form-shell { max-width: 860px; }
.form-card { border-color: #E8EEF7; background: linear-gradient(180deg, #FFFFFF 0%, #FCFDFF 100%); box-shadow: 0 18px 55px rgba(83,78,180,.08); }
.form-card label, .cms-form label, .panel form label, .login-panel label { display: grid; gap: 8px; color: var(--color-soft-text); font-size: .96rem; font-weight: 600; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid label:has(textarea), .check-field { grid-column: 1 / -1; }
.input, input, select, textarea { width: 100%; border: 1px solid #DDE6F2; border-radius: 16px; padding: 13px 15px; font-family: inherit; font-size: 1rem; font-weight: 400; line-height: 1.45; background: #FBFDFF; color: var(--color-text); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
input:focus, select:focus, textarea:focus, .input:focus { outline: none; border-color: var(--color-primary-light); box-shadow: 0 0 0 4px rgba(83,78,180,.12); }
textarea { resize: vertical; }
.checkbox, input[type="checkbox"] { width: auto; min-width: 18px; height: 18px; accent-color: var(--color-primary); }
.check-field { display: flex !important; align-items: flex-start; gap: 10px; color: var(--color-soft-text); font-weight: 500 !important; line-height: 1.5; }
.check-field input { margin-top: 3px; }
.errorlist { color: var(--color-danger); margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.map-box { min-height: 290px; border-radius: 24px; background: var(--color-sky-soft); display: grid; place-items: center; overflow: hidden; color: var(--color-muted); font-weight: 600; }
.map-box iframe { width: 100%; height: 320px; border: 0; }
.align-start { align-items: start; }

.site-footer { background: #101828; color: white; padding: 64px 0 24px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,.75); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; }
.footer-brand { color: white; margin-bottom: 16px; }
.footer-brand .brand-logo { background: white; border-radius: 12px; padding: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; color: rgba(255,255,255,.58); }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.message-stack { padding-top: 18px; }
.alert { padding: 14px 18px; background: white; border: 1px solid var(--color-border); border-left: 5px solid var(--color-primary); border-radius: 14px; margin-bottom: 10px; }
.alert.success { border-left-color: var(--color-success); }
.alert.error { border-left-color: var(--color-danger); }
.whatsapp-float { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--color-success); font-weight: 700; box-shadow: 0 18px 40px rgba(18,183,106,.32); z-index: 30; animation: whatsappPulse 2.8s ease-in-out infinite; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, var(--color-sky-soft), white 55%, #f7efff); }
.login-panel { width: min(440px, 100%); background: white; border: 1px solid var(--color-border); border-radius: 30px; padding: 34px; box-shadow: 0 24px 70px rgba(16,24,40,.12); }
.staff-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; background: var(--color-bg); }
.staff-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px; background: white; border-right: 1px solid var(--color-border); }
.staff-sidebar nav { display: grid; gap: 6px; margin-top: 28px; }
.staff-sidebar nav a { padding: 11px 13px; border-radius: 14px; color: var(--color-muted); font-weight: 600; }
.staff-sidebar nav a:hover { background: var(--color-sky-soft); color: var(--color-primary); }
.staff-main { min-width: 0; }
.staff-topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 34px; background: white; border-bottom: 1px solid var(--color-border); }
.staff-topbar h1 { font-size: 2rem; margin-bottom: 0; }
.staff-content { padding: 34px; }
.staff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.staff-card span { color: var(--color-muted); font-weight: 600; }
.staff-card strong { display: block; font-size: 2.2rem; color: var(--color-primary); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.staff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.row-link { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.row-link em { font-style: normal; color: var(--color-muted); }
.table-wrap { overflow-x: auto; }
.staff-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.staff-table th, .staff-table td { padding: 14px; text-align: left; border-bottom: 1px solid var(--color-border); }
.staff-table th { color: var(--color-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: 0; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--color-sky-soft); color: var(--color-accent-blue); }
.badge.confirmed, .badge.completed, .badge.published { background: #E8F8EF; color: var(--color-success); }
.badge.cancelled, .badge.no_show { background: #FEECEB; color: var(--color-danger); }
.badge.contacted, .badge.rescheduled, .badge.draft { background: #FFF4E5; color: var(--color-warning); }
.pagination { display: flex; justify-content: center; gap: 18px; padding-top: 24px; font-weight: 600; }

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

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes badgeFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-6px, -8px, 0); }
}

@keyframes ctaSweep {
  0%, 45% { transform: translateX(0) rotate(18deg); }
  70%, 100% { transform: translateX(360%) rotate(18deg); }
}

@keyframes whatsappPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 40px rgba(18,183,106,.32); }
  50% { transform: scale(1.05); box-shadow: 0 22px 52px rgba(18,183,106,.42); }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links { display: none; position: absolute; left: 16px; right: 16px; top: 78px; padding: 18px; background: white; border: 1px solid var(--color-border); border-radius: 20px; box-shadow: 0 20px 60px rgba(16,24,40,.12); }
  .nav-links.is-open { display: grid; }
  .nav-cta { display: none; }
  .hero-grid, .two-col, .detail-layout, .footer-grid, .staff-grid, .roster-row { grid-template-columns: 1fr; }
  .feature-grid, .three, .four, .gallery-grid, .stat-row, .strip-grid, .staff-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { min-height: auto; }
  .section { padding: 70px 0; }
  .staff-body { grid-template-columns: 1fr; }
  .staff-sidebar { position: static; height: auto; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1180px); }
  .feature-grid, .three, .four, .gallery-grid, .stat-row, .strip-grid, .staff-stats, .form-grid { grid-template-columns: 1fr; }
  .section-head.split, .cta-banner, .staff-topbar { align-items: flex-start; flex-direction: column; }
  .hero { padding-top: 56px; }
  .hero-visual, .hero-visual img, .clinic-illustration { border-radius: 28px; }
  .cta-banner { padding: 30px; }
  .staff-content, .staff-topbar { padding: 22px; }
}
