/*
Theme Name: Dr. Sidra AMC
Theme URI: https://github.com/mahadahmed786/AMC-Portal
Author: AMC Portal
Description: Public site for Dr. Sidra's AMC MCQ preparation academy. Student login opens Frappe Learning.
Version: 1.6.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: dr-sidra
*/

:root {
  --ink: #314038;
  --muted: #6d7872;
  --paper: #ffffff;
  --card: #ffffff;
  --line: rgba(49, 64, 56, 0.1);
  --navy: #24342e;
  --navy-deep: #2c3832;
  --teal: #3f7a70;
  --teal-deep: #32645c;
  --mist: #e7f0ec;
  --sand: #f3f5f4;
  --shadow: 0 16px 40px rgba(48, 58, 50, 0.06);
  --header: 76px;
  --display: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-deep); }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--navy);
  text-wrap: balance;
}
p { margin: 0 0 0.9rem; text-wrap: pretty; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 40;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
}
body.admin-bar .site-header { top: 32px; }
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy);
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(160deg, #14988d, #0b5f59);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.25rem;
  flex: 0 0 auto;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-copy span { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 0.15rem; font-weight: 600; }
.nav-toggle {
  display: none;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 0.2rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background: rgba(18, 32, 51, 0.06); }
.site-nav .nav-cta {
  background: var(--teal);
  color: #fff;
  margin-left: 0.35rem;
}
.site-nav .nav-cta:hover { background: var(--teal-deep); color: #fff; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.25rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.section-head h2,
.enroll h2,
.panel h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  margin: 0 0 0.45rem;
  line-height: 1.2;
}
.lede { color: var(--muted); max-width: 38rem; margin: 0; font-size: 1.05rem; line-height: 1.6; }

.hero {
  position: relative;
  min-height: 620px;
  color: var(--ink);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, #ffffff 0%, rgba(255, 255, 255, 0.97) 32%, rgba(255, 255, 255, 0.72) 48%, rgba(255, 255, 255, 0.12) 72%),
    url("assets/hero-light.jpg") right center / cover no-repeat;
}
.hero-copy {
  position: relative;
  max-width: 38rem;
  padding: 4.75rem 0 4rem;
}
.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0 0 0.85rem;
}
.hero h1 {
  color: var(--navy);
  font-size: clamp(2.45rem, 4.2vw, 3.55rem);
  line-height: 1.15;
  margin: 0 0 0.85rem;
  max-width: 12em;
}
.tagline {
  font-family: var(--display);
  font-size: 1.28rem;
  line-height: 1.35;
  margin: 0 0 0.85rem;
  color: #4e5c56;
  font-weight: 500;
}
.hero p { color: var(--ink); max-width: 34rem; font-size: 1.08rem; }
.quiet {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 32rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--navy);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn:hover { background: #fff; }
.btn-teal { background: var(--teal); color: #fff; box-shadow: none; }
.btn-teal:hover { background: var(--teal-deep); color: #fff; }
.btn-line { background: transparent; box-shadow: inset 0 0 0 1px rgba(49, 64, 56, 0.22); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }

.enroll-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.2rem; }
.panel, .enroll, .contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.45rem;
  box-shadow: 0 10px 30px rgba(16, 38, 58, 0.04);
}
.enroll .lede,
.panel .lede { margin-bottom: 1rem; }
.enroll ol { margin: 0.2rem 0 0.4rem; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.enroll li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}
.enroll li::before {
  counter-increment: step;
  content: counter(step);
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--mist);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
}
.enroll li { line-height: 1.45; }
.enroll ol { counter-reset: step; }
.placeholder { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: stretch; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease;
}
.card-photo {
  display: block;
  width: 100%;
  height: 13rem;
  object-fit: cover;
  object-position: center 72%;
}
.card-body {
  padding: 1.3rem 1.3rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card:hover { box-shadow: var(--shadow); }
.card .kicker {
  color: var(--teal-deep);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.28rem; line-height: 1.25; }
.card p { color: var(--muted); flex: 1; font-size: 0.98rem; margin-bottom: 1rem; }
.card a.more {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.card a.more::after { content: "→"; color: var(--teal); }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.quote {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem 1.25rem 1.15rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.quote p {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--navy);
  flex: 1;
  margin-bottom: 0.85rem;
}
.quote footer { color: var(--muted); font-size: 0.9rem; }
.sample-flag {
  display: inline-block;
  background: var(--sand);
  color: #3d4a46;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.8rem;
  width: fit-content;
}

.page-band {
  padding: 4.2rem 0 0.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), #ffffff 78%),
    url("assets/hero-light.jpg") center 40% / cover no-repeat;
}
.page-band .eyebrow { color: var(--teal); }
.catalog { padding-top: 2.75rem; padding-bottom: 5rem; }
.catalog .group { margin: 3.5rem 0 1.35rem; font-size: 1.7rem; }
.catalog .group:first-of-type { margin-top: 0.25rem; }
.catalog .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.75rem; }
.catalog .cards-single { grid-template-columns: minmax(0, 40rem); }
.catalog .card-body { padding: 1.7rem 1.75rem 1.45rem; }
.catalog .card-photo { height: 16rem; }
.catalog .card h3 { font-size: 1.45rem; line-height: 1.3; margin-bottom: 0.65rem; }
.catalog .card p { font-size: 1.05rem; line-height: 1.65; margin-bottom: 1.25rem; }
.page-band h1 { font-size: clamp(2.2rem, 4vw, 3.15rem); line-height: 1.15; margin: 0 0 0.6rem; }
.page-band .lede { margin-top: 0.15rem; }
.group {
  margin: 2.5rem 0 0.9rem;
  font-size: 1.55rem;
  line-height: 1.25;
}
.prose { max-width: 42rem; padding-bottom: 2.5rem; font-size: 1.05rem; }
.prose h2 { font-size: 1.4rem; margin: 1.8rem 0 0.45rem; }
.prose p:last-child { margin-bottom: 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1.05rem;
  margin-bottom: 0.7rem;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 1.02rem; }
.faq details p { margin: 0.7rem 0 0.2rem; color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-card h2 { margin-top: 0; font-size: 1.45rem; }

.site-footer {
  background: var(--navy-deep);
  color: #c9d5d2;
  padding: 3.2rem 0 1.6rem;
  margin-top: 1rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 2rem;
}
.footer-brand {
  font-family: var(--display);
  font-size: 1.4rem;
  color: #fff;
  display: block;
  margin-bottom: 0.4rem;
}
.footer-label {
  color: #8fd0c8;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.site-footer p { margin: 0 0 0.45rem; }
.fine { font-size: 0.88rem; color: #8ea09c; margin-top: 1.8rem; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    top: calc(var(--header) - 6px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-cta { margin: 0.2rem 0 0; text-align: center; }
  .enroll-grid, .cards, .quotes, .contact-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 0; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.72) 46%, #ffffff 70%),
      url("assets/hero-light.jpg") center 30% / cover no-repeat;
  }
  .hero-copy { padding: 15rem 0 2.5rem; }
  .hero h1 { max-width: none; font-size: 2.35rem; }
  .catalog .cards,
  .catalog .cards-single { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  body.admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
