/* ===============================
   BASE / LAYOUT GRID
================================ */
html,
body{
  height: auto;          /* allow natural document height (window scroll) */
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;      /* scroll on the window */
}

body{
  display: grid;
  grid-template-columns: repeat(16, 1fr);

  /* rows: primary header, menu, secondary header, main, footer */
  grid-template-rows: auto auto auto 1fr auto;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  background: #fff;
  line-height: 1.7;
  font-size: 1.2rem;
  font-weight: 300;
  font-family: Poppins, Inter, system-ui, -apple-system, "Segoe UI", Roboto,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}


/* ===============================
   HEADER (PRIMARY)
================================ */
.header-container{
  grid-row: 1;
  grid-column: 1 / 17;
  height: 197.99px;
  background: #fff;

  display: flex;
  justify-content: center;
  align-items: flex-end;

  padding: 0 18px;
  box-sizing: border-box;
  position: relative;

  /* ✅ Container queries enabled */
  container-type: inline-size;
  container-name: header;

  /* ✅ Defaults / fallbacks */
  --icon: 46px;          /* FB/IG circle */
  --gicon-h: 33px;       /* Google image height */
  --lang: 18px;          /* language font-size */
  --gap: 5px;            /* gaps in actions + socials */
  --lang-gap: 5px;       /* gap in lang-links */
  --flag: 16px;          /* flag icon size */
  --flag-mr: 6px;        /* flag right margin */
}

/* ✅ If container query units are supported, scale variables with container width */
@supports (width: 1cqw){
  @container header (min-width: 0px){
    .header-container{
      --icon: clamp(30px, 4cqw, 46px);
      --gicon-h: clamp(30px, 4cqw, 46px);
      --lang: clamp(12px, 1.4cqw, 14px);
      --gap: clamp(8px, 1.4cqw, 14px);

      --lang-gap: clamp(6px, 1cqw, 10px);
      --flag: clamp(12px, 1.6cqw, 16px);
      --flag-mr: clamp(4px, 0.6cqw, 6px);
    }
  }

  /* ✅ When header is narrow: hide social + languages */
  @container header (max-width: 600px){
    .header-actions .social-links {
      display: none;
    }
  }
}

/* ✅ Fallback if container query units are NOT supported */
@supports not (width: 1cqw){
  .header-container{
    --icon: clamp(30px, 3.5vw, 46px);
    --gicon-h: clamp(30px, 3.5vw, 46px);
    --lang: clamp(12px, 1.2vw, 14px);
    --gap: clamp(8px, 1.2vw, 14px);

    --lang-gap: clamp(6px, 1vw, 10px);
    --flag: clamp(12px, 1.4vw, 16px);
    --flag-mr: clamp(4px, 0.6vw, 6px);
  }

  @media (max-width: 600px){
    .header-actions .social-links {
      display: none;
    }
  }
}

/* Brand (true centered) */
.header-brand{
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: 100%;

  display: flex;
  align-items: flex-end;
}
.header-brand a {
  display: flex;
  align-items: center;
}

.header-logo{
  max-height: 200px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.header-title{
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: #0b2f5b;
}

/* Header actions (right aligned) */
.header-actions{
  position: absolute;
  right: 20px;
  bottom: 20px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  gap: 0;
  padding: 0;
  padding-inline: 0;
  column-gap: 0;

  top: auto;
  left: auto;
  transform: none;

  min-width: 0;

  max-width: 45cqw;
  max-width: 45%;
}

/* Prevent long language links from forcing width */
.lang-links,
.social-links{
  min-width: 0;
  flex-wrap: nowrap;
}

/* breathing room so brand doesn't sit under actions */
@media (min-width: 769px){
  .header-container{ padding-right: 380px; }
}


/* =============================
   HEADER: SOCIAL LINKS
============================= */
.social-links{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  gap: var(--gap);
}

.social-links a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease;
}

/* Facebook + Instagram */
.social-links a:nth-child(1),
.social-links a:nth-child(2){
  width: var(--icon);
  height: var(--icon);
  border-radius: 999px;
  background: #ffffff;
}

/* Instagram */
.social-links a:nth-child(2){
  width: var(--icon);
  padding-right: 5px;
}

.social-links a:nth-child(1) img,
.social-links a:nth-child(2) img{
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

.social-links a:nth-child(1):hover,
.social-links a:nth-child(2):hover{
  background: #e3e8ee;
  transform: translateY(-2px);
}

/* Google */
.social-links a:nth-child(3){
  position: relative;
  background: transparent;
  width: auto;
  height: auto;
  padding: 0;
}

.social-links a:nth-child(3) img{
  height: var(--gicon-h);
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity .2s ease;
}

.social-links a:nth-child(3)::after{
  content: "";
  position: absolute;
  inset: 0;
  background: url("/static/img/gr-blue3.svg") center/contain no-repeat;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.social-links a:nth-child(3):hover::after{ opacity: 1; }
.social-links a:nth-child(3):hover img{ opacity: 0; }


/* =============================
   HEADER: LANGUAGE LINKS
============================= */
.lang-links{
  display: flex;
  align-items: center;
  gap: var(--lang-gap);
  font-size: var(--lang);

  color: #0b2f5b;
  font-family: inherit;
}

.lang-links a{
  color: #0b2f5b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.lang-links a:hover{ text-decoration: underline; }

.flag-icon{
  width: var(--flag);
  height: var(--flag);
  vertical-align: -2px;
  margin-right: var(--flag-mr);
  display: inline-block;
}

.lang-links a[aria-current="page"]{
  font-weight: 600;
  text-decoration: underline;
}

.lang-links a[aria-disabled="true"]{
  pointer-events: none;
  cursor: default;
  opacity: .75;
  text-decoration: none;
}

/* ✅ Mobile: Show only the non-active language link */
@media (max-width: 600px) {
  .lang-links a {
    display: none; /* Hide all by default */
  }
  .lang-links a:not([aria-current="page"]) {
    display: inline-flex; /* Show only the one that is NOT active */
  }
}



/* ===============================
   HEADER (MOBILE)
============================= */
@media (max-width: 768px){
  .header-container{
    height: 120px;
    align-items: center;
    padding-right: 18px;
  }

  .header-brand{
    height: 100%;
    align-items: center;
  }

  .header-logo{
    height: 100%;
    width: auto;
    max-width: 100%;
  }

  .header-actions{
    top: auto;
    right: 12px;
    bottom: 10px;
    min-width: 0;
    gap: 10px;
    align-items: flex-end;
  }

  .header-title{ font-size: 16px; }

  .lang-links {
    font-size: 13px;
    --flag: 13px;
  }

  .flag-icon{
    width: 14px;
    height: 14px;
    margin-right: 5px;
  }
}

/* Shared social icon */
.social-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}


/* ===============================
   SECONDARY HEADER (VIDEO BANNER)
================================ */
.header-secondary-container{
  grid-row: 3;
  grid-column: 1 / 17;
  width: 100%;
  background: #000;
  overflow: hidden;

  position: relative;
  z-index: 1;
}

.header-secondary-container video{
  width: 100%;
  height: 240px;
  display: block;
  object-fit: cover;
}

.header-secondary-container iframe{
  width: 100%;
  height: 240px;
  display: block;
  border: 0;
}

@media (max-width: 768px){
  .header-secondary-container video,
  .header-secondary-container iframe{
    height: 220px;
  }
}


/* ===============================
   MAIN (CONTENT WRAPPER)
================================ */
.site-main-container{
  grid-row: 4;
  grid-column: 1 / 17;
  padding: 0;
  min-height: 0;
}

.site-main{
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
  box-sizing: border-box;
}

.main-content{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 18px;
  box-sizing: border-box;
}


/* ===============================
   COMPONENTS (BODY CONTENT)
================================ */
/* Hero banner (centered title) */
.hero-wrap{ position: relative; }

.hero-video{
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.hero-wrap::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(220,223,224,.75);
  z-index: 1;
  pointer-events: none;
}

.hero-title{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 2;
  color: #111;
  text-align: center;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 2rem;
  width: 80%;
}

/* Typography / lists */
.list-header{
  font-weight: 600;
  text-decoration: underline;
  padding-top: 1rem;
  line-height: 1.7;
  font-size: 1.3rem;
}

.list-content{
  line-height: 2;
  font-size: 1.2rem;
  font-weight: 300;
}

.main-content strong{ font-weight: 500 !important; }

/* Tables (prices) */
.table-wrap{ width: 100%; overflow-x: auto; }

.pricing-table{
  border-collapse: collapse;
  margin: 12px 0 6px 0;
  width: min(650px, 100%);
}

.pricing-table th,
.pricing-table td{
  border: 1px solid rgba(0,0,0,.12);
  padding: 10px 12px;
  text-align: left;
  font-size: 1.2rem;
}

.pricing-table th{
  font-weight: 600;
  background: rgba(0,0,0,.04);
}

/* Poster (Inicio / CIELORD) */
.poster-center{
  display: flex;
  justify-content: center;
  padding: 48px 0 64px 0;
}

.poster-img{
  width: min(650px, 100%);
  height: auto;
  display: block;
  box-shadow: rgba(0,0,0,.10) 0 20px 25px -5px,
              rgba(0,0,0,.04) 0 10px 10px -5px;
}

/* Cónsul General (2-column card) */
.cg-card{
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
  overflow: hidden;
  margin: 26px auto 0;
}

.cg-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cg-text{ padding: 28px 28px 22px; }

.cg-kicker{
  font-size: 1.2rem;
  color: #2b6cb0;
  margin-bottom: 10px;
}

.cg-name{
  margin: 0 0 14px 0;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #111;
}

.cg-bio-clamp{
  position: relative;
  max-height: 430px;
  overflow: auto;
  color: #555;
  font-size: 1.2rem;
  line-height: 1.7;
  text-align: justify;
  padding-right: 10px;
}

.cg-bio-clamp.is-open{
  max-height: 500px;
  max-height: none;
  overflow: auto;
}

.cg-bio-clamp.is-open::after{
  display: none;
}

.cg-bio-clamp::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
}

.cg-more{
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  color: #2b6cb0;
  text-decoration: none;
}

.cg-photo{
  background: #eee;
  max-height: 600px;
  aspect-ratio: 4 / 5;
  justify-self: end;
  align-self: stretch;
  overflow: hidden;
}

.cg-portrait{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: right;
}

@media (max-width: 768px){
  .cg-grid{ grid-template-columns: 1fr; }

  .cg-bio-clamp{
    max-height: 430px;
    overflow: hidden;
  }

  .cg-bio-clamp::after{
    display: none
  }
}

/* =============================
  Mision Vision valores(single grid)
============================= */

.mission-item{
  padding-left: 60px; /* ancho icono + espacio */
  position: relative;
}

.mission-title{
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.mission-icon{
  width: 44px;
  position: absolute;
  left: 0;
}


/* =============================
   Nuestro Equipo (single grid)
============================= */
.staff-container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

.staff-container.staff-grid{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px){
  .staff-container.staff-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px){
  .staff-container.staff-grid{
    grid-template-columns: 1fr;
  }
}

.staff-card{
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,.10);

  /* ✅ Restauramos el layout de grid */
  display: block; /* O lo puedes quitar, block es el default para div */
  position: relative; /* Necesario para el overlay en algunas vistas si se quisiera */
}

.staff-card img{
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: top center;
  display: block;
  padding-top: 14px;
}

.staff-card-content{
  padding: 14px 14px 16px;
}

@media (max-width: 600px){
  .staff-card{
    height: auto;
  }
}
.staff-card-content h3{
  margin: 0 0 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #111;
  text-align: center;
}

.staff-card-content p{
  margin: 0;
  font-size: 13px;
  color: #555;
  text-align: center;
}

/* Contáctanos (table desktop / cards mobile) */
.contact-table{
  width: min(800px, 100%);
  border-collapse: collapse;
  margin: 18px auto 0;
  background: #fff;
}

.contact-table th,
.contact-table td{
  border: 1px solid rgba(0,0,0,.12);
  padding: 14px 16px;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 300;
}

.contact-table th{
  background: rgba(0,0,0,.04);
  font-weight: 600;
}

.contact-table a{
  color: #2b6cb0;
  text-decoration: underline;
}

.contact-cards{
  display: none;
  max-width: 520px;
  margin: 18px auto 0;
}

.contact-card{
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
  padding: 14px 16px;
  margin: 0 0 12px 0;
}

.contact-card h4{
  margin: 0 0 8px 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #111;
}

.contact-card a{
  color: #2b6cb0;
  text-decoration: none;
}

.contact-card a:hover{ text-decoration: underline; }

@media (max-width: 768px){
  /* Ocultamos la tabla original y mostramos las tarjetas */
  .contact-table { display: none; }
  .contact-cards { display: block; }
}

/* ===============================
   FOOTER
================================ */
.site-footer-container{
  grid-row: 5;
  grid-column: 1 / 17;
  background: rgb(0,57,122);
  width: 100%;
}

.site-footer{
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  box-sizing: border-box;
}

.footer-inner{
  width: 80%;
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 30% 40% 30%;
  gap: 18px;

  align-items: center;
  justify-items: center;
}

.footer-col{
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.footer-col--brand{
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-escudo{
  width: min(110px);
  height: auto;
  display: block;
  object-fit: contain;
}

.footer-col--contact{
  color: #fff;
  font-size: 14px;
  line-height: 1.6;

  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.footer-contact{
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li{
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-ico{
  width: 22px;
  height: 22px;
  flex: 0 0 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  opacity: 0.95;
}

.footer-ico svg{
  width: 22px;
  height: 22px;
  display: block;
}

.footer-col--contact a,
.footer-col--right a{
  color: #fff;
  text-decoration: none;
}

.footer-col--contact a:hover,
.footer-col--right a:hover{
  text-decoration: underline;
}

.footer-col--right{
  width: 100%;
  display: flex;
  grid-template-columns: repeat(4, 35px);
  grid-template-rows: auto auto;
  gap: 8px;

  justify-items: center;
  align-items: center;
  align-content: center;

  text-align: center;
}

.footer-map{
  grid-column: 1 / -1;
  max-width: 100%;
  height: auto;
}

.footer-map img,
.footer-map iframe{
  width: 100%;
  height: 150px;
  border: 0;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.footer-social-icons{
  grid-column: 1 / -1;
  width: 100%;

  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0px;

  justify-items: center;
  align-items: center;
}

.footer-social-icons a{
  width: 100%;
  height: 100%;
  min-height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social-icons img{ display: block; }

.footer-social-icons a:nth-child(1){ grid-column: 3; }
.footer-social-icons a:nth-child(2){ grid-column: 4; }
.footer-social-icons a:nth-child(3){ grid-column: 5 / 7; }

.footer-social-icons a:nth-child(3) img{
  width: 80%;
  height: auto;
  max-width: 140px;
  max-height: 80%;
  object-fit: contain;
  padding-top:  10px;
}

@media (max-width: 900px){
  .footer-col--brand{ display: none; }

  .footer-inner{
    width: min(92%, 1100px);
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
    align-items: center;
  }

  .footer-col--contact{
    align-items:self-start;
    justify-self: start;
    text-align: left;
    width: min(520px, 100%);
  }

  .footer-col--right{
    width: min(520px, 100%);
    margin-inline: auto;
    justify-items: center;
    align-items: center;
    text-align: center;
  }

  .footer-contact li{ align-items: flex-start; }

  .footer-map{
    margin-inline: 0;
    justify-items: center;
    padding-left: 6px;
  }

  .footer-map a{
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 3px;
  }

  .footer-social-icons{
    justify-items: center;
    padding-right: 0px;
  }
}

@media (max-width: 600px){
  .footer-map img,
  .footer-map iframe{
    height: 100%;
    width: auto;
  }
}


/* ===============================
   INTEREST LINKS TABLE
================================ */
.interest-links-table{
  width: min(1000px, 100%);
  border-collapse: collapse;
  margin: 18px auto 0;
  background: #fff;
  table-layout: fixed;
}

.interest-links-table th,
.interest-links-table td{
  border: 1px solid rgba(0,0,0,.12);
  padding: 14px 16px;
  text-align: left;
  font-size: 1.05rem;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.interest-links-table th{
  background: rgba(0,0,0,.04);
  font-weight: 600;
}

.interest-links-table a{
  color: #2b6cb0;
  text-decoration: underline;
}

.interest-links-table td{ font-weight: 300; }

.interest-links-table th:nth-child(1),
.interest-links-table td:nth-child(1){ width: 30%; }

.interest-links-table th:nth-child(2),
.interest-links-table td:nth-child(2){ width: 30%; }

.interest-links-table th:nth-child(3),
.interest-links-table td:nth-child(3){ width: 35%; }

/* ✅ Transpose table on mobile */
@media (max-width: 768px) {
  .interest-links-table,
  .contact-table {
    display: block;
    width: 100%;
    table-layout: auto; /* ✅ Fix: Reset fixed layout */
    border: none;
    background: transparent;
  }

  .interest-links-table thead, .interest-links-table tbody, .interest-links-table tr, .interest-links-table th, .interest-links-table td,
  .contact-table thead,
  .contact-table tbody,
  .contact-table tr,
  .contact-table th,
  .contact-table td {
    display: block;
  }

  .interest-links-table thead,
  .contact-table thead {
    display: none; /* Hide original headers */
  }

  .interest-links-table tr,
  .contact-table tr {
    /* ✅ Borde más grueso para la tarjeta */
    border: 2px solid rgba(0,0,0,.12);
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
    overflow: hidden; /* Ensures border-radius clips content */
  }

  .interest-links-table td,
  .contact-table td {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 8px 12px 12px;
    width: auto !important; /* Override fixed widths */
    text-align: left;
  }

  .interest-links-table td:last-child,
  .contact-table td:last-child {
    border-bottom: none;
  }

  .interest-links-table td::before,
  .contact-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    font-size: 0.8em;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
}