/* ============================================
   RÉCORD POLICIVO PANAMÁ — Design System
   Aesthetic: Institutional Authority + Digital Trust
   Palette: Navy + Panama Gold + Clean White
   Fonts: DM Serif Display + DM Sans
============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --navy:       #0B2545;
  --navy-light: #134074;
  --navy-dark:  #061830;
  --gold:       #D4A017;
  --gold-light: #F0C040;
  --gold-pale:  #FFF8E7;
  --red:        #C0392B;
  --green:      #1B7A4B;
  --white:      #FFFFFF;
  --off-white:  #F7F9FC;
  --gray-100:   #EEF1F6;
  --gray-200:   #D8DEE9;
  --gray-400:   #8A9AB5;
  --gray-600:   #4A5568;
  --gray-800:   #1A202C;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;

  --shadow-sm:  0 2px 8px rgba(11,37,69,.08);
  --shadow-md:  0 6px 24px rgba(11,37,69,.12);
  --shadow-lg:  0 16px 48px rgba(11,37,69,.18);
  --shadow-xl:  0 24px 64px rgba(11,37,69,.24);

  --radius:     8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-weight: 600; font-family: var(--font-body); }
p  { line-height: 1.75; color: var(--gray-600); }

a  { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky;
  top: 0; z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 400; white-space: nowrap;
}
.nav-logo .flag { font-size: 1.4rem; }
.nav-logo span { color: var(--gold-light); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,.82);
  padding: 8px 14px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,.12);
}
.nav-links a.active { color: var(--gold-light); }

.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--white); padding: 6px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: currentColor; margin: 5px 0;
  transition: all var(--transition);
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  position: relative; overflow: hidden;
  padding: 80px 24px 96px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(212,160,23,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(255,255,255,.04) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,160,23,.2); color: var(--gold-light);
  border: 1px solid rgba(212,160,23,.4);
  border-radius: 50px; padding: 6px 16px;
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 24px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-lead {
  color: rgba(255,255,255,.78); font-size: 1.125rem;
  max-width: 640px; margin: 0 auto 36px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: center; margin-top: 56px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--gold-light);
  display: block; line-height: 1;
}
.hero-stat .lbl { color: rgba(255,255,255,.6); font-size: .82rem; margin-top: 4px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .94rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light); color: var(--navy);
  border-color: var(--gold-light);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,160,23,.4);
}
.btn-outline {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1); color: var(--white);
  border-color: var(--white);
}
.btn-navy {
  background: var(--navy); color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-light); border-color: var(--navy-light);
  transform: translateY(-2px);
}
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ─── SECTIONS ─── */
.section { padding: 80px 24px; }
.section-alt { background: var(--off-white); }
.section-dark {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
}
.section-dark p { color: rgba(255,255,255,.75); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; }
.container-narrow { max-width: 800px; margin: 0 auto; }

.section-label {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold); margin-bottom: 12px;
  display: block;
}
.section-title { margin-bottom: 14px; }
.section-lead { font-size: 1.1rem; max-width: 600px; margin-bottom: 48px; }

/* ─── CARDS ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 28px;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.card:hover {
  border-color: var(--navy-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: var(--gold-pale); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 18px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--navy); }
.card p  { font-size: .9rem; margin-bottom: 16px; }
.card-link {
  font-size: .875rem; font-weight: 600; color: var(--navy);
  display: inline-flex; align-items: center; gap: 4px;
}
.card-link:hover { color: var(--gold); }

/* ─── STEPS ─── */
.steps { counter-reset: step; }
.step {
  display: flex; gap: 24px; margin-bottom: 40px;
  position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute;
  left: 23px; top: 52px; bottom: -8px;
  width: 2px; background: var(--gray-200);
}
.step-num {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: var(--gold-light);
  font-family: var(--font-display); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.step-body h4 { color: var(--navy); margin-bottom: 6px; font-size: 1rem; }
.step-body p  { font-size: .9rem; }

/* ─── ALERT BOX ─── */
.alert {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex; gap: 12px;
  font-size: .9rem; line-height: 1.6;
}
.alert-icon { font-size: 1.3rem; flex-shrink: 0; }
.alert-info    { background: #EBF4FF; border-left: 4px solid #3182CE; }
.alert-warning { background: #FFFBEB; border-left: 4px solid var(--gold); }
.alert-success { background: #F0FFF4; border-left: 4px solid var(--green); }
.alert-danger  { background: #FFF5F5; border-left: 4px solid var(--red); }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem; background: var(--white);
}
thead { background: var(--navy); color: var(--white); }
thead th {
  padding: 14px 16px; text-align: left;
  font-weight: 600; font-size: .85rem; letter-spacing: .04em;
}
tbody tr { border-bottom: 1px solid var(--gray-100); }
tbody tr:hover { background: var(--off-white); }
tbody td { padding: 12px 16px; }
.td-green { color: var(--green); font-weight: 600; }
.td-red   { color: var(--red);   font-weight: 600; }

/* ─── FAQ ACCORDION ─── */
.faq-list { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 20px 24px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-body); font-size: .95rem; font-weight: 600; color: var(--navy);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--off-white); }
.faq-question .faq-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gray-100); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: all var(--transition);
}
.faq-item.open .faq-icon { background: var(--navy); color: var(--gold-light); transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), padding .3s;
}
.faq-answer-inner { padding: 0 24px 20px; color: var(--gray-600); font-size: .9rem; line-height: 1.75; }
.faq-item.open .faq-answer { max-height: 500px; }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  padding: 14px 24px; background: var(--navy-dark);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.breadcrumb-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: rgba(255,255,255,.5);
}
.breadcrumb-inner a { color: rgba(255,255,255,.7); }
.breadcrumb-inner a:hover { color: var(--gold-light); }
.breadcrumb-inner .sep { color: rgba(255,255,255,.3); }
.breadcrumb-inner .current { color: var(--gold-light); }

/* ─── SIDEBAR LAYOUT ─── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px; align-items: start;
}
.sidebar {
  position: sticky; top: 84px;
}
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card-header {
  background: var(--navy); padding: 14px 20px;
}
.sidebar-card-header h4 { color: var(--gold-light); font-size: .9rem; letter-spacing: .04em; }
.sidebar-card-body { padding: 20px; }

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
  font-size: .875rem; color: var(--gray-600); padding: 4px 0;
  display: flex; align-items: center; gap: 6px;
}
.toc-list a::before {
  content: '›'; color: var(--gold); font-size: 1.1rem; line-height: 1;
}
.toc-list a:hover { color: var(--navy); }

.related-links { list-style: none; }
.related-links li { margin-bottom: 10px; }
.related-links a {
  font-size: .875rem; color: var(--navy);
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.4;
}
.related-links a::before {
  content: '📄'; flex-shrink: 0;
}
.related-links a:hover { color: var(--gold); }

/* ─── TAG CLOUD ─── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--gray-100); color: var(--gray-600);
  border-radius: 50px; padding: 4px 12px;
  font-size: .78rem; font-weight: 500;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.tag:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ─── HIGHLIGHT BOX ─── */
.highlight-box {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-xl); padding: 40px;
  color: var(--white); text-align: center;
  position: relative; overflow: hidden;
}
.highlight-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 80% 20%, rgba(212,160,23,.2) 0%, transparent 60%);
}
.highlight-box h3 { color: var(--gold-light); font-size: 1.6rem; margin-bottom: 12px; position: relative; }
.highlight-box p { color: rgba(255,255,255,.8); max-width: 480px; margin: 0 auto 24px; position: relative; }

/* ─── INFO GRID ─── */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px 22px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: all var(--transition);
}
.info-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.info-card-icon {
  font-size: 1.5rem; flex-shrink: 0; margin-top: 2px;
}
.info-card h4 { color: var(--navy); font-size: .875rem; margin-bottom: 4px; }
.info-card p  { font-size: .82rem; color: var(--gray-600); }

/* ─── PILL BADGE ─── */
.pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 50px; font-size: .75rem; font-weight: 600;
}
.pill-green  { background: #D4EDDA; color: var(--green); }
.pill-gold   { background: var(--gold-pale); color: #8A6A00; }
.pill-navy   { background: #E8EDF5; color: var(--navy); }
.pill-red    { background: #FDECEA; color: var(--red); }

/* ─── FOOTER ─── */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 60px 24px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand { }
.footer-logo {
  font-family: var(--font-display); font-size: 1.4rem; color: var(--white);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.footer-logo span { color: var(--gold-light); }
.footer-desc { font-size: .875rem; line-height: 1.7; max-width: 280px; }
.footer-col h5 {
  color: var(--gold-light); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; font-weight: 700; margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .875rem; color: rgba(255,255,255,.65); }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; font-size: .8rem;
}
.footer-bottom p { color: rgba(255,255,255,.4); }
.footer-disclaimer {
  font-size: .78rem; color: rgba(255,255,255,.35);
  text-align: center; max-width: 700px; margin: 16px auto 0; line-height: 1.6;
}

/* ─── SCHEMA HIDDEN (GEO) ─── */
.geo-content {
  font-size: .85rem; line-height: 1.8; color: var(--gray-600);
  margin: 16px 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 67px; left: 0; right: 0;
    background: var(--navy-dark); padding: 16px;
    gap: 4px; z-index: 999;
  }
  .section { padding: 56px 20px; }
  .hero { padding: 56px 20px 72px; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .highlight-box { padding: 28px 22px; }
  .step::after { display: none; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeInUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ─── ARTICLE PROSE ─── */
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 32px 0 12px; color: var(--navy); }
.prose p  { margin-bottom: 16px; }
.prose ul, .prose ol {
  margin: 12px 0 20px 24px;
}
.prose li { margin-bottom: 8px; color: var(--gray-600); font-size: .95rem; line-height: 1.7; }
.prose strong { color: var(--navy); }
.prose a { color: var(--navy-light); text-decoration: underline; }

/* ─── DIVIDER ─── */
.divider {
  border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
  margin: 40px 0;
}
