/* =========================================================
   Departamento de Organismos y Comercio Exterior — style.css
   ========================================================= */

:root {
  --navy: #0f2444;
  --navy-dark: #081733;
  --navy-light: #1c3a68;
  --teal: #0e7c86;
  --teal-dark: #0a5c64;
  --gold: #c9a24b;
  --bg: #f6f8fa;
  --white: #ffffff;
  --text: #202b3c;
  --muted: #5c6675;
  --border: #e3e7ec;
  --success: #1f8a55;
  --success-bg: #eaf6ef;
  --danger: #b3402f;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 36, 68, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 36, 68, 0.12);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.btn svg, .eyebrow svg, .card-link svg, .nav-cta svg { width: 16px; height: 16px; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; color: var(--navy); }
p { margin: 0 0 1em; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cfd8e6;
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #e7ecf3; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 18px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 24px; height: 24px; stroke: #fff; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.02rem; color: var(--navy); font-weight: 800; letter-spacing: .2px; }
.brand-text span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

nav.main-nav { display: flex; align-items: center; gap: 4px; }
nav.main-nav > ul { display: flex; align-items: center; gap: 2px; }
nav.main-nav > ul > li { position: relative; }
nav.main-nav a.nav-link,
nav.main-nav summary.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
nav.main-nav summary.nav-link::-webkit-details-marker { display: none; }
nav.main-nav a.nav-link:hover,
nav.main-nav summary.nav-link:hover { background: var(--bg); color: var(--teal-dark); }
nav.main-nav a.nav-link.active { color: var(--teal-dark); background: #eaf5f6; }

.caret { width: 10px; height: 10px; transition: transform .15s ease; }
details[open] > summary .caret { transform: rotate(180deg); }

.dropdown-panel {
  list-style: none;
  margin: 6px 0 0;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 260px;
}
@media (min-width: 861px) {
  .dropdown-panel { position: absolute; top: 100%; left: 0; }
}
.dropdown-panel li a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: .88rem;
  color: var(--text);
}
.dropdown-panel li a:hover { background: var(--bg); }
.dropdown-panel li a svg { width: 16px; height: 16px; stroke: var(--teal-dark); flex-shrink: 0; margin-top: 2px; }
.dropdown-panel li a .dd-title { font-weight: 700; color: var(--navy); display: block; }
.dropdown-panel li a .dd-desc { color: var(--muted); font-size: .8rem; }

.nav-cta {
  margin-left: 8px;
  background: var(--teal);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--navy); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  nav.main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--white);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 24px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav > ul { flex-direction: column; align-items: stretch; width: 100%; gap: 2px; }
  .dropdown-panel { box-shadow: none; border: none; padding-left: 14px; min-width: 0; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1100px 480px at 85% -10%, #1c3a68 0%, var(--navy) 55%, var(--navy-dark) 100%);
  color: #fff;
  padding: 68px 0 84px;
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: #cfe4e6; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: .45em; }
.hero p.lead { color: #dbe4f0; font-size: 1.08rem; max-width: 54ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 9px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }

.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(2px);
}
.hero-card ul { display: flex; flex-direction: column; gap: 12px; }
.hero-card li { display: flex; gap: 10px; align-items: flex-start; color: #e8eef7; font-size: .93rem; }
.hero-card li svg { width: 18px; height: 18px; stroke: var(--gold); flex-shrink: 0; margin-top: 2px; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* Simpler inner hero (organism / secondary pages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 46px 0 54px;
}
.page-hero .icon-badge {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.page-hero .icon-badge svg { width: 30px; height: 30px; stroke: var(--gold); }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .35em; }
.page-hero p { color: #dbe4f0; max-width: 68ch; font-size: 1.02rem; margin-bottom: 0; }
.breadcrumb { font-size: .82rem; color: #b9c6dd; margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin: 0 6px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.kicker {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-dark); margin-bottom: 10px;
}
.section-head p { color: var(--muted); }

/* ---------- Cards grid (organismos) ---------- */
.grid-5 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-5 { grid-template-columns: 1fr; } }

.org-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column; height: 100%;
}
.org-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.org-card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #eaf5f6; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.org-card .icon svg { width: 26px; height: 26px; stroke: var(--teal-dark); }
.org-card h3 { font-size: 1.1rem; margin-bottom: .4em; }
.org-card p { color: var(--muted); font-size: .93rem; flex-grow: 1; }
.org-card .card-link { color: var(--teal-dark); font-weight: 700; font-size: .88rem; margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; }
.org-card .card-link svg { width: 14px; height: 14px; stroke: var(--teal-dark); }

/* ---------- Feature list (3-4 col) ---------- */
.grid-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .grid-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-features { grid-template-columns: 1fr; } }
.feature { padding: 6px; }
.feature .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; stroke: var(--teal-dark); }
.feature h4 { font-size: 1rem; margin-bottom: .35em; }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.step .num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; margin-bottom: 14px;
}
.step h4 { font-size: 1rem; margin-bottom: .35em; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Two-column checklist block ---------- */
.doc-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 820px) { .doc-columns { grid-template-columns: 1fr; } }

.doc-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.doc-panel .doc-panel-head {
  padding: 18px 22px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.doc-panel.import .doc-panel-head { background: #eef4fb; }
.doc-panel.export .doc-panel-head { background: #eaf6ef; }
.doc-panel-head .tag-icon { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.doc-panel-head .tag-icon svg { width: 18px; height: 18px; stroke: var(--navy); }
.doc-panel-head h3 { margin: 0; font-size: 1.05rem; }
.doc-panel-head span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.checklist { padding: 10px 22px 22px; display: flex; flex-direction: column; }
.checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px dashed var(--border);
}
.checklist li:last-child { border-bottom: none; }
.checklist li .chk {
  width: 22px; height: 22px; border-radius: 6px; background: var(--success-bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.checklist li .chk svg { width: 13px; height: 13px; stroke: var(--success); }
.checklist li .doc-title { font-weight: 700; font-size: .94rem; display: block; color: var(--navy); }
.checklist li .doc-desc { font-size: .87rem; color: var(--muted); }

.note-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff8e9; border: 1px solid #f1dfae;
  border-radius: var(--radius); padding: 18px 20px; margin-top: 28px;
}
.note-box .icon { width: 30px; height: 30px; border-radius: 8px; background: #fff; border: 1px solid #f1dfae; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.note-box .icon svg { width: 16px; height: 16px; stroke: #92660f; }
.note-box p { margin: 0; font-size: .89rem; color: #6b4f0f; }
.note-box strong { color: #4d3800; }

/* ---------- Info blocks (qué es / normativa) ---------- */
.info-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; margin-bottom: 44px; }
@media (max-width: 900px) { .info-grid { grid-template-columns: 1fr; } }
.info-main h2 { font-size: 1.4rem; }
.info-main ul.bullets { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.info-main ul.bullets li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--text); }
.info-main ul.bullets li svg { width: 16px; height: 16px; stroke: var(--teal-dark); flex-shrink: 0; margin-top: 4px; }

.side-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); align-self: start;
}
.side-card h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 12px; }
.side-card ul { display: flex; flex-direction: column; gap: 10px; }
.side-card li { font-size: .88rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.side-card li:last-child { border: none; padding-bottom: 0; }
.side-card li strong { display: block; color: var(--navy); font-size: .89rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--teal-dark), var(--navy));
  border-radius: 18px; color: #fff; padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-banner h3 { color: #fff; font-size: 1.35rem; margin-bottom: .3em; }
.cta-banner p { color: #dcebf0; margin: 0; max-width: 46ch; }
.cta-banner .btn-ghost { border-color: rgba(255,255,255,.5); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer; padding: 18px 0; font-weight: 700; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { width: 22px; height: 22px; border-radius: 999px; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; color: var(--teal-dark); transition: transform .15s ease; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; color: var(--muted); margin: 0; }

/* ---------- Table (comparativa) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.compare { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .9rem; }
table.compare th, table.compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); }
table.compare thead th { background: var(--navy); color: #fff; font-weight: 700; }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare tbody tr:hover { background: var(--bg); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.contact-info-card h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.contact-info-card p { margin: 0; font-weight: 600; color: var(--navy); }
.contact-info-card .row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.contact-info-card .row:last-child { border-bottom: none; }
.contact-info-card .row .icon { width: 36px; height: 36px; border-radius: 9px; background: #eaf5f6; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-card .row .icon svg { width: 18px; height: 18px; stroke: var(--teal-dark); }

form.contact-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .87rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .93rem; background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.consent input { margin-top: 3px; }
.form-note { font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-dark); color: #b9c6dd; padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { color: #fff; font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: .89rem; color: #b9c6dd; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { font-size: .89rem; color: #9fb0c8; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; font-size: .8rem; color: #8ea0ba; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #b9c6dd; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Misc ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: .78rem; font-weight: 700; color: var(--navy);
}
