/* SIPNA — Society of Iranian Psychiatrists of North America */
:root {
  --navy: #0c2340;
  --navy-2: #163a5f;
  --teal: #1a6b6b;
  --teal-light: #2a8f8f;
  --gold: #c4a35a;
  --gold-light: #e0c787;
  --cream: #f7f3ec;
  --sand: #efe8db;
  --ink: #1c2430;
  --muted: #5a6675;
  --white: #ffffff;
  --line: rgba(12, 35, 64, 0.1);
  --shadow: 0 12px 40px rgba(12, 35, 64, 0.1);
  --radius: 16px;
  --font: "Source Sans 3", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }
.container { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: white; padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: .85rem; color: inherit; }
.brand-logo {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); background: white;
}
.brand-name {
  display: block; font-family: var(--serif); font-size: 1.55rem; font-weight: 700;
  color: var(--navy); letter-spacing: .04em; line-height: 1.1;
}
.brand-tag {
  display: block; font-size: .68rem; color: var(--muted); max-width: 220px; line-height: 1.25;
  text-transform: uppercase; letter-spacing: .04em;
}
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .55rem;
}
.site-nav a {
  color: var(--navy); font-size: .9rem; font-weight: 500; padding: .4rem .55rem;
  border-radius: 999px; transition: .2s ease;
}
.site-nav a:hover, .site-nav a.active { background: var(--sand); color: var(--teal); }
.site-nav a.nav-cta, .site-nav a.nav-cta.active {
  background: var(--navy); color: white !important; padding: .45rem .95rem;
}
.site-nav a.nav-cta:hover { background: var(--teal); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px;
  flex-direction: column; justify-content: center; gap: 5px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; }

/* Hero */
.hero {
  position: relative; min-height: 78vh; display: grid; place-items: center;
  color: white; overflow: hidden;
  background: var(--navy);
}
.hero-slides {
  position: absolute; inset: 0;
}
.hero-slides .slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease; animation: fadeSlide 15s infinite;
}
.hero-slides .slide:nth-child(1) { animation-delay: 0s; }
.hero-slides .slide:nth-child(2) { animation-delay: 5s; }
.hero-slides .slide:nth-child(3) { animation-delay: 10s; }
@keyframes fadeSlide {
  0%, 28% { opacity: 1; }
  33%, 95% { opacity: 0; }
  100% { opacity: 1; }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(12,35,64,.88) 0%, rgba(26,107,107,.55) 55%, rgba(12,35,64,.75) 100%);
}
.hero-content {
  position: relative; z-index: 1; text-align: center; padding: 5rem 1.25rem 4rem;
  max-width: 860px;
}
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-light); font-weight: 600; margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.4rem, 5.5vw, 4.1rem);
  line-height: 1.08; margin: 0 0 1rem; font-weight: 600;
}
.hero p.lead {
  font-size: 1.15rem; opacity: .92; max-width: 620px; margin: 0 auto 1.75rem; font-weight: 300;
}
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; transition: .2s ease; cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy); }
.btn-ghost { background: transparent; color: white; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: white; }
.btn-outline {
  background: transparent; color: var(--navy); border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: white; }
.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover { background: var(--teal-light); color: white; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: white; }
.section-dark {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: white;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.75rem; }
.section-head h2, .page-hero h1, .content-title {
  font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.15;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem); margin: 0 0 .75rem;
}
.section-dark .section-head h2 { color: white; }
.section-head p, .lede { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-dark .section-head p { color: rgba(255,255,255,.78); }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 48px rgba(12,35,64,.14); }
.card-body { padding: 1.35rem 1.4rem 1.5rem; }
.card h3 {
  font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .5rem; color: var(--navy);
}
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card-img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--sand); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--sand);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: .9rem; color: var(--teal);
}

/* Story split */
.split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: center;
}
.split img {
  border-radius: var(--radius); box-shadow: var(--shadow); width: 100%;
  aspect-ratio: 5/4; object-fit: cover;
}
.mission-list { list-style: none; padding: 0; margin: 1.25rem 0 0; counter-reset: m; }
.mission-list li {
  position: relative; padding: .85rem 0 .85rem 3rem;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.mission-list li::before {
  counter-increment: m; content: counter(m, decimal-leading-zero);
  position: absolute; left: 0; top: .85rem;
  font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 1.15rem;
}

/* Team */
.person-card { text-align: center; padding: 1.4rem 1rem 1.5rem; }
.person-card img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem;
  border: 3px solid var(--gold); background: var(--sand);
}
.person-card h3 { font-size: 1.15rem; margin: 0 0 .25rem; font-family: var(--serif); color: var(--navy); }
.person-card .role { color: var(--teal); font-size: .88rem; font-weight: 600; margin: 0; }
.person-card .years { color: var(--muted); font-size: .82rem; margin: .2rem 0 0; }

/* News / alert */
.alert-banner {
  background: linear-gradient(90deg, var(--teal), var(--navy-2));
  color: white; padding: 1rem 0;
}
.alert-banner .container {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between;
}
.alert-banner strong { color: var(--gold-light); }
.alert-banner a { color: white; text-decoration: underline; font-weight: 600; }

/* Page hero */
.page-hero {
  background:
    linear-gradient(135deg, rgba(12,35,64,.92), rgba(26,107,107,.72)),
    url("../images/ui/hero-stage-3.jpeg") center/cover;
  color: white; padding: 4.5rem 0 3.5rem; text-align: center;
}
.page-hero h1 { color: white; margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto; }
.breadcrumb {
  font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: .75rem;
}
.breadcrumb a { color: var(--gold-light); }

/* Content prose */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 {
  font-family: var(--serif); color: var(--navy); font-size: 1.65rem; margin: 2rem 0 .75rem;
}
.prose h3 { color: var(--navy-2); margin: 1.5rem 0 .5rem; }
.prose p { margin: 0 0 1rem; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.25rem; color: var(--ink); }
.prose li { margin-bottom: .4rem; }
.prose img { border-radius: 12px; margin: 1.25rem 0; }

/* Tables / members */
.toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; align-items: center;
}
.toolbar input, .toolbar select {
  font: inherit; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: white; min-width: 220px;
}
.member-table-wrap { overflow-x: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
table.members {
  width: 100%; border-collapse: collapse; font-size: .92rem;
}
table.members th, table.members td {
  text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line);
}
table.members th {
  background: var(--navy); color: white; font-weight: 600; position: sticky; top: 0;
}
table.members tr:hover td { background: var(--sand); }
.stats-row {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.stat {
  background: white; border-radius: 12px; padding: 1rem 1.25rem; min-width: 140px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat strong {
  display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--navy); line-height: 1;
}
.stat span { font-size: .85rem; color: var(--muted); }

/* Gallery */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem;
}
.gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px;
  box-shadow: var(--shadow); cursor: zoom-in;
}

/* Quote */
.quote-block {
  background: white; border-left: 4px solid var(--gold); padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 1rem 0; box-shadow: var(--shadow);
}
.quote-block p { font-family: var(--serif); font-size: 1.2rem; font-style: italic; margin: 0 0 .5rem; color: var(--navy); }
.quote-block cite { color: var(--muted); font-size: .9rem; font-style: normal; }

/* Forms */
.form-card {
  background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
  border: 1px solid var(--line); max-width: 640px;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--navy); font-size: .92rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; font: inherit; padding: .75rem 1rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--cream);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: .75rem; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tab-btn {
  border: 1px solid var(--line); background: white; padding: .55rem 1rem; border-radius: 999px;
  font: inherit; cursor: pointer; color: var(--navy); font-weight: 500;
}
.tab-btn.active { background: var(--navy); color: white; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Timeline / news list */
.news-list { display: grid; gap: 1.25rem; }
.news-item {
  display: grid; grid-template-columns: 110px 1fr; gap: 1.25rem;
  background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.news-date {
  font-family: var(--serif); color: var(--gold); font-weight: 700; font-size: 1.1rem; line-height: 1.2;
}
.news-item h3 { margin: 0 0 .4rem; font-family: var(--serif); color: var(--navy); font-size: 1.25rem; }
.news-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* CTA band */
.cta-band {
  text-align: center; padding: 3.5rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(12,35,64,.94), rgba(26,107,107,.85)),
    url("../images/ui/slide2.jpg") center/cover;
  color: white; border-radius: var(--radius);
}
.cta-band h2 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 .75rem; color: white; }
.cta-band p { opacity: .9; max-width: 560px; margin: 0 auto 1.5rem; }

/* Footer */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,.82); padding-top: 3.5rem; margin-top: 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem;
}
.footer-logo { width: 64px; height: 64px; border-radius: 50%; margin-bottom: .75rem; object-fit: cover; border: 2px solid var(--gold); }
.footer-brand h3 { font-family: var(--serif); color: white; margin: 0 0 .5rem; font-size: 1.5rem; }
.footer-brand p { margin: 0; font-size: .92rem; max-width: 340px; }
.site-footer h4 {
  color: var(--gold-light); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a { color: rgba(255,255,255,.82); }
.footer-links a:hover { color: var(--gold-light); }
.social-row { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; color: white; font-size: .72rem; font-weight: 700;
}
.social-row a:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; font-size: .85rem;
  color: rgba(255,255,255,.55);
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.tag {
  display: inline-block; background: var(--sand); color: var(--teal); font-size: .75rem;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .65rem;
  border-radius: 999px; margin-bottom: .75rem;
}
.two-col-content {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start;
}
.side-card {
  background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  border: 1px solid var(--line); position: sticky; top: 100px;
}
.side-card h3 { font-family: var(--serif); color: var(--navy); margin-top: 0; }
.side-card ul { padding-left: 1.1rem; margin: 0; color: var(--muted); }
.side-card li { margin-bottom: .4rem; }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .split, .two-col-content, .footer-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 76px;
    background: var(--cream); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; }
  .grid-3, .grid-4, .grid-2, .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
}
