/* Namaste Phoenix- critical above-fold styles (header, cover, article hero). */
/* Bootstrap layout shell (inlined into critical bundle). */
/* Minimal layout utilities for public shell header (defers full Bootstrap until below-fold). */
:root {
  --np-gutter-x: 0.75rem;
  --np-gutter-y: 0;
}

.container {
  width: 100%;
  padding-right: var(--np-gutter-x);
  padding-left: var(--np-gutter-x);
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.d-inline-block { display: inline-block !important; }
.d-md-none { display: none !important; }
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-inline { display: inline !important; }
}
.d-sm-inline { display: none !important; }
@media (min-width: 576px) {
  .d-sm-inline { display: inline !important; }
  .d-inline.d-sm-none { display: none !important; }
}

.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.min-w-0 { min-width: 0 !important; }

.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
@media (min-width: 768px) {
  .gap-md-3 { gap: 1rem !important; }
}

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-md-2 { margin-right: 0.5rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }

.p-0 { padding: 0 !important; }
.p-4 { padding: 1.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }

.text-decoration-none { text-decoration: none !important; }
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-center { text-align: center !important; }
.text-muted { color: #6b7280 !important; }
.text-dark { color: #1f2937 !important; }
.text-uppercase { text-transform: uppercase !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-medium { font-weight: 500 !important; }
.small { font-size: 0.875em !important; }

.border-0 { border: 0 !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.bg-transparent { background-color: transparent !important; }

.rounded-pill { border-radius: 50rem !important; }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.start-0 { left: 0 !important; }

.overflow-hidden { overflow: hidden !important; }

.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.375rem;
}
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.25rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--np-gutter-x) * -0.5);
  margin-left: calc(var(--np-gutter-x) * -0.5);
  margin-top: calc(var(--np-gutter-y) * -1);
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--np-gutter-x) * 0.5);
  padding-left: calc(var(--np-gutter-x) * 0.5);
  margin-top: var(--np-gutter-y);
}
.g-5 {
  --np-gutter-x: 1.5rem;
  --np-gutter-y: 1.5rem;
}
.col-lg-5,
.col-lg-7,
.col-lg-12 {
  flex: 0 0 auto;
  width: 100%;
}
@media (min-width: 992px) {
  .col-lg-5 { width: 41.666667%; }
  .col-lg-7 { width: 58.333333%; }
  .col-lg-12 { width: 100%; }
  .text-lg-start { text-align: left !important; }
}

/* Namaste Phoenix public magazine styles (source of truth).
   Deploy bundles: site-public-critical.css + site-public-deferred.css (run scripts/split-public-css.py).
   Linked via resources/views/partials/magazine-public-styles.blade.php */
:root {
    /* Saffron-led palette for an Indian-Phoenix sensibility */
    --primary-color: #C2410C;          /* saffron / burnt orange */
    --primary-color-dark: #7C2D12;     /* deep terracotta */
    --secondary-color: #312E81;        /* aubergine indigo */
    --accent-color: #D97706;           /* marigold gold */
    --tint-light: #FFEDD5;             /* peach 100 */
    --tint-mid: #FED7AA;                /* peach 200 */
    --tint-border: #FDBA74;            /* peach 300 */
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --text-light: #FFFBF0;
    --bg-cream: #FFFBF0;
    --bg-paper: #FFFFFF;
  }

  /* Lock the document to its viewport - kills any phantom horizontal scroll
     caused by oversized images, full-bleed sections, or a single 100vw element. */
  html, body { overflow-x: hidden; max-width: 100%; }
  *, *::before, *::after { box-sizing: border-box; }
  img, video, iframe { max-width: 100%; height: auto; }

  /* All ad-zone placements - fluid in grid columns; IAB max size from inline zone box */
  .ad-zone-container {
    max-width: 100%;
    min-width: 0;
  }
  .ad-zone-container > a:has(> img) {
    display: block;
    max-width: 100%;
    line-height: 0;
  }
  .ad-zone-container img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    box-sizing: border-box;
  }

  body {
    font-family: 'Source Serif 4', Georgia, serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
  }

  /* UI chrome (nav, buttons, badges, captions) uses sans */
  .gl-utility, .gl-nav, .gl-eyebrow, .gl-tagline,
  .gl-section-title, .gl-widget-title, .gl-tag,
  .badge, .btn, .gl-subscribe-btn,
  .gl-popular-item .meta, .gl-article-meta,
  .gl-search input, .gl-footer-heading, .gl-footer-bottom,
  .gl-cover-eyebrow, .np-meta {
    font-family: 'Lato', system-ui, sans-serif;
  }

  /* Display headings only at 32px+ use Playfair; smaller heads use serif */
  h1, .gl-article-title, .gl-cover-headline, .gl-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.01em;
  }
  h2, h3, h4, h5, h6 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.005em;
  }

  /* Top utility bar - tap-friendly links, wraps cleanly on narrow phones */
  .gl-utility {
    background: var(--primary-color-dark);
    color: var(--tint-mid);
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 8px 0;
    max-height: 56px;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.28s ease, padding 0.28s ease;
  }
  .gl-utility-toggle {
    display: none;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--tint-border);
    background: var(--primary-color-dark);
    color: var(--tint-mid);
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-height: 44px;
    padding: 10px 12px;
    gap: 6px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1031;
    -webkit-tap-highlight-color: transparent;
  }
  .gl-utility-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
  }
  .gl-utility-toggle-icon {
    transition: transform 0.25s ease;
    font-size: 1.1rem;
  }
  .gl-utility-toggle.is-open .gl-utility-toggle-icon {
    transform: rotate(180deg);
  }
  @media (min-width: 768px) {
    .gl-utility-toggle {
      display: none !important;
    }
    .gl-utility--collapsed {
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
      opacity: 0;
      pointer-events: none;
    }
    .gl-utility.gl-utility--mobile-collapsed {
      max-height: 56px;
      opacity: 1;
      pointer-events: auto;
      padding: 8px 0;
    }
  }
  @media (max-width: 767.98px) {
    .gl-utility-toggle {
      display: flex !important;
    }
    .gl-utility.gl-utility--mobile-collapsed:not(.gl-utility--open) {
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
      opacity: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .gl-utility.gl-utility--open {
      max-height: none;
      opacity: 1;
      pointer-events: auto;
      overflow: visible;
      padding: 6px 0;
    }
    .gl-utility-inner {
      row-gap: 6px;
    }
    .gl-utility-tagline {
      flex: 1 1 100%;
      max-width: 100%;
    }
    .gl-utility-links {
      flex: 1 1 100%;
      justify-content: flex-start !important;
    }
  }
  .gl-nav-sections-btn {
    color: var(--text-dark);
    font-size: 1.2rem;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .np-sections-offcanvas { max-height: 70vh; border-radius: 16px 16px 0 0; }
  .np-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .np-sections-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--tint-light);
    border: 1px solid var(--tint-border);
    color: var(--primary-color-dark);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    line-height: 1.25;
  }
  .np-sections-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
  }

/* ======================================================
     COVER STORY (hero) - the editorial lead of the homepage
     ====================================================== */
  .np-cover {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 0;
  }
  .np-cover-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
  }
  .np-cover-overlay {
    position: absolute; inset: 0;
    /* Stronger top stop so the kicker / headline always read,
       even when the underlying image is bright or warm-toned. */
    background: linear-gradient(180deg,
      rgba(0,0,0,0.45) 0%,
      rgba(0,0,0,0.55) 45%,
      rgba(0,0,0,0.90) 100%);
    z-index: 2;
  }
  .np-cover-inner {
    position: relative;
    z-index: 3;
    color: #fff;
    padding: 80px 0 60px;
    max-width: 760px;
  }
  .gl-cover-eyebrow {
    /* Warm cream rather than the marigold gold - gold disappears on
       orange/warm-toned cover images. Cream stays on-brand and reads
       on any photo, with a subtle shadow as belt-and-suspenders. */
    color: #ffead2;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 900;
    margin-bottom: 18px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  }
  .gl-cover-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(40px, 5.5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    color: #fff;
  }
  .gl-cover-headline a { color: #fff; text-decoration: none; }
  .gl-cover-headline a:hover { color: var(--tint-mid); }
  .gl-cover-dek {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 22px;
    line-height: 1.5;
    color: #f5f5f4;
    margin-bottom: 24px;
    max-width: 640px;
  }
  .np-cover-meta {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #e7e5e4;
    margin-bottom: 28px;
  }
  .np-cover-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .np-cover-cta {
    display: inline-block;
    background: var(--primary-color);
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 999px;
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
  }
  .np-cover-cta:hover { background: var(--accent-color); transform: translateY(-1px); }
  @media (max-width: 767.98px) {
    .np-cover {
      min-height: min(72vh, 520px);
    }
    button.np-cover-cta.w-100,
    a.np-cover-cta.w-100 {
      display: block;
      width: 100%;
      text-align: center;
    }
  }

/* Article page specifics */
  .gl-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Lato', sans-serif;
    row-gap: 4px;
    word-break: break-word;
  }
  .gl-breadcrumb a { color: var(--text-muted); text-decoration: none; }
  .gl-breadcrumb a:hover { color: var(--primary-color); }
  .gl-eyebrow {
    color: var(--primary-color);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    font-family: 'Lato', sans-serif;
  }
  .gl-article-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 46px;
    line-height: 1.1;
    color: var(--primary-color-dark);
    margin-bottom: 16px;
    letter-spacing: -0.015em;
  }
  .gl-article-dek {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 22px;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 24px;
  }
  .gl-article-meta {
    border-top: 1px solid #f3e8d7;
    border-bottom: 1px solid #f3e8d7;
    padding: 14px 0;
    font-size: 13px;
    color: var(--text-muted);
  }
  .gl-article-meta strong { color: var(--text-dark); font-weight: 700; }

  /* Author index - stable dimensions for CLS; avatar is often LCP */
  .gl-author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--tint-light);
    flex-shrink: 0;
  }
  .gl-author-card-img {
    aspect-ratio: 3 / 2;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }

  /* No featured / inline hero image: branded panel instead of a generic placeholder bitmap */
  .gl-article-hero-fallback {
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
    max-height: 320px;
    background: linear-gradient(135deg, var(--tint-light) 0%, #fff7ed 38%, var(--tint-mid) 100%);
    border: 1px solid var(--tint-border);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  }
  .gl-article-hero-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.14;
    pointer-events: none;
    background:
      radial-gradient(ellipse 70% 50% at 15% 20%, var(--primary-color), transparent 55%),
      radial-gradient(ellipse 60% 45% at 88% 85%, var(--secondary-color), transparent 50%);
  }
  .gl-article-hero-fallback-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(1.75rem, 5vw, 2.75rem) 1.25rem;
    min-height: 200px;
  }
  .gl-article-hero-fallback-eyebrow {
    color: var(--primary-color);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    font-family: 'Lato', system-ui, sans-serif;
    margin-bottom: 0.35rem;
  }
  .gl-article-hero-fallback-icon {
    font-size: clamp(2.5rem, 8vw, 3.25rem);
    color: var(--primary-color-dark);
    opacity: 0.45;
    line-height: 1;
    margin: 0.25rem 0 0.5rem;
  }
  .gl-article-hero-fallback-note {
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
    max-width: 26rem;
    margin: 0;
  }

  /* Article lead image - aspect follows source dimensions (see Article::heroDisplaySpec) */
  .gl-article-hero {
    margin: 0;
  }
  .gl-article-hero-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .gl-article-hero--landscape .gl-article-hero-img {
    max-height: 520px;
    object-fit: cover;
    object-position: center;
  }
  .gl-article-hero--square .gl-article-hero-img {
    max-width: min(100%, 520px);
    max-height: min(72vw, 520px);
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    background: var(--tint-light);
  }
  .gl-article-hero--portrait .gl-article-hero-img {
    max-width: min(100%, 420px);
    max-height: min(85vh, 640px);
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    background: var(--tint-light);
  }
