/* Tamanash Eye Foundation — shared public interface stylesheet */
:root {
  --ink: #172a3a;
  --muted: #5f7180;
  --brand: #087f8c;
  --brand-dark: #075b66;
  --accent: #e59b35;
  --surface: #ffffff;
  --surface-soft: #f3f8f9;
  --line: #dce7e9;
  --shadow: 0 14px 34px rgba(23, 42, 58, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%; margin: 0; color: var(--ink);
  background: var(--surface-soft); font: 16px/1.65 "Segoe UI", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover, a:focus { color: var(--brand); text-decoration: underline; }

/* Shared navigation */
.sidenav, .sidenavSchool {
  height: 100%; width: 0; position: fixed; z-index: 30; top: 0; left: 0;
  overflow-x: hidden; padding: 76px 0 30px; background: #123341;
  box-shadow: 10px 0 30px rgba(0, 0, 0, .22); transition: width .28s ease;
}
.sidenav a, .sidenavSchool a {
  display: block; padding: 11px 28px; color: #eaf6f7; font-size: 16px;
  line-height: 1.35; transition: background-color .18s ease, color .18s ease;
}
.sidenav a:hover, .sidenav a:focus, .sidenavSchool a:hover, .sidenavSchool a:focus {
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none;
}
.sidenav .closebtn, .sidenavSchool .closebtn {
  position: absolute; top: 13px; right: 17px; padding: 0; color: #fff; font-size: 36px;
}

/* Public master page */
.site-shell { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(243,248,249,.92), #fff 340px); }
.site-header { display: flex; align-items: center; gap: 18px; min-height: 78px; padding: 11px clamp(18px, 5vw, 72px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(23,42,58,.06); }
.menu-button { width: 43px; height: 43px; border: 0; border-radius: 50%; padding: 0; background: var(--brand); color: #fff; cursor: pointer; font-size: 24px; line-height: 1; transition: background .2s, transform .2s; }
.menu-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.site-brand { flex: 1; text-align: center; }
.site-brand img { width: min(290px, 60vw); max-height: 52px; object-fit: contain; vertical-align: middle; }
.site-mark { width: 48px; height: 48px; object-fit: contain; }
.site-main { width: min(1120px, calc(100% - 32px)); flex: 1; margin: 30px auto; }
.school-main { margin-top: 24px; }
.school-banner { display: block; width: 100%; max-height: 260px; margin: 0 auto 24px; border-radius: 16px; object-fit: cover; object-position: center; box-shadow: 0 6px 18px rgba(23,42,58,.1); }
.site-footer { padding: 18px 24px; color: #dceff0; background: #123341; text-align: center; font-size: 13px; }
.site-footer a { color: #fff; margin: 0 4px; }
.site-footer .footer-address { margin-bottom: 7px; color: #a9d7d9; font-size: 14px; font-weight: 600; }

/* Home */
.home-hero { max-width: 830px; margin: 16px auto 34px; text-align: center; }
.home-eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.home-hero h1 { margin: 0; color: var(--ink); font-size: clamp(30px, 5vw, 52px); line-height: 1.14; letter-spacing: -.035em; }
.home-hero p { max-width: 650px; margin: 14px auto 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 940px; margin: 0 auto; }
.home-action { display: flex; align-items: center; justify-content: center; min-height: 142px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 3px 13px rgba(23,42,58,.06); transition: transform .2s, box-shadow .2s, border-color .2s; }
.home-action:hover, .home-action:focus { border-color: #9ccfd3; box-shadow: var(--shadow); transform: translateY(-4px); text-decoration: none; }
.home-action img { width: min(100%, 215px); max-height: 96px; object-fit: contain; }

/* Shared content and legacy control compatibility */
.mainContent, .pageContentPanel, .mobileLabelSmall, .mobileLabelLarge, #main {
  display: block; max-width: 900px; margin: 0 auto; padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.96); box-shadow: 0 4px 16px rgba(23,42,58,.06);
}
.mainContent, .pageContentPanel, #main { font-size: 17px; }
.pageContentPanel { margin-bottom: 24px; text-align: left; }
.labelHeader, .pageHeader { color: var(--ink); font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
.labelLarge { font-size: 17px; }
.labelSmall, .labelSmaller { font-size: 14px; color: var(--muted); }
.mobileLabelSmaller, .pageFooter { font-size: 13px; color: var(--muted); }
.mobileButton { color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.errorText, .validationError { color: #b42318; font-weight: 600; }
.textBox, input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea, select {
  max-width: 100%; padding: 10px 12px; border: 1px solid #b9ced2; border-radius: 8px; background: #fff; color: var(--ink); font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(8,127,140,.18); border-color: var(--brand); }
.buttonTeal, .buttonBlue, .myButton_deepblue, input[type="submit"], button {
  display: inline-block; padding: 11px 19px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: 700 16px "Segoe UI", Arial, sans-serif; cursor: pointer; transition: background .2s, transform .2s;
}
.buttonTeal:hover, .buttonBlue:hover, .myButton_deepblue:hover, input[type="submit"]:hover, button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.images { display: block; width: min(100%, 680px); margin: 20px auto; border-radius: 12px; }
.mobileImages { vertical-align: middle; }

/* Disease guides */
.disease-article { max-width: 900px; margin: 0 auto; padding: clamp(22px, 4vw, 46px); border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.disease-article h1 { margin: 0 0 10px; font-size: clamp(31px, 5vw, 46px); line-height: 1.12; letter-spacing: -.035em; }
.disease-article h2 { margin: 34px 0 10px; color: var(--brand-dark); font-size: clamp(21px, 3vw, 28px); line-height: 1.25; }
.disease-article h3 { margin: 22px 0 6px; font-size: 18px; }
.disease-article p, .disease-article li { font-size: 17px; }
.disease-article ul { padding-left: 24px; }
.article-intro { max-width: 690px; margin: 0; color: var(--muted); font-size: 19px !important; }
.article-visual { display: block; width: 100%; margin: 26px 0 30px; border-radius: 13px; box-shadow: 0 10px 24px rgba(23,42,58,.13); }
.article-figure { margin: 28px 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #f8fbfb; }
.article-figure img { display: block; width: 100%; height: auto; }
.article-figure figcaption { padding: 11px 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.article-sources { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.article-sources h2 { margin-top: 0; font-size: 18px; }
.treatment-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 25px 0; counter-reset: cxl-step; }
.treatment-step { position: relative; min-height: 154px; padding: 45px 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; color: var(--muted); font-size: 14px; }
.treatment-step::before { content: counter(cxl-step); counter-increment: cxl-step; position: absolute; top: 12px; left: 14px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.treatment-step strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.treatment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.treatment-card { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; }
.treatment-card h3 { margin-top: 0; color: var(--brand-dark); }
.profile-intro { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 26px; align-items: center; margin-bottom: 30px; }
.profile-intro h1 { margin: 0 0 8px; }
.profile-intro p { margin: 0; color: var(--muted); font-size: 18px; }
.profile-intro img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.achievement-list { margin: 18px 0; padding: 0; list-style: none; counter-reset: achievement; }
.achievement-list[start="7"] { counter-reset: achievement 6; }
.achievement-list li { position: relative; margin: 0 0 12px; padding: 15px 16px 15px 54px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfb; }
.achievement-list li::before { content: counter(achievement); counter-increment: achievement; position: absolute; top: 15px; left: 15px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.patent-montage { display: block; width: 100%; margin: 24px 0; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.staff-hero { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(24px, 5vw, 48px); align-items: center; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.staff-portrait { width: 100%; aspect-ratio: 1 / 1.12; border-radius: 16px; object-fit: cover; object-position: center top; box-shadow: var(--shadow); }
.staff-eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 14px !important; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.staff-hero h1 { margin: 0; font-size: clamp(31px, 5vw, 47px); line-height: 1.08; letter-spacing: -.035em; }
.staff-role { margin: 8px 0 16px !important; color: var(--brand-dark) !important; font-size: 19px !important; font-weight: 700; }
.staff-summary { margin: 0; color: var(--muted); font-size: 17px !important; }
.staff-section { margin-top: 36px; }
.staff-section h2 { margin: 0 0 12px; color: var(--brand-dark); font-size: clamp(22px, 3vw, 29px); }
.staff-section p, .staff-section li { font-size: 16px; }
.staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.staff-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfb; }
.staff-card img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: center top; }
.staff-card div { padding: 18px; }
.staff-card h3 { margin: 0 0 5px; color: var(--ink); font-size: 19px; }
.staff-card p { margin: 0; color: var(--muted); }
.publication-list { margin: 0; padding-left: 22px; }
.publication-list li { margin-bottom: 12px; }

/* Service directory */
.services-intro { max-width: 710px; margin-bottom: 30px; }
.services-intro h1 { margin: 0 0 10px; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.035em; }
.services-intro p { margin: 0; color: var(--muted); font-size: 18px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.service-card { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(23,42,58,.06); }
.service-card h2 { margin: 0 0 10px; color: var(--brand-dark); font-size: 22px; line-height: 1.25; }
.service-card p { margin: 0 0 14px; color: var(--muted); }
.service-card ul { margin: 0; padding-left: 20px; }
.service-card li { margin-bottom: 6px; }
.service-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; padding: 20px 24px; border-radius: 14px; background: #123341; color: #fff; }
.service-cta p { margin: 0; font-size: 17px; font-weight: 600; }
.service-cta a { flex: 0 0 auto; padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--brand-dark); font-weight: 800; }
.service-cta a:hover { background: #e4f4f4; text-decoration: none; }
.article-callout { margin: 24px 0; padding: 18px 20px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: #fff8ed; }
.article-callout strong { color: #7a4a0d; }
.article-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; text-align: center; }
.article-nav a:hover, .article-nav a:focus { background: var(--brand-dark); color: #fff; text-decoration: none; }
.article-note { margin-top: 28px; color: var(--muted); font-size: 13px !important; }

/* Article and educational pages */
table { max-width: 100%; }
#main { width: min(100%, 920px); border-collapse: separate; border-spacing: 0; }
#main td { padding: 10px; }
#main img { max-width: 100%; height: auto; }
.transparentBlack, .auto-style1 { background: #123341 !important; color: #fff; }

@media (max-width: 720px) {
  .site-header { position: sticky; top: 8px; z-index: 25; min-height: 68px; margin: 8px 10px 0; padding: 9px 16px; gap: 11px; border: 1px solid rgba(220,231,233,.9); border-radius: 16px; box-shadow: 0 8px 24px rgba(23,42,58,.14); }
  .site-brand img { max-height: 40px; }
  .site-mark { width: 38px; height: 38px; }
  .site-main { width: min(100% - 24px, 1120px); margin: 18px auto; }
  .school-main { margin-top: 18px; }
  .school-banner { max-height: 165px; margin-bottom: 18px; border-radius: 12px; }
  .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-action { min-height: 132px; padding: 13px; border-radius: 12px; overflow: hidden; }
  .home-action img { width: min(100%, 225px); max-height: none; transform: scale(1.15); }
  .mainContent, .pageContentPanel, .mobileLabelSmall, .mobileLabelLarge, #main { padding: 18px; border-radius: 11px; }
  .mainContent, .pageContentPanel, #main { font-size: 16px; }
  .disease-article { padding: 23px 19px; border-radius: 12px; }
  .disease-article p, .disease-article li { font-size: 16px; }
  .article-visual { margin: 19px 0 25px; border-radius: 9px; }
  .article-figure { margin: 22px 0; border-radius: 9px; }
  .treatment-steps, .treatment-grid { grid-template-columns: 1fr; }
  .treatment-step { min-height: 0; }
  .profile-intro { grid-template-columns: 1fr; }
  .profile-intro img { width: min(220px, 100%); }
  .staff-hero { grid-template-columns: 1fr; gap: 20px; }
  .staff-portrait { width: min(230px, 100%); }
  .staff-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; gap: 14px; }
  .service-card { padding: 20px; }
  .service-cta { align-items: flex-start; flex-direction: column; }
  .article-nav { flex-direction: column; }
}

@media (max-width: 420px) {
  .home-actions { grid-template-columns: 1fr; }
  .home-action { min-height: 148px; }
  .home-action img { width: min(100%, 235px); transform: scale(1.2); }
}
