/* Consulado de Sri Lanka en Panamá — colores de la bandera nacional */
:root {
  --maroon: #8d153a;
  --maroon-dark: #5e0e27;
  --gold: #ffbe29;
  --gold-dark: #e0a100;
  --green: #00534e;
  --orange: #eb7400;
  --ink: #2b2b2b;
  --muted: #666;
  --bg: #ffffff;
  --bg-alt: #f7f3ec;
  --line: #e6dfd3;
  --radius: 6px;
  --shadow: 0 4px 18px rgba(0, 0, 0, .08);
  --serif: "Merriweather", Georgia, serif;
  --sans: "Open Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--maroon); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.3; margin: 0 0 .6em; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.center { text-align: center; }
.small { font-size: .88rem; color: var(--muted); }

/* Barra superior */
.topbar { background: var(--maroon-dark); color: #f3dfe5; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.topbar a { color: #f3dfe5; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.topbar__lang .is-active { color: var(--gold); font-weight: 700; }
.topbar__date { text-transform: capitalize; }

/* Franja con colores de la bandera */
.flag-stripe { display: flex; height: 5px; }
.flag-stripe span { flex: 1; }
.flag-stripe span:nth-child(1) { background: var(--green); }
.flag-stripe span:nth-child(2) { background: var(--orange); }
.flag-stripe span:nth-child(3) { background: var(--gold); flex: .5; }
.flag-stripe span:nth-child(4) { background: var(--maroon); flex: 3; }

/* Encabezado */
.header { background: #fff; position: relative; z-index: 20; }
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.brand__emblem { width: 74px; height: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__si { font-size: .85rem; color: var(--muted); }
.brand__title { font-family: var(--serif); font-size: 1.65rem; font-weight: 700; color: var(--maroon); line-height: 1.2; }
.brand__subtitle { font-size: 1rem; color: var(--green); font-weight: 600; letter-spacing: .02em; }
.header__flag { width: 96px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Navegación */
.nav { background: var(--maroon); position: sticky; top: 0; }
.nav__inner { display: flex; align-items: center; }
.nav__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav__menu a { display: block; padding: 14px 18px; color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 3px solid transparent; }
.nav__menu a:hover, .nav__menu a.is-active { background: var(--maroon-dark); border-bottom-color: var(--gold); }
.nav__toggle { display: none; background: none; border: 0; padding: 14px 4px; cursor: pointer; }
.nav__toggle span:not(.sr-only) { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* Aviso */
.notice { background: #fff6dc; border-bottom: 1px solid #f0dfa8; font-size: .9rem; padding: 10px 0; }
.notice strong { color: var(--maroon); }

/* Hero */
.hero { position: relative; color: #fff; padding: 110px 0 140px;
  background:
    radial-gradient(circle at 85% 30%, rgba(255,190,41,.35), transparent 45%),
    linear-gradient(120deg, var(--maroon-dark) 0%, var(--maroon) 55%, #a8244f 100%);
  overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 420px; height: 420px;
  background: url("../assets/emblema.png") center / contain no-repeat; opacity: .09; }
.hero__overlay { position: absolute; inset: 0; left: 0; width: 14px;
  background: linear-gradient(var(--green) 0 50%, var(--orange) 50% 100%); }
.hero__content { position: relative; z-index: 1; max-width: 760px; margin-left: max(16px, calc((100% - 1140px) / 2)); }
.hero__kicker { color: var(--gold); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
.hero__lead { font-size: 1.12rem; opacity: .92; max-width: 620px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* Botones */
.btn { display: inline-block; padding: 12px 24px; border-radius: var(--radius); font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: var(--sans); font-size: .95rem; transition: .2s; }
.btn--gold { background: var(--gold); color: var(--maroon-dark); }
.btn--gold:hover { background: var(--gold-dark); }
.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--maroon); }
.btn--maroon { background: var(--maroon); color: #fff; }
.btn--maroon:hover { background: var(--maroon-dark); }
.btn--block { width: 100%; }

/* Accesos rápidos */
.quick { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); margin-top: -60px; position: relative; z-index: 2; overflow: hidden; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); border-top: 4px solid var(--gold); transition: .2s; text-align: center; }
.quick__item:last-child { border-right: 0; }
.quick__item:hover { background: var(--bg-alt); border-top-color: var(--maroon); }
.quick__icon { font-size: 2rem; }
.quick__label { font-weight: 700; font-size: .92rem; color: var(--maroon); }

/* Secciones */
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: linear-gradient(135deg, var(--green), #003a37); color: #fff; }
.section__title { font-size: 1.9rem; color: var(--maroon); position: relative; padding-bottom: 14px; }
.section__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 70px; height: 4px; background: linear-gradient(90deg, var(--gold) 0 60%, var(--maroon) 60%); }
.section__title--center { text-align: center; }
.section__title--center::after { left: 50%; transform: translateX(-50%); }
.section__title--light { color: #fff; }
.section__intro { text-align: center; max-width: 720px; margin: 0 auto 40px; color: var(--muted); }
.section__intro--light { color: #d6ebe9; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }

/* Tarjetas */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card--message { border-top: 5px solid var(--maroon); text-align: center; }
.card--message p { font-style: italic; color: #444; }
.card__logo { width: 180px; margin: 0 auto 10px; }
.card__sign { font-style: normal !important; margin-top: 16px; }
.card--info { background: var(--bg-alt); border-left: 5px solid var(--gold); }
.card--form { border-top: 5px solid var(--gold); }

.checklist { list-style: none; padding: 0; margin: 16px 0; }
.checklist li { padding: 6px 0 6px 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: .75rem; display: grid; place-items: center; }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border-bottom: 4px solid var(--gold); transition: transform .2s, border-color .2s; display: flex; flex-direction: column; }
.service:hover { transform: translateY(-4px); border-bottom-color: var(--maroon); }
.service__icon { font-size: 2.2rem; margin-bottom: 10px; }
.service h3 { color: var(--maroon); font-size: 1.15rem; }
.service p { color: var(--muted); font-size: .95rem; flex: 1; }
.link-more { font-weight: 700; text-decoration: none; font-size: .9rem; }
.link-more:hover { text-decoration: underline; }

/* Pasos de visa */
.steps { list-style: none; padding: 0; margin: 24px 0 28px; }
.steps li { display: flex; gap: 16px; margin-bottom: 16px; align-items: flex-start; }
.steps span { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--maroon); color: var(--gold); font-weight: 700; display: grid; place-items: center; }

/* Sri Lanka */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 36px; }
.fact { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 20px; text-align: center; }
.fact__value { display: block; font-family: var(--serif); font-weight: 700; color: var(--gold); font-size: 1.05rem; }
.fact__label { font-size: .85rem; color: #cfe4e2; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.explore__item { border-radius: var(--radius); padding: 90px 24px 24px; color: #fff; position: relative; overflow: hidden; }
.explore__item h3 { color: var(--gold); }
.explore__item p { margin: 0; font-size: .95rem; }
.explore__item--1 { background: linear-gradient(to top, rgba(0,0,0,.55), transparent), linear-gradient(135deg, var(--maroon), var(--orange)); }
.explore__item--2 { background: linear-gradient(to top, rgba(0,0,0,.55), transparent), linear-gradient(135deg, #2e7d32, #00534e); }
.explore__item--3 { background: linear-gradient(to top, rgba(0,0,0,.55), transparent), linear-gradient(135deg, #5d7f2b, #b28704); }

/* Noticias */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news__item { border: 1px solid var(--line); border-left: 4px solid var(--maroon); border-radius: var(--radius); padding: 24px; background: #fff; }
.news__item time { display: inline-block; background: var(--gold); color: var(--maroon-dark); font-weight: 700; font-size: .8rem; padding: 2px 10px; border-radius: 20px; margin-bottom: 10px; }
.news__item h3 { font-size: 1.08rem; }
.news__item p { color: var(--muted); font-size: .94rem; margin: 0; }

/* Enlaces */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.links a { background: #fff; padding: 16px 20px; border-radius: var(--radius); text-decoration: none; font-weight: 600; border: 1px solid var(--line); transition: .2s; }
.links a::before { content: "› "; color: var(--gold-dark); font-weight: 700; }
.links a:hover { border-color: var(--maroon); background: var(--maroon); color: #fff; }

/* Contacto */
.contact { list-style: none; padding: 0; margin: 0 0 24px; }
.contact li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.contact li > span { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; color: var(--maroon); }
.map iframe { width: 100%; height: 260px; border: 1px solid var(--line); border-radius: var(--radius); }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #cfc6b8; border-radius: var(--radius); font: inherit; font-weight: 400; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: var(--maroon); }
.form .is-invalid { border-color: #c62828; background: #fff5f5; }
.form__status { margin: 12px 0 0; font-weight: 600; }
.form__status.ok { color: var(--green); }
.form__status.err { color: #c62828; }

/* Pie */
.footer { background: #2a0a14; color: #e8d6db; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0; }
.footer__brand { display: flex; gap: 16px; align-items: center; }
.footer__emblem { width: 70px; }
.footer__brand p { margin: 4px 0 0; font-size: .9rem; opacity: .8; }
.footer h4 { color: var(--gold); font-size: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; font-size: .92rem; }
.footer a { color: #e8d6db; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: .82rem; text-align: center; opacity: .8; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--maroon); color: var(--gold); display: grid; place-items: center; text-decoration: none; font-weight: 700; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .3s; z-index: 30; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Responsive */
@media (max-width: 960px) {
  .services, .news, .links { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .quick__item:nth-child(3) { border-right: 0; }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__menu { display: none; flex-direction: column; width: 100%; position: absolute; top: 100%; left: 0; background: var(--maroon); }
  .nav__menu.open { display: flex; }
  .nav__inner { position: relative; }
  .header__flag { display: none; }
  .brand__emblem { width: 56px; }
  .brand__title { font-size: 1.3rem; }
  .services, .news, .links, .explore, .footer__grid { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .quick__item { border-bottom: 1px solid var(--line); }
  .quick__item:nth-child(3) { border-right: 1px solid var(--line); }
  .quick__item:nth-child(even) { border-right: 0; }
  .hero { padding: 70px 0 100px; }
  .section { padding: 56px 0; }
  .topbar__date { display: none; }
}
.loading { text-align: center; padding: 80px 16px; color: var(--muted); }
