/* ============================================
   Lumen Edu — Global Stylesheet v3
   Merging original layout with dark glass style
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold:         #D4A843;
  --gold-light:   #F0C96A;
  --gold-dim:     rgba(212,168,67,0.15);
  --gold-glow:    rgba(212,168,67,0.07);
  --navy:         #1A1F3C;
  --navy-mid:     #121628;
  --navy-deep:    #0B0E1C;
  --glass:        rgba(20,25,50,0.6);
  --glass-light:  rgba(255,255,255,0.04);
  --border:       rgba(212,168,67,0.2);
  --border-faint: rgba(255,255,255,0.07);
  --text:         #EEE8D5;
  --text-muted:   rgba(238,232,213,0.58);
  --text-faint:   rgba(238,232,213,0.25);
  --radius:       12px;
  --radius-lg:    18px;
  --nav-h:        62px;
  --max-w:        900px;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -5%,  rgba(212,168,67,0.11) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 85% 15%,  rgba(26,31,60,0.95)   0%, transparent 60%),
    radial-gradient(ellipse 100% 50% at 50% 105%, rgba(212,168,67,0.07) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a   { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ══════════════════════════════════════════
   NAVIGATION — centered logo + links
   ══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(9,12,24,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 0 2rem;
  z-index: 200;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-size: 0;           /* hide text, show only img */
}
.nav-logo img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

/* ── Hamburger button — hidden on desktop, shown only under the breakpoint ── */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}
.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  position: relative;
  transition: background 0.2s;
}
.nav-burger span::before,
.nav-burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  transition: transform 0.25s ease;
}
.nav-burger span::before { top: -6px; }
.nav-burger span::after  { top: 6px; }
/* X transformation when menu is open */
#nav-toggle:checked ~ nav .nav-burger span { background: transparent; }
#nav-toggle:checked ~ nav .nav-burger span::before { transform: translateY(6px) rotate(45deg); }
#nav-toggle:checked ~ nav .nav-burger span::after  { transform: translateY(-6px) rotate(-45deg); }
.nav-links > li { position: relative; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active  { border-bottom: 2px solid var(--gold); }

/* ── Dropdown on Recursos ── */
/* The key trick: top:100% + padding-top creates an invisible hover bridge
   so the mouse can travel from the nav link down into the dropdown
   without the hover state dropping. The visible card is inside
   .nav-dropdown-inner so only IT gets the background/border. */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  /* padding-top = invisible gap that keeps hover alive while mouse moves down */
  padding-top: 10px;
  width: 260px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateX(-50%) translateY(-4px);
  z-index: 300;
}
.nav-links > li:hover .nav-dropdown,
.nav-links > li:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-inner {
  background: rgba(10,13,28,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.65rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  position: relative;
}
.nav-dropdown-inner::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(212,168,67,0.25);
  border-top: none;
}
.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-dropdown a:hover {
  background: var(--gold-dim);
  border-color: var(--border);
  color: var(--gold-light);
}

/* ══════════════════════════════════════════
   PAGE WRAPPER
   ══════════════════════════════════════════ */
.page          { padding-top: var(--nav-h); padding-bottom: 0; }
.container     { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section-wrap  { padding: 4rem 1.5rem; }
/* The recursos hero uses negative margin to cancel page padding and go edge-to-edge */
.hero-fullwidth { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }

/* ══════════════════════════════════════════
   HERO — home
   ══════════════════════════════════════════ */
.hero-home {
  text-align: center;
  padding: 5rem 1.5rem 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.hero-home h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.hero-home .tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}
.hero-home p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 1.5rem auto 0;
  line-height: 1.8;
}

/* ── Home hero book image ── */
.hero-img-full {
  width: calc(100% - 3rem);
  max-width: 860px;
  margin: 2rem auto;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
}

/* ══════════════════════════════════════════
   FULL-WIDTH HERO (Recursos page)
   Sits directly under the fixed nav,
   fills the entire visible viewport.
   ══════════════════════════════════════════ */
.hero-fullwidth {
  position: relative;
  /* 100% width relative to page + full viewport height — no calc needed */
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* cancel out .page's padding-top so image starts right below nav */
  margin-top: calc(-1 * var(--nav-h));
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
/* dark tint overlay — lighter than before so the library is clearer */
.hero-fullwidth::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 28, 0.32);
  z-index: 0;
}
/* bottom fade to match page background */
.hero-fullwidth::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent        0%,
    transparent        55%,
    rgba(9,12,24,0.6)  82%,
    rgba(9,12,24,1.0)  100%
  );
  z-index: 0;
}
.hero-fullwidth-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 760px;
  margin-top: 2rem;
}
.hero-fullwidth-text h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-fullwidth-text p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
}
.hero-fullwidth-credit {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  z-index: 3;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
}
.hero-fullwidth-credit a { color: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════════
   FEATURE ROWS (home — Materiais, Mentores, Comunidade)
   ══════════════════════════════════════════ */
.feature-section { padding: 5rem 1.5rem; }
.feature-row {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto 4rem;
}
.feature-row.reverse { flex-direction: row-reverse; }
.feature-row:last-child { margin-bottom: 0; }
.feature-img {
  flex: 0 0 280px;
  height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}
.feature-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.feature-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  max-width: 340px;
}

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  border: none;
  letter-spacing: 0.01em;
}
.btn-dark {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.btn-dark:hover { background: rgba(255,255,255,0.16); color: var(--text); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  box-shadow: 0 0 20px rgba(212,168,67,0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(212,168,67,0.5);
  transform: translateY(-1px);
  color: var(--navy-deep);
}
.btn-discord {
  background: #5865F2;
  color: #fff;
  font-style: italic;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(88,101,242,0.4);
  width: 100%;
  max-width: 500px;
  justify-content: center;
}
.btn-discord:hover { background: #4752c4; color: #fff; transform: translateY(-1px); }
.btn-discord img { width: 24px; height: 24px; }

/* ══════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════ */
.faq-section {
  padding: 3rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.faq-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
}
.faq-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}
.faq-item {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-faint);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.faq-item:last-child { border-bottom: none; }
.faq-plus {
  color: var(--text-faint);
  font-size: 1.1rem;
  margin-top: 0.05rem;
  flex-shrink: 0;
}
.faq-item h3 {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}
.faq-item p {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ══════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  padding: 4rem 1.5rem;
  text-align: center;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-license {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.footer-license a { color: rgba(255,255,255,0.45); }
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

/* ══════════════════════════════════════════
   RECURSOS — icon grid
   ══════════════════════════════════════════ */
.subject-section {
  padding: 4rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.subject-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 2.5rem;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* fixed row height keeps every row's icon band perfectly aligned */
  gap: 2.5rem 1.5rem;
  justify-items: center;
}
.subject-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  transition: transform 0.2s;
  width: 100%;
  max-width: 160px;
}
.subject-item:hover { transform: translateY(-3px); }
/* fixed-size frame so every icon — square, circular, or oddly-padded —
   occupies an identical footprint regardless of its own internal proportions */
.subject-item-frame {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.subject-item-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
.subject-item span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  text-align: center;
}

/* Quick links row (YouTube, Sites úteis, Faculdade EUA) */
.quick-links-section {
  padding: 3rem 1.5rem 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.quick-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s;
}
.quick-link-item:hover { transform: translateY(-3px); }
.quick-link-frame {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quick-link-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.quick-link-item span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.credits-bar {
  text-align: center;
  padding: 1rem 1.5rem 2rem;
  font-size: 0.7rem;
  color: var(--text-faint);
}
.credits-bar a { color: var(--text-faint); }

/* ══════════════════════════════════════════
   INNER PAGES — subject / PDF
   ══════════════════════════════════════════ */
.inner-page { padding: 5rem 1.5rem 4rem; max-width: var(--max-w); margin: 0 auto; }

.breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--text-faint); margin-bottom: 2rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--text-faint); }
.breadcrumb .current { color: var(--text-muted); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 560px;
}

/* Sub-topic card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover { border-color: var(--border); box-shadow: 0 0 20px rgba(212,168,67,0.1); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 1.5rem; margin-bottom: 0.65rem; }
.card h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; position: relative; }
.card p  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; position: relative; }

/* PDF topic blocks */
.pdf-topic {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  margin-bottom: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.pdf-topic::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 3px 0 0 3px;
}
.pdf-topic:hover { border-color: var(--border); }
.pdf-topic h3 { font-size: 0.97rem; font-weight: 600; color: var(--text); margin-bottom: 0.8rem; }
.pdf-btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.btn-pdf-aula {
  background: linear-gradient(135deg, rgba(212,168,67,0.18), rgba(212,168,67,0.08));
  color: var(--gold-light); border: 1px solid rgba(212,168,67,0.35);
  padding: 0.42rem 0.95rem; border-radius: var(--radius); font-size: 0.78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem; transition: all 0.2s;
}
.btn-pdf-aula:hover { background: rgba(212,168,67,0.28); box-shadow: 0 0 12px rgba(212,168,67,0.2); color: var(--gold-light); }
.btn-pdf-exercicios {
  background: rgba(255,255,255,0.04); color: var(--text-muted);
  border: 1px solid var(--border-faint); padding: 0.42rem 0.95rem; border-radius: var(--radius);
  font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; transition: all 0.2s;
}
.btn-pdf-exercicios:hover { border-color: var(--border); color: var(--text); background: rgba(255,255,255,0.07); }

/* ══════════════════════════════════════════
   SOBRE NÓS
   ══════════════════════════════════════════ */
.sobre-intro {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.8;
}
.sobre-intro strong { color: var(--text); font-weight: 700; }
.sobre-intro a { color: var(--gold); }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.profile-card {
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid var(--border-faint); border-radius: var(--radius-lg); padding: 1.5rem;
}
.profile-card-header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.profile-card-header img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(212,168,67,0.2); flex-shrink: 0;
}
.profile-card-header h3 { font-size: 0.97rem; font-weight: 700; color: var(--text); }
.profile-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; }

/* ══════════════════════════════════════════
   COMUNIDADE
   ══════════════════════════════════════════ */
.comunidade-wrap {
  max-width: 680px; margin: 0 auto; padding: 5rem 1.5rem 4rem; text-align: center;
}
.comunidade-wrap h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700; color: var(--text); margin-bottom: 1.5rem;
}
.comunidade-wrap p { font-size: 1rem; color: var(--text-muted); line-height: 1.85; margin-bottom: 1rem; }
.comunidade-wrap .btn-discord { margin: 2rem auto 0; }

/* ══════════════════════════════════════════
   NOTICE / DIVIDER / PILLS
   ══════════════════════════════════════════ */
.notice {
  background: rgba(212,168,67,0.1); border: 1px solid rgba(212,168,67,0.28);
  border-radius: var(--radius); padding: 1rem 1.25rem; font-size: 0.875rem; color: var(--text); margin-top: 1.5rem;
}
.divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); opacity: 0.15; margin: 3rem 0; }
.section-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; display: block; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.pill { padding: 0.35rem 0.9rem; border-radius: 999px; font-size: 0.78rem; font-weight: 500; border: 1px solid var(--border-faint); color: var(--text-muted); background: var(--glass-light); transition: all 0.2s; }
.pill:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }

/* ══════════════════════════════════════════
   404
   ══════════════════════════════════════════ */
.notfound { text-align: center; padding: 8rem 1.5rem; }
.notfound h1 { font-family: var(--font-display); font-size: 5rem; color: var(--text); font-weight: 300; }
.notfound p  { color: var(--text-muted); margin: 1rem 0 2rem; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
/* ══════════════════════════════════════════
   MOBILE NAV — checkbox-driven slide-down panel
   #nav-toggle is a hidden checkbox placed right before <nav> in the HTML.
   The hamburger <label> toggles it; CSS does the rest, no JS needed.
   ══════════════════════════════════════════ */
@media (max-width: 760px) {
  .nav-burger { display: flex; }

  /* Collapse the centered desktop layout into a left logo + right burger */
  nav { justify-content: space-between; gap: 0; padding: 0 1.25rem; }

  .nav-links {
    /* full-width dropdown panel anchored under the fixed nav */
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(9,12,24,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  #nav-toggle:checked ~ nav .nav-links {
    max-height: 80vh;
    overflow-y: auto;
  }
  .nav-links > li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-faint);
    font-size: 0.95rem;
  }
  .nav-links a.active { border-bottom: 1px solid var(--border-faint); }

  /* Recursos dropdown becomes an inline expandable block instead of a hover popup.
     !important is deliberate and narrow: phones have no hover, so the dropdown
     must always render open under "Recursos" regardless of the desktop
     :hover/:focus-within rule's higher specificity. */
  .nav-dropdown {
    position: static !important;
    top: auto !important; left: auto !important; transform: none !important;
    padding-top: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    pointer-events: all !important;
    max-height: none !important;
  }
  .nav-dropdown-inner {
    grid-template-columns: 1fr 1fr;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,0.03);
    box-shadow: none;
    padding: 0.75rem 1.25rem 1rem;
  }
  .nav-dropdown-inner::before { display: none; }
  .nav-dropdown a { padding: 0.6rem 0.5rem; font-size: 0.85rem; }

  /* ── General layout fixes ── */
  .feature-row, .feature-row.reverse { flex-direction: column; text-align: center; }
  .feature-img { flex: 0 0 160px; height: 160px; }
  .feature-text p { max-width: 100%; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .quick-links-section { gap: 2rem; }
  .pdf-btn-row { flex-direction: column; }
  .pdf-btn-row a { justify-content: center; }
  footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .hero-fullwidth-credit { font-size: 0.58rem; max-width: 90%; line-height: 1.4; }
  .profile-card-header { flex-wrap: wrap; }
}

/* Slightly larger phones / small tablets in portrait */
@media (min-width: 480px) and (max-width: 760px) {
  .subject-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet landscape / narrow desktop: tighten nav gaps before the burger kicks in */
@media (min-width: 761px) and (max-width: 980px) {
  nav { gap: 1.25rem; padding: 0 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.8rem; }
}
