/* ==========================================================================
   India Voice — Advisory Committee page (सलाहकार समिति बोर्ड)
   Full-width maroon hero + card grid with "see more / see less".

   Ported from the old theme's advisory.css. The page content uses iv-*
   classes that clash with this theme, so inc/advisory.php renames them to
   adv-* on output; the colour variables are --adv-* and live on the page
   wrapper, so they cannot override the theme's own --iv-* tokens.
   Every rule starts with .adv-page to win over the theme's .iv-body rules.
   ========================================================================== */

.adv-page {
  --adv-maroon-1: #4e0c14;    /* hero gradient — dark edge   */
  --adv-maroon-2: #8d1226;    /* hero gradient — mid         */
  --adv-maroon-3: #a5162c;    /* hero gradient — bright      */
  --adv-gold: #c9a227;        /* hero underline / highlights */
  --adv-page-bg: #f7f5f1;     /* page background             */
  --adv-surface: #ffffff;     /* card background             */
  --adv-ink: #16202e;         /* headings / strong text      */
  --adv-body: #46525f;        /* body copy                   */
  --adv-muted: #78848f;       /* captions, meta              */
  --adv-accent: #9b1b30;      /* role text + buttons         */
  --adv-accent-soft: #fbeef0; /* accent tint                 */
  --adv-border: #e8e3da;      /* hairlines                   */
  --adv-radius: 18px;
  --adv-shadow: 0 1px 2px rgba(22, 32, 46, 0.05), 0 8px 24px -12px rgba(22, 32, 46, 0.18);
  --adv-shadow-hover: 0 2px 4px rgba(22, 32, 46, 0.06), 0 20px 40px -18px rgba(22, 32, 46, 0.28);
  --adv-maxw: 1180px;
  --adv-gap: 28px;

  background: var(--adv-page-bg);
  color: var(--adv-body);
  -webkit-font-smoothing: antialiased;
}

.adv-page *,
.adv-page *::before,
.adv-page *::after {
  box-sizing: border-box;
}

/* Stray </p> tags from WordPress's auto-formatting become empty
   paragraphs in the browser; they only add gaps. */
.adv-wrap p:empty {
  display: none;
}

/* The theme's .iv-main may add top spacing under the header; the hero
   sits flush against it as on the live site. */
.iv-main > .adv-wrap {
  margin-top: 0;
}

.adv-page .adv-container {
  max-width: var(--adv-maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --- Full-width hero ---------------------------------------------------- */

.adv-wrap .adv-hero {
  position: relative;
  width: 100%;
  padding: 74px 24px 78px;
  text-align: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(105deg, #4e0c14 0%, #6d0f1c 22%, #8d1226 52%, #a5162c 72%, #5f0d18 100%);
}

/* Two faint concentric arcs. */
.adv-wrap .adv-hero::before,
.adv-wrap .adv-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.adv-wrap .adv-hero::before {
  width: 780px;
  height: 780px;
  top: -430px;
  left: -180px;
}

.adv-wrap .adv-hero::after {
  width: 620px;
  height: 620px;
  right: -190px;
  bottom: -330px;
  border-color: rgba(255, 255, 255, 0.1);
}

.adv-wrap .adv-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin-inline: auto;
}

.adv-wrap .adv-hero__badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 8px 22px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.adv-wrap .adv-hero__title {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 1.2rem + 3vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
}

.adv-wrap .adv-hero__subtitle {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(0.98rem, 0.9rem + 0.3vw, 1.15rem);
  line-height: 1.7;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

.adv-wrap .adv-hero__rule {
  display: block;
  width: 92px;
  height: 3px;
  margin: 30px auto 0;
  border-radius: 2px;
  background: #c9a227;
}

@media (max-width: 640px) {
  .adv-wrap .adv-hero { padding: 52px 20px 56px; }
  .adv-wrap .adv-hero__rule { margin-top: 24px; }
}

/* --- Section + grid ----------------------------------------------------- */

.adv-page .adv-section {
  padding: 64px 0 88px;
}

.adv-page .adv-section__title {
  margin: 0 0 32px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--adv-ink);
  text-align: center;
}

.adv-page .adv-empty {
  text-align: center;
  color: var(--adv-muted);
  padding: 48px 0;
}

.adv-page .adv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--adv-gap);
  align-items: start; /* cards grow independently when expanded */
}

@media (max-width: 1000px) {
  .adv-page .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .adv-page .adv-grid { grid-template-columns: 1fr; --adv-gap: 22px; }
  .adv-page .adv-section { padding: 44px 0 56px; }
}

/* --- Card --------------------------------------------------------------- */

.adv-page .adv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--adv-surface);
  border: 1px solid var(--adv-border);
  border-radius: var(--adv-radius);
  box-shadow: var(--adv-shadow);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.adv-page .adv-card:hover {
  box-shadow: var(--adv-shadow-hover);
  transform: translateY(-2px);
}

.adv-page .adv-card.is-open {
  border-color: #e3d9cc;
  box-shadow: var(--adv-shadow-hover);
  transform: none;
}

/* Accent bar along the top of an open card. */
.adv-page .adv-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--adv-accent), var(--adv-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.adv-page .adv-card.is-open::before {
  transform: scaleX(1);
}

.adv-page .adv-card__media {
  position: relative;
  background: linear-gradient(160deg, #eee9e1, #f7f5f1);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.adv-page .adv-card__media .adv-card__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.adv-page .adv-card:hover .adv-card__img {
  transform: scale(1.035);
}

.adv-page .adv-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 700;
  color: #c8bfb1;
}

.adv-page .adv-card__body {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  flex: 1 1 auto;
}

.adv-page .adv-card__name {
  margin: 0 0 6px;
  font-size: 1.22rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--adv-ink);
}

.adv-page .adv-card__role {
  margin: 0 0 4px;
  font-size: 0.84rem;
  line-height: 1.6;
  font-weight: 600;
  color: var(--adv-accent);
}

.adv-page .adv-card__location {
  margin: 0 0 4px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--adv-muted);
  min-height: 3.2em; /* two lines, so the buttons line up across a row */
}

@media (max-width: 640px) {
  .adv-page .adv-card__location { min-height: 0; }
}

.adv-page .adv-card__short {
  margin-top: 12px;
  font-size: 0.93rem;
  line-height: 1.8;
  flex: 1 1 auto;
}

.adv-page .adv-card__short p { margin: 0 0 10px; }
.adv-page .adv-card__short p:last-child { margin-bottom: 0; }

/* Collapsed cards show four lines of the short text. */
.adv-page .adv-card:not(.is-open) .adv-card__short {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The expanding panel: 0fr → 1fr animates to the natural height. */
.adv-page .adv-card__full {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.adv-page .adv-card.is-open .adv-card__full {
  grid-template-rows: 1fr;
}

.adv-page .adv-card__full-inner {
  overflow: hidden;
  min-height: 0;
  font-size: 0.93rem;
  line-height: 1.85;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}

.adv-page .adv-card.is-open .adv-card__full-inner { opacity: 1; }
.adv-page .adv-card__full-inner p { margin: 0 0 14px; }
.adv-page .adv-card__full-inner p:last-child { margin-bottom: 0; }

.adv-page .adv-card__full-inner ul,
.adv-page .adv-card__full-inner ol { margin: 0 0 14px; padding-left: 1.2em; }

.adv-page .adv-card__full-inner li { margin-bottom: 6px; }
.adv-page .adv-card__full-inner strong { color: var(--adv-ink); }

.adv-page .adv-card__rule {
  display: block;
  width: 40px;
  height: 2px;
  margin: 18px 0;
  border-radius: 2px;
  background: var(--adv-gold);
}

/* --- See more / see less button ----------------------------------------- */

.adv-page .adv-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 18px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--adv-accent);
  background: var(--adv-accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

.adv-page .adv-toggle:hover {
  background: var(--adv-accent);
  color: #fff;
}

.adv-page .adv-toggle:focus-visible {
  outline: 2px solid var(--adv-accent);
  outline-offset: 3px;
}

.adv-page .adv-toggle__icon {
  width: 15px;
  height: 15px;
  transition: transform 0.35s ease;
}

.adv-page .adv-card.is-open .adv-toggle__icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .adv-page .adv-card,
  .adv-page .adv-card__img,
  .adv-page .adv-card__full,
  .adv-page .adv-card__full-inner,
  .adv-page .adv-toggle,
  .adv-page .adv-toggle__icon,
  .adv-page .adv-card::before {
    transition: none !important;
  }
}
