/* =================================================================
   Expansao Portuguesa — Collection Page Styles
   Phase 1I.4 · css/expansao.css
   Depends on: style.css (shared tokens, header, footer)
   Prefix: .ep-  (avoids collision with .mc- and .met- classes)
   ================================================================= */

/* --- Hero ----------------------------------------------------------- */
.ep-hero {
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(32px, 4vw, 48px);
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}
.ep-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}
.ep-hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  color: var(--royal);
}
[data-theme="dark"] .ep-hero-title { color: var(--text); }
.ep-hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 auto 20px;
}
.ep-hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.ep-hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ep-hero-stat strong {
  color: var(--azulejo);
  font-weight: 700;
}
[data-theme="dark"] .ep-hero-stat strong { color: var(--gold); }
.ep-hero-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
}
.ep-hero-back:hover { color: var(--azulejo); }
[data-theme="dark"] .ep-hero-back:hover { color: var(--gold); }

/* --- Shared section wrapper ----------------------------------------- */
.ep-section {
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}
.ep-section-alt {
  background: var(--light-blue);
}
[data-theme="dark"] .ep-section-alt {
  background: var(--surface);
}
.ep-inner {
  max-width: 840px;
  margin: 0 auto;
}
.ep-section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 10px;
  color: var(--royal);
}
[data-theme="dark"] .ep-section-title { color: var(--text); }
.ep-section-lede {
  font-family: var(--serif);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 32px;
}

/* --- Central question blockquote ------------------------------------ */
.ep-question {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--royal);
  line-height: 1.4;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 0;
  border: none;
}
[data-theme="dark"] .ep-question { color: var(--gold); }

/* --- Editorial prose ------------------------------------------------ */
.ep-prose {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 640px;
}
[data-theme="dark"] .ep-prose { color: var(--text-muted); }
.ep-prose p {
  margin: 0 0 16px;
}
.ep-prose strong {
  color: var(--ink);
  font-weight: 600;
}
[data-theme="dark"] .ep-prose strong { color: var(--text); }
.ep-prose a {
  color: var(--azulejo);
  text-decoration: underline;
  text-underline-offset: 2px;
}
[data-theme="dark"] .ep-prose a { color: var(--gold); }

/* --- Three acts ----------------------------------------------------- */
.ep-acts {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ep-act {
  padding-left: 20px;
  border-left: 3px solid var(--gold);
}
.ep-act-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.ep-act-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--royal);
  margin: 0 0 8px;
  line-height: 1.3;
}
[data-theme="dark"] .ep-act-title { color: var(--text); }
.ep-act-prose {
  font-family: var(--serif);
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
}
[data-theme="dark"] .ep-act-prose { color: var(--text-muted); }

/* --- Place cards ---------------------------------------------------- */
.ep-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.ep-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .ep-card {
  background: var(--surface-2);
  border-color: var(--border);
}
.ep-card-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.ep-card-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
}
[data-theme="dark"] .ep-card-title { color: var(--text); }
.ep-card-date {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0 0 10px;
}
.ep-card-summary {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
}
[data-theme="dark"] .ep-card-summary { color: var(--text-muted); }
.ep-card-cta {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
}
.ep-card-cta:hover { text-decoration: underline; }
[data-theme="dark"] .ep-card-cta { color: var(--gold); }

/* --- Region tag colours (7 maritime regions) ------------------------ */
.ep-tag--atlantico       { background: #d0e2f2; color: #1a4a7a; }
.ep-tag--costa-africa    { background: #f0e4c8; color: #6b4f14; }
.ep-tag--indico          { background: #c8e8e0; color: #14523e; }
.ep-tag--india           { background: #f4dcc8; color: #7a3d10; }
.ep-tag--brasil          { background: #c8e8d0; color: #1a5c2e; }
.ep-tag--oriente         { background: #e0d0f0; color: #4a1e6b; }
.ep-tag--pacifico        { background: #f0c8d4; color: #7a1a30; }

[data-theme="dark"] .ep-tag--atlantico       { background: #152a3e; color: #7ab8e0; }
[data-theme="dark"] .ep-tag--costa-africa    { background: #2e2414; color: #d4a84c; }
[data-theme="dark"] .ep-tag--indico          { background: #0e2e24; color: #5cc8a8; }
[data-theme="dark"] .ep-tag--india           { background: #2e1e0e; color: #e0944c; }
[data-theme="dark"] .ep-tag--brasil          { background: #0e2e18; color: #5cc87a; }
[data-theme="dark"] .ep-tag--oriente         { background: #20142e; color: #b888e0; }
[data-theme="dark"] .ep-tag--pacifico        { background: #2e1420; color: #e06888; }

/* --- Maritime regions overview -------------------------------------- */
.ep-regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.ep-region {
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg);
}
[data-theme="dark"] .ep-region {
  background: var(--surface-2);
}
.ep-region--atlantico    { border-left: 3px solid #2E75B6; }
.ep-region--costa-africa { border-left: 3px solid #8B6914; }
.ep-region--indico       { border-left: 3px solid #1E6B5A; }
.ep-region--india        { border-left: 3px solid #B85C1F; }
.ep-region--brasil       { border-left: 3px solid #2D8B46; }
.ep-region--oriente      { border-left: 3px solid #7B2D8B; }
.ep-region--pacifico     { border-left: 3px solid #B82D4A; }

[data-theme="dark"] .ep-region--atlantico    { border-left-color: #5BA3E6; }
[data-theme="dark"] .ep-region--costa-africa { border-left-color: #C9922A; }
[data-theme="dark"] .ep-region--indico       { border-left-color: #3DAE94; }
[data-theme="dark"] .ep-region--india        { border-left-color: #E07B3A; }
[data-theme="dark"] .ep-region--brasil       { border-left-color: #4EBF6B; }
[data-theme="dark"] .ep-region--oriente      { border-left-color: #A84EC0; }
[data-theme="dark"] .ep-region--pacifico     { border-left-color: #E05070; }

.ep-region-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
[data-theme="dark"] .ep-region-name { color: var(--text); }
.ep-region-detail {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}
[data-theme="dark"] .ep-region-detail { color: var(--text-muted); }

/* --- Mission section ------------------------------------------------ */
.ep-mission-highlight {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
[data-theme="dark"] .ep-mission-highlight {
  background: var(--surface-2);
  border-color: var(--border);
}
.ep-mission-name {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--royal);
  margin: 0 0 8px;
}
[data-theme="dark"] .ep-mission-name { color: var(--text); }
.ep-mission-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 16px;
  max-width: 540px;
}
[data-theme="dark"] .ep-mission-desc { color: var(--text-muted); }
.ep-mission-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  padding: 10px 24px;
  border: 1.5px solid var(--azulejo);
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.ep-mission-cta:hover {
  background: var(--azulejo);
  color: #fff;
}
[data-theme="dark"] .ep-mission-cta {
  color: var(--gold);
  border-color: var(--gold);
}
[data-theme="dark"] .ep-mission-cta:hover {
  background: var(--gold);
  color: #0a0f1e;
}
.ep-missions-also {
  margin-top: 8px;
}
.ep-missions-also-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0 0 10px;
}
.ep-missions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ep-mission-chip {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--light-blue);
  color: var(--azulejo);
  border: 1px solid var(--border);
}
[data-theme="dark"] .ep-mission-chip {
  background: var(--surface);
  color: var(--gold);
  border-color: var(--border);
}

/* --- Certainty items ------------------------------------------------ */
.ep-certainty-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ep-certainty-list li {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
[data-theme="dark"] .ep-certainty-list li { color: var(--text-muted); }
.ep-certainty-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-certainty--alto    { background: #d4edda; color: #155724; }
.ep-certainty--medio   { background: #fff3cd; color: #856404; }
.ep-certainty--debatido { background: #f8d7da; color: #721c24; }

[data-theme="dark"] .ep-certainty--alto    { background: #1a3a2a; color: #8fd4a4; }
[data-theme="dark"] .ep-certainty--medio   { background: #3a3018; color: #d4b95c; }
[data-theme="dark"] .ep-certainty--debatido { background: #3a1a1e; color: #d48a92; }

.ep-method-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  margin-top: 4px;
}
.ep-method-link:hover { text-decoration: underline; }
[data-theme="dark"] .ep-method-link { color: var(--gold); }

/* --- Question chips (static suggestion block) ---------------------- */
.ep-question-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ep-question-chip {
  display: inline-block;
  font-family: var(--serif);
  font-size: 14.5px;
  font-style: italic;
  color: var(--azulejo);
  text-decoration: none;
  padding: 12px 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg);
  line-height: 1.45;
  transition: border-color .15s, box-shadow .15s;
}
.ep-question-chip:hover {
  border-color: var(--azulejo);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .ep-question-chip {
  color: var(--gold);
  background: var(--surface-2);
  border-color: var(--border);
}
[data-theme="dark"] .ep-question-chip:hover {
  border-color: var(--gold);
}

/* --- Journey CTA hierarchy ----------------------------------------- */
.ep-journey-dominant {
  max-width: 540px;
  margin: 0 auto 28px;
  padding: 28px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--light-blue);
  text-align: left;
}
[data-theme="dark"] .ep-journey-dominant {
  background: var(--surface-2);
}
.ep-journey-dominant-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--royal);
  margin: 0 0 8px;
  line-height: 1.3;
}
[data-theme="dark"] .ep-journey-dominant-title { color: var(--text); }
.ep-journey-dominant-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 480px;
}
[data-theme="dark"] .ep-journey-dominant-desc { color: var(--text-muted); }
.ep-journey-dominant-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  background: var(--azulejo);
  border-radius: var(--radius);
  transition: background .15s;
}
.ep-journey-dominant-cta:hover {
  background: var(--royal);
}
[data-theme="dark"] .ep-journey-dominant-cta {
  background: var(--gold);
  color: #0a0f1e;
}
[data-theme="dark"] .ep-journey-dominant-cta:hover {
  background: #e8ab3a;
}

.ep-journey-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.ep-journey-secondary-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  padding: 10px 24px;
  border: 1.5px solid var(--azulejo);
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.ep-journey-secondary-link:hover {
  background: var(--azulejo);
  color: #fff;
}
[data-theme="dark"] .ep-journey-secondary-link {
  color: var(--gold);
  border-color: var(--gold);
}
[data-theme="dark"] .ep-journey-secondary-link:hover {
  background: var(--gold);
  color: #0a0f1e;
}

.ep-journey-tertiary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.ep-journey-tertiary-link {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
}
.ep-journey-tertiary-link:hover {
  color: var(--azulejo);
  text-decoration: underline;
}
[data-theme="dark"] .ep-journey-tertiary-link { color: var(--text-muted); }
[data-theme="dark"] .ep-journey-tertiary-link:hover { color: var(--gold); }

/* --- Mobile --------------------------------------------------------- */
@media (max-width: 600px) {
  .ep-hero-stats {
    flex-direction: column;
    gap: 6px;
  }
  .ep-cards {
    grid-template-columns: 1fr;
  }
  .ep-regions {
    grid-template-columns: 1fr;
  }
  .ep-missions-chips {
    flex-direction: column;
  }
  .ep-certainty-list li {
    flex-direction: column;
    gap: 4px;
  }
  .ep-mission-highlight {
    padding: 20px 18px;
  }
  .ep-question-chips {
    flex-direction: column;
  }
  .ep-journey-dominant {
    padding: 20px 18px;
  }
  .ep-journey-secondary {
    flex-direction: column;
    align-items: center;
  }
  .ep-journey-secondary-link {
    width: 100%;
    text-align: center;
    max-width: 300px;
  }
  .ep-journey-tertiary {
    flex-direction: column;
    gap: 10px;
  }
}

/* === Modal: mapa focado por marco === */
.ep-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.ep-modal.is-open { display: flex; }

.ep-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 27, 94, 0.60);
  cursor: pointer;
}

.ep-modal-inner {
  position: relative;
  z-index: 1;
  width: min(860px, 92vw);
  border-radius: var(--radius-lg, 12px);
  background: var(--bg, #fff);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ep-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 61, 165, 0.12);
}

.ep-modal-title {
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--royal, #003DA5);
  letter-spacing: -0.01em;
}

.ep-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 61, 165, 0.2);
  background: transparent;
  color: var(--ink-soft, #666);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ep-modal-close:hover { background: rgba(0, 61, 165, 0.06); }

.ep-modal-map {
  height: 480px;
  width: 100%;
}

.ep-modal-caption {
  padding: 10px 20px;
  font-size: 12px;
  color: var(--ink-muted, #888);
  font-family: var(--sans, 'Inter', sans-serif);
  border-top: 1px solid rgba(0, 61, 165, 0.08);
}

@media (max-width: 600px) {
  .ep-modal-inner {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .ep-modal-map { height: calc(100dvh - 110px); }
}
