/* ==========================================================
   Chitrakalaimanram – Centre for Performing Arts
   Shared stylesheet (all pages)
   Colours sampled from the live site screenshots.
   ========================================================== */

:root {
  --green: #1c9606;
  --green-hover: #22b008;
  --green-dark: #157305;
  --dark: #161616;
  --black: #000000;
  --white: #f7f7f7;
  --muted: #a4a4a4;
  --footer-muted: #969696;
  --rule-dark: #3a3a3a;
  --container: 1280px;
  --gutter: 24px;
  --font-head: 'League Spartan', 'Arial Black', Arial, sans-serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid #7bea5c; outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 8px 32px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--green-hover); }
.btn--white { background: var(--white); color: #1b1b1b; }
.btn--white:hover { background: #fff; color: var(--green); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: relative;
  z-index: 30;
  background: var(--dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 58px;
}
.nav__logo { flex: none; line-height: 0; }
.nav__logo img { width: 125px; height: 125px; object-fit: cover; }

.nav__links {
  list-style: none;
  display: flex;
  gap: 39px;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
  transition: color .2s;
}
.nav__links a:hover { color: #d9d9d9; }
.nav__links a[aria-current="page"] { font-weight: 700; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}
.nav__toggle svg { width: 40px; height: 40px; }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--dark);
  padding: 24px;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer__close {
  display: block;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 0; background: none; color: var(--white); cursor: pointer;
}
.drawer__close svg { width: 40px; height: 40px; }
.drawer ul { list-style: none; margin: 24px 0 0; padding: 0; }
.drawer li { border-bottom: 1px solid #2c2c2c; }
.drawer a {
  display: block;
  padding: 18px 0;
  font-size: 20px;
  text-decoration: none;
  color: var(--white);
}
.drawer a[aria-current="page"] { font-weight: 700; color: var(--green); }

/* Sticky header (all pages) */
.nav-sticky-spacer { display: none; }
.site-header.is-sticky .nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding-top: 8px; padding-bottom: 8px;
  background: rgba(22, 22, 22, .96);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.site-header.is-sticky .nav__logo img { width: 72px; height: 72px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: 703px;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url('../images/hero.jpg') center / cover no-repeat;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
}
.hero .site-header { background: transparent; }
.hero .nav { align-items: flex-start; padding-top: 24px; }
.hero .nav__links { margin-top: 10px; }
.hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter) 40px;
  margin-top: -60px;
}
.hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.2;
  white-space: pre-line;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.hero__sub {
  max-width: 820px;
  margin-bottom: 32px;
  font-size: 22px;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.hero__phone {
  margin-top: 56px;
  font-size: 22px;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; text-align: center; }
.section--dark  { background: var(--dark); }
.section--black { background: var(--black); }
.section--green { background: var(--green); }

.heading {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 56px;
  line-height: 1.25;
  color: var(--green);
}
.section--green .heading,
.heading--white { color: var(--white); }

.rule {
  display: block;
  width: 60px;
  height: 0;
  margin: 32px auto 48px;
  border: 0;
  border-top: 2px solid var(--rule-dark);
}
.section--green .rule { border-top-color: rgba(255,255,255,.25); }

.lead {
  margin: -16px 0 48px;
  color: var(--muted);
  font-size: 16px;
}

/* ---------- Video (click-to-play YouTube) ---------- */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000 center / cover no-repeat;
  cursor: pointer;
}
.video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video__play {
  position: absolute;
  left: 50%; top: 50%;
  width: 68px; height: 48px;
  transform: translate(-50%, -50%);
  border: 0; padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
}
.video:hover { filter: brightness(1.06); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}
.split__text { font-size: 22px; line-height: 1.5; }

/* ---------- Social icons ---------- */
.social { display: flex; justify-content: center; gap: 24px; }
.social a { display: inline-flex; color: var(--white); transition: opacity .2s; }
.social a:hover { opacity: .75; }
.social svg { width: 40px; height: 40px; fill: currentColor; }
.social--lg { gap: 32px; }
.social--lg svg { width: 48px; height: 48px; }

/* ---------- About ---------- */
.about__img {
  width: 345px;
  height: 246px;
  margin: 100px auto 24px;
  object-fit: cover;
  border-radius: 0 0 50% 50% / 0 0 60% 60%;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.card h3 {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
}
.card p { line-height: 1.85; }
.card p + p { margin-top: 24px; }

/* ---------- Subscribe ---------- */
.subscribe { background: var(--black); padding: 56px 0; }
.subscribe__inner { display: flex; align-items: center; gap: 24px; }
.subscribe h2 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 32px;
  color: var(--green);
}
.subscribe form { flex: 1; display: flex; gap: 24px; }
.field {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid #5a5a5a;
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  font: inherit;
}
.field::placeholder { color: #c9c9c9; }
.field:focus { outline: none; border-color: var(--green); }
.field.is-invalid { border-color: #ff6b5f; }
textarea.field { min-height: 140px; resize: vertical; }
.form-msg { margin-top: 12px; font-size: 15px; }
.form-msg.is-error { color: #ff8277; }
.form-msg.is-ok { color: #7bea5c; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; background: var(--dark); }
.contact__info { padding: 64px 48px 72px 124px; color: var(--muted); }
.contact__info .heading { text-align: left; }
.contact__info .rule { margin-left: 0; }
.contact__info h4 {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.35;
  color: var(--white);
}
.contact__info p { line-height: 1.85; }
.contact__info .block { margin-bottom: 40px; }
.contact__info a[href^="tel"] { color: var(--green); text-decoration: none; }
.btn--whatsapp {
  background: #fff; color: #1b1b1b;
  text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 700;
  margin-bottom: 40px;
}
.btn--whatsapp:hover { background: #ececec; }
.btn--whatsapp svg { width: 24px; height: 24px; }
.contact-form { display: none; margin-top: 24px; }
.contact-form.is-open { display: grid; gap: 16px; }
.contact-form__actions { display: flex; align-items: center; gap: 24px; }
.link-btn { background: none; border: 0; color: var(--white); cursor: pointer; text-decoration: underline; }
.contact__map { position: relative; min-height: 560px; background: #e5e3df; }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact__map .btn {
  position: absolute; top: 0; left: 56px; z-index: 2;
  min-height: 44px; padding: 8px 20px;
  border-radius: 0 0 4px 4px;
  font-size: 12px;
}

/* ---------- Donate ---------- */
.donate { padding: 56px 0 64px; background: var(--green); text-align: center; }
.donate .heading { color: var(--white); margin-bottom: 24px; }
.donate p { max-width: 760px; margin: 0 auto 32px; font-size: 20px; }
.donate img.badges { margin: 12px auto 0; height: 26px; width: auto; }
.donate .btn img { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.footer { padding: 56px 0; background: var(--black); }
.footer--green { background: var(--green); }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer p { font-size: 14px; color: var(--footer-muted); }
.footer--green p { color: var(--white); font-size: 18px; }
.footer .social { gap: 18px; }
.footer .social svg { width: 32px; height: 32px; }
.footer--green .social { margin-right: 112px; }

/* Floating chat button */
.fab {
  position: fixed;
  right: 38px; bottom: 30px;
  z-index: 60;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .2s;
}
.fab:hover { transform: scale(1.06); }
.fab svg { width: 44px; height: 44px; }

/* ---------- Gallery page ---------- */
.masonry { display: flex; gap: 10px; align-items: flex-start; }
.masonry__col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.masonry button,
.grad-grid button {
  display: block;
  padding: 0; border: 0; background: none;
  cursor: zoom-in;
  overflow: hidden;
}
.masonry img { width: 100%; height: auto; transition: transform .35s; }
.masonry button:hover img,
.grad-grid button:hover img { transform: scale(1.03); }

.booklet {
  position: relative;
  width: 100%;
  aspect-ratio: 1334 / 770;
  background: #4a8bd8;
}
.booklet iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.booklet__empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  color: #fff; font-size: 20px;
}

/* ---------- Branches page ---------- */
.branch { padding: 64px 0 72px; }
.branch .heading { text-align: center; }
.branch__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  text-align: left;
}
.branch h4 {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.35;
  color: var(--white);
}
.branch p { color: var(--muted); margin-bottom: 40px; line-height: 1.85; }
.branch p.tight { margin-bottom: 0; }
.branch a { color: var(--green); text-decoration: none; }
.branch a:hover { text-decoration: underline; }
.branch .btn { color: var(--white); margin-top: 8px; }
.branch .btn:hover { text-decoration: none; }
.branch img { width: 100%; height: auto; }
.section--green.branch p,
.section--green.branch a { color: var(--white); }
.section--green.branch .btn { background: var(--white); color: #1b1b1b; }
.section--green.branch .btn:hover { color: var(--green); }

/* ---------- Styles page ---------- */
.styles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  align-items: start;
}
.styles-grid h4 {
  margin: 32px 0 40px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 30px;
  color: var(--white);
}
.styles-grid .col-right h4 { margin-top: 0; }
.styles-grid p { color: var(--muted); font-size: 19px; line-height: 1.5; }
.styles-grid img { width: 100%; height: auto; }

/* ---------- Graduation page ---------- */
.grad-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.grad-grid button { grid-column: span 3; aspect-ratio: 480 / 450; }
.grad-grid button.wide { grid-column: span 4; aspect-ratio: 640 / 450; }
.grad-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }

/* ---------- Shopping cart page ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 58px;
}
.shop-card {
  position: relative;
  display: block;
  aspect-ratio: 508 / 705;
  overflow: hidden;
}
.shop-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.shop-card:hover img { transform: scale(1.04); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.92);
  padding: 60px 80px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox button {
  position: absolute;
  border: 0; background: none; color: #fff; cursor: pointer;
  width: 56px; height: 56px;
}
.lightbox button svg { width: 40px; height: 40px; }
.lightbox__close { top: 12px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 14px; }

/* ---------- Popup ---------- */
.popup {
  position: fixed; inset: 0; z-index: 150;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6);
  padding: 24px;
}
.popup.is-open { display: flex; }
.popup__box {
  position: relative;
  width: 100%; max-width: 560px;
  padding: 56px 40px 40px;
  background: var(--dark);
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.popup__box h3 {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 32px;
  color: var(--green);
}
.popup__box p { color: var(--muted); margin-bottom: 8px; }
.popup__box .btn { margin-top: 24px; }
.popup__close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0; background: none; color: var(--white); cursor: pointer;
}
.popup__close svg { width: 28px; height: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .nav { padding: 16px 32px; }
  .nav__links { gap: 26px; }
  .contact__info { padding: 56px 40px; }
}

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__logo img { width: 96px; height: 96px; }

  .heading { font-size: 40px; }
  .hero { min-height: 600px; }
  .hero h1 { font-size: 34px; }
  .hero__sub { font-size: 18px; }

  .split, .branch__grid, .styles-grid, .contact { grid-template-columns: 1fr; }
  .split { text-align: center; }
  .cards { grid-template-columns: 1fr; gap: 32px; }
  .about__img { margin-top: 24px; }
  .contact__info { padding: 56px var(--gutter); }
  .contact__map { min-height: 400px; }

  .branch .branch__media { order: -1; }
  .shop-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .grad-grid button,
  .grad-grid button.wide { grid-column: span 6; aspect-ratio: 480 / 450; }
  .footer--green .social { margin-right: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav { padding: 12px 16px; }
  .nav__logo img { width: 80px; height: 80px; }
  .heading { font-size: 32px; }
  .rule { margin: 24px auto 32px; }
  .hero { min-height: 540px; }
  .hero h1 { font-size: 28px; white-space: normal; }
  .subscribe__inner, .subscribe form { flex-direction: column; align-items: stretch; text-align: center; }
  .masonry { flex-direction: column; }
  .shop-grid { grid-template-columns: 1fr; }
  .styles-grid h4 { font-size: 24px; }
  .styles-grid p { font-size: 17px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer--green p { font-size: 15px; }
  .fab { width: 60px; height: 60px; right: 16px; bottom: 16px; }
  .fab svg { width: 34px; height: 34px; }
  .lightbox { padding: 56px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- About cards: image per card (real site layout) ---------- */
.cards { margin-top: 56px; }
.card__media {
  height: 246px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.card__media img { max-width: 345px; max-height: 246px; width: auto; height: auto; }
.popup__img { width: calc(100% + 80px); max-width: none; margin: -56px -40px 24px; border-radius: 6px 6px 0 0; }
@media (max-width: 1023px) {
  .card__media { height: auto; min-height: 0; }
}
