/*
Theme Name: AMCH Hospital
Theme URI: https://amchdemo.lovable.app/
Author: Ashiyan Medical College Hospital
Description: Custom hospital theme with Doctors, Departments, Services and an appointment request form. Converted from the Lovable demo site.
Version: 1.1.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: amch
*/

:root {
	--ink: #12303a;
	--muted: #4f6770;
	--primary: #0b6573;
	--primary-dark: #08424d;
	--tint: #eef6f6;
	--line: #d5e3e5;
	--alert: #c2372e;
	--white: #fff;
	--radius: 10px;
	--font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.65; background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.section { padding: 64px 0; }
.section--tint { background: var(--tint); }
.mt { margin-top: 32px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.3; transition: background .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--alert { background: var(--alert); color: #fff; }
.btn--alert:hover { background: #9f2a23; }
.btn--light { background: #fff; color: var(--primary-dark); }
.btn--light:hover { background: var(--tint); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary); color: #fff; }

/* Top bar + header */
.topbar { background: var(--primary-dark); color: #dcecee; font-size: 14px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar__in { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; flex-wrap: wrap; }
.topbar__emerg { font-weight: 700; color: #fff; }
.topbar__info { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0; }
.brand { text-decoration: none; color: var(--primary-dark); font-weight: 800; font-size: 20px; line-height: 1.2; max-width: 280px; }
.brand__logo { max-height: 56px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 24px; }
.primary-nav .menu { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.primary-nav .menu a { text-decoration: none; color: var(--ink); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.primary-nav .menu a:hover, .primary-nav .current-menu-item > a { border-color: var(--primary); color: var(--primary); }
.primary-nav__cta { display: flex; gap: 10px; }
.primary-nav__cta .btn { padding: 9px 18px; font-size: 15px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); }
.nav-toggle i { top: 21px; } .nav-toggle i::before { top: -7px; left: 0; right: 0; } .nav-toggle i::after { top: 7px; left: 0; right: 0; }

/* Hero */
.hero { background: linear-gradient(110deg, #08424d 0%, #0b6573 55%, #2a8f9a 100%) center/cover no-repeat; color: #fff; padding: 96px 0 88px; }
.hero__in { max-width: 720px; margin-inline: 0; margin-left: max(20px, calc((100% - 1160px) / 2)); }
.hero__kicker { font-weight: 600; margin-bottom: 10px; opacity: .9; }
.hero h1 { font-size: clamp(34px, 5.5vw, 58px); }
.hero__tag { font-size: clamp(19px, 2.4vw, 25px); font-weight: 600; margin-bottom: 8px; }
.hero__sub { max-width: 560px; opacity: .92; }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Quick links */
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: -34px; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(8,66,77,.1); overflow: hidden; }
.quick a { padding: 20px 22px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.quick a:last-child { border-right: 0; }
.quick a:hover { background: var(--tint); }
.quick strong { color: var(--primary-dark); }
.quick span { font-size: 14px; color: var(--muted); }

/* Bands */
.band { padding: 36px 0; color: #fff; margin-top: 56px; }
.band--alert { background: var(--alert); }
.band--primary { background: var(--primary-dark); margin-top: 0; }
.band__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.band h2 { margin-bottom: 4px; } .band p { margin: 0; opacity: .92; }
.band__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section__title { font-size: clamp(26px, 3.4vw, 36px); color: var(--primary-dark); }
.section__lead { color: var(--muted); max-width: 640px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head .section__lead { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 28px; }
.facts > div { border-top: 3px solid var(--primary); padding-top: 14px; }
.facts h3 { font-size: 19px; } .facts p { color: var(--muted); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ph { aspect-ratio: 4/3; background: linear-gradient(135deg, #cfe5e8, #e8f2f3); border-radius: var(--radius); }
.split__img img, .profile__photo img { border-radius: var(--radius); width: 100%; }
.map { width: 100%; min-height: 320px; border: 0; border-radius: var(--radius); }
.finder { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.steps { margin: 0; padding-left: 22px; font-weight: 600; color: var(--primary-dark); }
.steps li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }

/* Cards & grids */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 19px; color: var(--primary-dark); }
.card p { color: var(--muted); margin: 0; }
.card--link { text-decoration: none; transition: border-color .15s, transform .15s; }
.card--link:hover { border-color: var(--primary); transform: translateY(-2px); }
.card--doctor { text-decoration: none; padding: 0 0 18px; overflow: hidden; text-align: left; }
.card--doctor h3, .card--doctor p { padding-inline: 18px; }
.card--doctor h3 { margin-top: 14px; margin-bottom: 4px; }
.doctor__photo { width: 100%; aspect-ratio: 10/7; object-fit: cover; }
.doctor__photo--ph { display: flex; align-items: center; justify-content: center; background: #d9ebee; color: var(--primary); font-size: 56px; font-weight: 700; }
.doctor__role { color: var(--ink) !important; font-weight: 600; font-size: 15px; }
.doctor__dept { font-size: 14px; }

/* Inner pages */
.page-head { background: var(--tint); border-bottom: 1px solid var(--line); padding: 42px 0 34px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); color: var(--primary-dark); margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); }
.page-head--alert { background: #fbeceb; }
.crumb { font-size: 14px; margin-bottom: 6px !important; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin-bottom: 1em; }
.post-item { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.facts-list { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 24px; }
.facts-list dt { font-weight: 700; color: var(--primary-dark); } .facts-list dd { margin: 0; }
.filter { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; margin-bottom: 32px; }
.empty { background: var(--tint); padding: 20px; border-radius: var(--radius); }
.pagination { margin-top: 28px; } .pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.contact-cards { display: grid; gap: 14px; }

/* Forms */
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], select, textarea { width: 100%; padding: 11px 14px; border: 1px solid #b7cbce; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.appt { max-width: 760px; margin-top: 24px; }
.appt label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.appt__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.notice { max-width: 760px; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.notice--ok { background: #e3f4e8; color: #17562b; border: 1px solid #a9d9b8; }
.notice--err { background: #fbeceb; color: #8a231c; border: 1px solid #efb7b3; }

/* Footer */
.site-footer { background: #0a2c35; color: #c3d6da; padding-top: 52px; }
.site-footer a { color: #e6f2f4; text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; }
.footer__name { color: #fff; font-weight: 700; font-size: 18px; }
.site-footer h3 { color: #fff; font-size: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; } .site-footer li { margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding: 18px 0; font-size: 14px; }

/* Responsive */
@media (max-width: 1000px) {
	.grid--4, .facts { grid-template-columns: repeat(2, 1fr); }
	.quick { grid-template-columns: repeat(2, 1fr); }
	.quick a { border-bottom: 1px solid var(--line); }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.nav-toggle { display: block; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 16px 20px 22px; gap: 16px; }
	.primary-nav.is-open { display: flex; }
	.primary-nav .menu { flex-direction: column; gap: 6px; }
}
@media (max-width: 720px) {
	.section { padding: 44px 0; }
	.grid--4, .grid--3, .facts, .split, .finder, .profile, .appt__row, .filter, .footer__grid { grid-template-columns: 1fr; }
	.quick { grid-template-columns: 1fr; margin-top: -24px; }
	.hero { padding: 64px 0; }
	.hero__in { margin-left: 20px; margin-right: 20px; }
	.facts-list { grid-template-columns: 1fr; }
	.topbar__info span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== v1.1 additions ===== */
.brand__logo { height: 56px; width: auto; max-width: 260px; object-fit: contain; }
.hero { min-height: 520px; display: flex; align-items: center; background-size: cover; background-position: center; }
.hero__in { width: 100%; }

/* Dropdown menu */
.primary-nav .menu > li { position: relative; }
.primary-nav .sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; left: -12px; top: 100%; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px rgba(8,66,77,.14); display: none; z-index: 60; }
.primary-nav .menu > li:hover > .sub-menu, .primary-nav .menu > li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { display: block; padding: 8px 16px; border: 0; white-space: nowrap; }
.primary-nav .sub-menu a:hover { background: var(--tint); }
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; vertical-align: -2px; }

/* Appointment wizard */
.wizard-wrap { max-width: 920px; }
.wizard-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 28px; padding: 0; counter-reset: none; }
.wizard-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 0; border-bottom: 3px solid var(--line); }
.wizard-steps li span { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.wizard-steps li.is-current { color: var(--primary-dark); border-color: var(--primary); }
.wizard-steps li.is-current span, .wizard-steps li.is-done span { background: var(--primary); color: #fff; }
.wizard-steps li.is-done { border-color: var(--primary); }
.wstep { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.wstep[hidden] { display: none; }
.wstep legend { font-size: 22px; font-weight: 700; color: var(--primary-dark); margin-bottom: 16px; padding: 0; }
.is-wizard:not(.x) .wstep:not([hidden]) + .wstep { margin-top: 0; }
form.wizard:not(.is-wizard) .wstep { margin-bottom: 36px; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice-grid--slots { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice[hidden] { display: none; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice > span { display: block; border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; transition: border-color .15s, background .15s; }
.choice strong { display: block; color: var(--primary-dark); }
.choice small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.choice input:checked + span { border-color: var(--primary); background: var(--tint); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input:focus-visible + span { outline: 3px solid #f2a900; outline-offset: 2px; }
.label { font-weight: 600; margin: 18px 0 8px; font-size: 15px; }
.wizard label[for], .wizard .appt label { font-weight: 600; font-size: 15px; display: block; margin-bottom: 4px; }
.wizard .appt__row { margin-bottom: 4px; }
.appt__row--tight { grid-template-columns: 1fr 1.4fr; gap: 12px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 12px; }
.review { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; background: var(--tint); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; }
.review dt { font-weight: 700; color: var(--primary-dark); } .review dd { margin: 0; overflow-wrap: anywhere; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.wizard-error { background: #fbeceb; color: #8a231c; border: 1px solid #efb7b3; border-radius: 8px; padding: 10px 14px; font-weight: 500; margin: 16px 0 0; }
.wizard-error[hidden], [hidden] { display: none !important; }
.wizard-nav { display: flex; gap: 12px; margin-top: 22px; }
.success { max-width: 680px; margin: 0 auto; background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.success h2 { color: var(--primary-dark); }
.success__ref { font-size: 20px; }
.success__ref strong { background: #fff; border: 2px dashed var(--primary); border-radius: 8px; padding: 2px 12px; margin-left: 6px; letter-spacing: .04em; }
.success__next { padding-left: 22px; } .success__next li { margin-bottom: 6px; }
.success__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Detail pages */
.detail { display: grid; grid-template-columns: 1fr 330px; gap: 48px; align-items: start; }
.detail__side { display: grid; gap: 18px; position: sticky; top: 100px; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.side-card h3 { font-size: 18px; color: var(--primary-dark); }
.side-card p:last-child { margin-bottom: 0; }
.side-card--primary { background: var(--primary-dark); border-color: var(--primary-dark); color: #e6f2f4; }
.side-card--primary h3 { color: #fff; }
.side-list { list-style: none; margin: 0; padding: 0; } .side-list li { padding: 6px 0; border-bottom: 1px solid var(--line); } .side-list li:last-child { border: 0; }
.side-list a { text-decoration: none; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px; border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: rotate(-45deg); }
.card__meta { margin-top: 12px !important; font-weight: 600; color: var(--primary) !important; font-size: 14px; }

@media (max-width: 1000px) {
	.detail { grid-template-columns: 1fr; } .detail__side { position: static; }
	.primary-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.primary-nav .menu-item-has-children > a::after { display: none; }
}
@media (max-width: 720px) {
	.wizard-steps li { font-size: 0; gap: 0; justify-content: center; } .wizard-steps li span { font-size: 13px; }
	.choice-grid, .choice-grid--slots, .appt__row--tight { grid-template-columns: 1fr; }
	.review { grid-template-columns: 1fr; gap: 2px; } .review dd { margin-bottom: 8px; }
	.wizard-nav .btn { flex: 1; }
	.hero { min-height: 420px; }
}
@media print { .topbar, .site-header, .site-footer, .success__btns { display: none; } }
