/* ============================================================
   Portal Documental — style.css
   Palette: Navy #0A1628  |  Gold #D4A843  |  Light #F5F0E8
   ============================================================ */

:root {
  --navy:      #0A1628;
  --navy-mid:  #112040;
  --navy-soft: #1A2E50;
  --gold:      #D4A843;
  --gold-light:#E8C76A;
  --gold-dim:  #A07E2E;
  --cream:     #F5F0E8;
  --cream-dark:#E8E0D0;
  --text:      #C8D0DC;
  --text-soft: #8A97A8;
  --white:     #FFFFFF;
  --radius:    6px;
  --transition: 0.3s ease;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Progress Bar ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Info Banner ── */
.info-banner {
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 100;
}

/* ── Header ── */
#main-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 67, 0.2);
  transition: box-shadow var(--transition);
}
#main-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}
.logo-text em {
  color: var(--gold);
  font-style: italic;
}

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-desktop a {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--gold);
  background: rgba(212, 168, 67, 0.08);
}

/* Hamburger */
#hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  padding: 6px;
  transition: border-color var(--transition);
}
#hamburger:hover { border-color: var(--gold); }

/* ── Mobile Menu ── */
#mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 90vw);
  height: 100vh;
  background: var(--navy-mid);
  border-left: 1px solid rgba(212,168,67,0.2);
  padding: 80px 32px 40px;
  gap: 4px;
  z-index: 800;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
#mobile-menu.open {
  display: flex;
  transform: translateX(0);
}
#mobile-menu a {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
#mobile-menu a:hover {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(212,168,67,0.06);
  padding-left: 20px;
}
#menu-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: var(--radius);
  color: var(--gold);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 10px;
  transition: all var(--transition);
}
#menu-close:hover { background: rgba(212,168,67,0.1); }

/* Mobile overlay */
#menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 750;
}
#menu-overlay.open { display: block; }

/* ── Hero Section ── */
#inicio {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212,168,67,0.08) 0%, transparent 70%),
              var(--navy);
}
.hero-pattern {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 110vw);
  height: min(700px, 110vw);
  opacity: 0.12;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,168,67,0.12);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.dot {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-title em {
  color: var(--gold);
  font-style: italic;
  display: block;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text);
  max-width: 640px;
  margin: 0 auto 36px;
  font-weight: 300;
  line-height: 1.8;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  border: 2px solid var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,67,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(212,168,67,0.4);
  transition: all var(--transition);
}
.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(212,168,67,0.08);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid rgba(212,168,67,0.15);
  padding-top: 40px;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

/* ── Sections ── */
.section {
  padding: 100px 24px;
}
.section-alt {
  background: var(--navy-mid);
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto 56px;
}

/* ── Page Link Grid ── */
.page-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  text-align: left;
}
.page-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,168,67,0.15);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  position: relative;
}
.page-link-card span:first-of-type { flex: 1; }
.page-link-card .arrow {
  color: var(--gold);
  font-size: 1rem;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.page-link-card:hover {
  background: rgba(212,168,67,0.08);
  border-color: rgba(212,168,67,0.4);
  color: var(--white);
  transform: translateX(4px);
}
.page-link-card:hover .arrow { transform: translateX(4px); }
.page-link-card svg { flex-shrink: 0; }

/* ── Footer ── */
footer {
  background: #060E1A;
  border-top: 1px solid rgba(212,168,67,0.15);
  padding: 64px 24px 32px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 600;
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-nav li + li { margin-top: 8px; }
.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-soft);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--gold); }
.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.7;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--gold);
  color: var(--navy);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212,168,67,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 400;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover { background: var(--gold-light); transform: translateY(-2px); }

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

/* ── Inner page layout ── */
.page-hero {
  padding: 80px 24px 60px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(212,168,67,0.07) 0%, transparent 70%),
              var(--navy);
  text-align: center;
  border-bottom: 1px solid rgba(212,168,67,0.1);
}
.page-hero .section-tag { margin-bottom: 12px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
}

.content-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 24px;
}
.content-section h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212,168,67,0.15);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 28px;
  margin-bottom: 10px;
}
.content-section p {
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.85;
}
.content-section ul, .content-section ol {
  padding-left: 0;
  margin-bottom: 20px;
}
.content-section ul li, .content-section ol li {
  padding: 8px 0 8px 24px;
  color: var(--text);
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.content-section ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}
.content-section ol {
  counter-reset: ol-counter;
}
.content-section ol li {
  counter-increment: ol-counter;
}
.content-section ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0; top: 8px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
}
.content-section a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-section a:hover { color: var(--gold-light); }
.callout {
  background: rgba(212,168,67,0.07);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}
.callout strong { color: var(--gold); }

/* Doc type cards */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.doc-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,168,67,0.15);
  border-radius: 8px;
  padding: 28px 24px;
  transition: all var(--transition);
}
.doc-card:hover {
  border-color: rgba(212,168,67,0.4);
  background: rgba(212,168,67,0.05);
  transform: translateY(-3px);
}
.doc-card-icon {
  width: 44px; height: 44px;
  background: rgba(212,168,67,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.doc-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 8px;
}
.doc-card p {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* FAQ accordion */
.faq-list { margin: 28px 0; }
.faq-item {
  border: 1px solid rgba(212,168,67,0.15);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: rgba(212,168,67,0.4); }
.faq-q {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
}
.faq-q:hover { background: rgba(212,168,67,0.06); }
.faq-q .faq-icon {
  color: var(--gold);
  font-size: 1.2rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.8;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding: 16px 20px 20px;
}

/* Glossary */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.glossary-term {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,168,67,0.12);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.glossary-term:hover { border-color: rgba(212,168,67,0.35); }
.glossary-term dt {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.glossary-term dd {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-submit {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  padding: 14px 36px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}
.form-submit:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.form-success {
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.4);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--gold);
  display: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  #hamburger { display: flex; align-items: center; justify-content: center; }
  .hero-stats { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-link-grid { grid-template-columns: 1fr 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .page-link-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-outline { text-align: center; }
}
