/* =========================================================
   Directorio Náutico — CSS (componentes + utilidades)
   Basado en: reutilizable, poco acoplado, mobile-first
   ========================================================= */

/* -------------------------
   0) Reset suave + base
-------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  line-height: 1.45;
  color: #111;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}

hr { border: 0; border-top: 1px solid #e6e6e6; margin: 24px 0; }

/* -------------------------
   1) Variables (fáciles de cambiar)
-------------------------- */
:root{
  /* Ancho máximo de contenido (desktop) */
  --container: 1200px;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-1: 10px;
  --radius-2: 14px;
  --radius-3: 999px;

  --border: #e2e2e2;
  --border-strong: #cfcfcf;

  --muted: #666;
  --muted-2: #888;

  --bg-soft: #fafafa;
  --bg-card: #fff;

  --shadow-1: 0 8px 24px rgba(0,0,0,.06);
  --shadow-2: 0 10px 30px rgba(0,0,0,.10);

  --text: #111;
  --text-2: #333;

  /* Botones (neutral, sin “branding”) */
  --btn-bg: #111;
  --btn-text: #fff;
  --btn-border: #111;

  --btn-secondary-bg: #fff;
  --btn-secondary-text: #111;
  --btn-secondary-border: #555;

  --btn-ghost-bg: transparent;
  --btn-ghost-text: #333;
  --btn-ghost-border: #bbb;

  /* Breakpoints */
  --bp-sm: 600px;
  --bp-md: 900px;
  --bp-lg: 1100px;
}

/* -------------------------
   2) Layout base
-------------------------- */
.container{
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section{
  padding-block: var(--space-6);
}

.stack > * + * { margin-top: var(--space-4); }

/* Grid genérico para listados */
.grid{
  display: grid;
  gap: var(--space-4);

  list-style: none;
  padding: 0;
  margin: 0;
}


.grid--cards{
  /* Mantener 3 tarjetas por fila en desktop (con --container: 1200px) */
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

@media (max-width: 400px){
  .grid--cards{
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}


/* Split (detalle empresa) */
.split{
  display: grid;
  gap: var(--space-4);
}
.split--2-1{
  grid-template-columns: 2fr 1fr;
}
@media (max-width: 900px){
  .split--2-1{ grid-template-columns: 1fr; }
}

/* -------------------------
   3) Tipografía / jerarquía
-------------------------- */
.page-title{
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}

.section-title{
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

.body-text{ font-size: 16px; margin: 0; color: var(--text-2); }
.muted{ color: var(--muted); }
.small{ font-size: 13px; color: var(--muted); }

/* Respeta saltos de línea de Supabase en la descripción */
#company-description{
  white-space: pre-line;
}

.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* -------------------------
   4) Header / Footer
-------------------------- */
.site-header{
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header__inner{
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand__name{ font-size: 16px; }

.site-nav{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.site-nav a{
  padding: 6px 8px;
  border-radius: 8px;
}
.site-nav a:hover{
  background: var(--bg-soft);
  text-decoration: none;
}

.site-footer{
  border-top: 1px solid var(--border);
  background: #fff;
  padding-block: var(--space-6);
}
.site-footer__grid{
  display: grid;
  gap: var(--space-4);
}
.site-footer__nav ul{
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.site-footer__copy{ color: var(--muted); font-size: 13px; }

/* -------------------------
   Nav dropdown (Servicios)
-------------------------- */
.nav-dropdown{ position: relative; }
.nav-dropdown__trigger{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 8px;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.nav-dropdown__trigger:hover{ background: var(--bg-soft); }
.nav-dropdown.is-open .nav-dropdown__trigger{ background: var(--bg-soft); }

.nav-dropdown__panel{
  position: absolute;
  left: 0;
  top: 100%;
  width: min(780px, 92vw);
  z-index: 50;
  display: none;
}
.nav-dropdown.is-open .nav-dropdown__panel{ display: block; }

.svcPanel{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,.10);
  overflow: hidden;
}
.svcPanel__header{
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.svcLetters{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.svcLetter{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}
.svcLetter.is-active{ background: var(--bg-soft); }

.svcLists{
  padding: 12px;
  max-height: 52vh;
  overflow: auto;
}
.svcGroup{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
}
@media (max-width: 820px){
  .svcGroup{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .svcGroup{ grid-template-columns: 1fr; }
}

.svcItem{
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 12px;
}
.svcItem:hover{
  background: var(--bg-soft);
  text-decoration: none;
}

/* -------------------------
   5) Botones (primary/secondary/ghost)
-------------------------- */
.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: var(--radius-1);
  border: 1px solid var(--btn-border);

  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 650;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;

  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.button:hover{
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.button:active{ transform: translateY(0); box-shadow: none; }

.button--secondary{
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

.button--ghost{
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-text);
  border-color: var(--btn-ghost-border);
}

/* Link tipo botón pequeño */
.button--sm{ padding: 8px 10px; font-size: 13px; border-radius: 9px; }

/* -------------------------
   6) Inputs / formularios
-------------------------- */
input, select, textarea{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-1);
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

input::placeholder, textarea::placeholder{ color: #999; }

input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 3px solid #111;
  outline-offset: 2px;
}

label > span{
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* -------------------------
   7) Filter-bar (hero / compacto / mobile)
-------------------------- */
.filter-bar{
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  background: var(--bg-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
}

.filter-bar__row{
  display: grid;
  gap: var(--space-3);
  align-items: end;
  grid-template-columns: 1fr 1fr 1fr auto; /* desktop */
}

.filter-bar__field{ display: block; }

.filter-bar__actions{
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

.filter-bar--hero{
  padding: var(--space-5);
  border-radius: calc(var(--radius-2) + 4px);
}

.filter-bar--compact{
  padding: var(--space-3);
  box-shadow: none;
}

@media (max-width: 900px){
  .filter-bar__row{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px){
  .filter-bar__row{
    grid-template-columns: 1fr;
  }
  .filter-bar__actions{ justify-content: stretch; }
  .filter-bar__actions .button{ width: 100%; }
}

/* -------------------------
   8) Company-card and category card (normal / destacado / incompleto)
-------------------------- */
.company-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  background: var(--bg-card);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s ease, transform .08s ease, border-color .2s ease;
}

/* Header layout: optional logo + text */
.company-card__header{
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

/* Wrapper de título + servicios (para que el overflow/mask funcione bien) */
.company-card__head{
  flex: 1;
  min-width: 0; /* CLAVE: permite que el contenido se encoja y el fade sea consistente */
}

/* Backward-compat: si en tu HTML aún usas headerText, le damos el mismo rol */
.company-card__headerText{
  flex: 1;
  min-width: 0;
}

.company-card__logo{
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
  background: #fff;
  padding: 6px;
}

/* Servicios: una sola línea, se ven todos si caben, fade suave si no caben */
.company-card__tags{
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow: hidden;
  white-space: nowrap;

  -webkit-mask-image: linear-gradient(to right, black 0%, black 75%, transparent 100%);
          mask-image: linear-gradient(to right, black 0%, black 75%, transparent 100%);
}

/* Cuando hay una sola card a ancho completo, mostramos todos los servicios (wrap) */
.grid--single .company-card__tags{
  flex-wrap: wrap !important;
  overflow: visible !important;
  white-space: normal !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

.company-card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  border-color: #d6d6d6;
}

.company-card__title{
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.company-card__title a:hover{ text-decoration: underline; }

.company-card__desc{ margin: 0; color: var(--text-2); }

.company-card__meta{
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
}
.company-card__meta dt{ font-size: 12px; color: var(--muted); }
.company-card__meta dd{ margin: 0; font-size: 13px; color: var(--text); }

.company-card__footer{
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}


/* Variantes */
.company-card--featured{
  border-color: #bfbfbf;
  background: linear-gradient(180deg, #fff, #fcfcfc);
}

.company-card--incomplete{
  border-style: dashed;
  color: #333;
}
.company-card--incomplete .company-card__desc{ color: var(--muted); }

.category-card__link{
  display: grid;
  gap: var(--space-3);
  text-decoration: none;
}
.category-card__link:hover{ text-decoration: none; }

.category-card__img{
  width: 100%;
  max-width: 180px;          /* 👈 tamaño real de la imagen */
  aspect-ratio: 4 / 3;       /* 👈 más compacta */
  object-fit: cover;

  margin: 0 auto;            /* 👈 centrada */
  border-radius: var(--radius-1);
  border: 1px solid var(--border);
}

/* Category cards (Servicios / Puertos): transparentes */
.card:has(.category-card__link){
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}


.category-card__title{
  text-align: center;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.category-card__link:hover img{
  transform: translateY(-2px);
}

.category-card__img{
  transition: transform .15s ease;
}

.card--category{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}



/* -------------------------
   9) Tags / chips
-------------------------- */
.tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-3);
  font-size: 12px;
  color: #333;
  background: #fff;
}

/* -------------------------
   10) Results / listados + paginación
-------------------------- */
.results__header{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.pagination{
  margin-top: var(--space-4);
}
.pagination__list{
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pagination__list a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
}
.pagination__list a:hover{
  background: var(--bg-soft);
  text-decoration: none;
}
.pagination__list a[aria-current="page"]{
  border-color: #111;
  font-weight: 800;
}

/* -------------------------
   11) Breadcrumbs
-------------------------- */
.breadcrumbs ol{
  list-style: none;
  padding: 0; margin: 0 0 var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs li::after{
  content: "/";
  margin-left: 8px;
  color: #aaa;
}
.breadcrumbs li:last-child::after{ content: ""; }
.breadcrumbs a{ color: var(--muted); }
.breadcrumbs a:hover{ color: #111; text-decoration: underline; }

/* -------------------------
   12) Detalle empresa (layout y bloques)
-------------------------- */
.company-detail__header{
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding-block: var(--space-5);
}

.company-detail__subtitle{
  margin: 0;
  color: var(--muted);
}

.company-services{
  margin: 0;
  padding-left: 18px;
}
.company-services li{ margin: 6px 0; }

.company-contact{
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  padding: var(--space-4);
  background: #fff;
  box-shadow: var(--shadow-1);
}

.contact-list{
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.contact-list > div{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-2);
}
.contact-list dt{ color: var(--muted); font-size: 13px; }
.contact-list dd{ margin: 0; color: var(--text); font-size: 14px; }

@media (max-width: 600px){
  .contact-list > div{ grid-template-columns: 1fr; }
}

/* -------------------------
   13) Cards genéricas (si quieres usar .card)
-------------------------- */
.card{
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  background: #fff;
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
}

/* -------------------------
   14) Estados (hover/focus/active) extra
-------------------------- */
.is-hidden{ display: none !important; }
.is-disabled{ opacity: .55; pointer-events: none; }

.clickable:hover{ cursor: pointer; }

/* -------------------------
   15) Helpers de espaciado (mínimos)
-------------------------- */
.mt-0{ margin-top: 0 !important; }
.mb-0{ margin-bottom: 0 !important; }
.mt-2{ margin-top: var(--space-2) !important; }
.mt-4{ margin-top: var(--space-4) !important; }
.mb-2{ margin-bottom: var(--space-2) !important; }
.mb-4{ margin-bottom: var(--space-4) !important; }
.p-0{ padding: 0 !important; }
.p-3{ padding: var(--space-3) !important; }
.p-4{ padding: var(--space-4) !important; }

/* Grid de categorías destacadas: 5 por fila */
.grid--featured{
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 3rem;
  margin-top: 1rem;
}


@media (max-width: 1200px){
  .grid--featured{
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px){
  .grid--featured{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px){
  .grid--featured{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Servicios: separar barra de búsqueda del grid */
body[data-page="servicios"] .row.row--between{
  margin-bottom: 2.5rem; /* ajusta a gusto */
}

.services-alpha {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Bloque por letra */
.services-letter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.services-letter__title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Grid de servicios */
.services-letter__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  justify-content: start;
}

/* Servicio individual */
.service-item {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .services-letter__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .services-letter__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grid principal: 5 columnas (A,B,C,D,E...) */
.services-columns{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:2rem 2.5rem;
}

/* Bloque por letra */
.services-letter{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  min-width:0;
}

.services-letter__title{
  font-size:1.25rem;
  font-weight:700;
  margin:0;
}

/* Lista sin bullets */
.services-letter__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:.45rem;
}

.service-item{
  margin:0;
  padding:0;
}

.service-item__link{
  text-decoration:none;
}

/* Responsive */
@media (max-width: 1100px){
  .services-columns{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .services-columns{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* Hover servicios (listado A–Z) */
.service-item__link{
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.service-item__link:hover,
.service-item__link:focus-visible{
  color: #2CB1A6;
}

.company-header__row{
  display:flex;
  align-items:center;
  gap:24px;
  padding-top:12px;
}

.company-header__logo{
  width: clamp(60px, 18vw, 96px);
  height: clamp(60px, 18vw, 96px);
  border-radius: 12px;
  background:#f4f6f8;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink:0;
}

@media (max-width: 550px){
  .company-header__row{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}


.company-header__logo img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.company-header__info .page-title{
  margin:0;
}

.company-header__info .company-detail__subtitle{
  margin:4px 0 0;
  opacity:.7;
}

.section-title{
  margin-bottom:12px;
}

#company-description{
  margin-top:8px;
}

.stack .section-title{
  margin-top:24px;
}

.services-list{
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 24px;
}

.services-list li{
  line-height: 1.4;
}

/* Reutilizable: mapa embebido (mismas dimensiones que Puertos) */
.port-map{
  width: 100%;
  height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: #fff;
}
.port-map iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Separación bajo la tarjeta de contacto */
.company-map{ margin-top: var(--space-4); }

#company-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: var(--space-4);
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb--placeholder {
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}


.gallery-thumb--placeholder {
  max-width: 180px;
  max-height: 120px;
}

.site-nav a {
  padding: .55rem .9rem;
  transition: transform .15s ease, border-color .15s ease;
}

.site-footer {
  background: #2CB1A6;
  color: white;
  padding: 24px 0;
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;

  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
}

/* LEFT */

.footer-logo {
  width: 100%;
  height: auto;
  max-width: 320px;   /* límite para que no se vuelva gigante */
  margin-bottom: 16px;
  margin-top: 1.33em;
}

.footer-desc {
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: rgba(255,255,255,.85);
}

.footer-copy {
  font-size: 14px;
  color: rgba(255,255,255,.6);
}

/* RIGHT */

.footer-links h4 {
  color: white;
  margin-bottom: 16px;
  font-weight: 600;
  
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.footer-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: .2s;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

/* Mobile */

@media (max-width: 768px) {
  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.header-logo {
  height: 40px;
  width: auto;
  display: block;
  border-radius: var(--radius-1);
}

/* un pelín más grande en desktop */
@media (min-width: 768px) {
  .header-logo {
    height: 60px;
  }
}

#portServices {
  display: block;        /* fuerza columna única */
  list-style: none;
  padding: 0;
  margin: 0;
}

#portServices .service-row {
  display: block;
  width: 100%;          /* línea a ancho completo */
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

#portServices .service-row:last-child {
  border-bottom: none;
}

#company-services{
  display: block;
  list-style: none;
  padding: 0;
  margin: 0;
}

#company-services .service-row{
  display: block;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

#company-services .service-row:last-child{
  border-bottom: none;
}












.lang-dropdown {
  position: relative;
  margin-right: 12px;
}

.lang-dropdown__trigger {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .55rem .6rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
}

.lang-dropdown__arrow {
  font-size: .7rem;
  opacity: .85;
}

/* Menú */
.lang-dropdown__menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 64px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  overflow: hidden;
  display: none;
  z-index: 50;
}

.lang-dropdown__menu button {
  width: 100%;
  padding: .55rem .8rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  text-align: left;
}

.lang-dropdown__menu button:hover {
  background: rgba(0,0,0,.06);
}

/* Hover desktop: abre el menú */
.lang-dropdown:hover .lang-dropdown__menu,
.lang-dropdown.open .lang-dropdown__menu {
  display: block;
}

button.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


.site-header__actions{
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header--light .lang-dropdown__trigger{
  color: #fff;
}


/* Home hero a pantalla completa */
.home-hero{
  min-height: 100vh;
  min-height: 100dvh;   /* mejor en móvil */
  padding-block: 0;     /* anula el padding de .section para que no “recorte” */
  display: flex;
  flex-direction: column;
}

/* Mantén el contenido centrado verticalmente sin depender de paddings inline */
.home-hero > .container.stack{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}




/* ===============================
   NAUTICARDS HERO (limpio y sin duplicados)
   - La imagen NO debe empujar: se recorta al alto del texto
================================ */

.nc-hero{
  display: grid;
  gap: 40px;
  align-items: stretch; /* ✅ clave: ambas columnas misma altura */
  padding: 36px;
  border-radius: var(--radius-1);
  background: linear-gradient(
    180deg,
    rgba(44,177,166,.08),
    rgba(44,177,166,0) 55%
  );
  border-left: 6px solid #2CB1A6;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px){
  .nc-hero{
    grid-template-columns: 1.4fr .6fr; /* izquierda domina */
  }
}


/* IZQUIERDA */
.nc-hero__left{
  max-width: 620px;
}

.nc-badge{
  display:inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #2CB1A6;
  background: rgba(44,177,166,.12);
  border: 1px solid rgba(44,177,166,.25);
  margin-bottom: 16px;
}

.nc-title{
  margin: 0;
  color:#2CB1A6;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.nc-lead{
  font-size: 18px;
  line-height: 1.6;
  margin: 18px 0 14px;
  font-weight: 500;
}

.nc-paragraph{
  line-height: 1.7;
  margin: 10px 0;
  color: rgba(0,0,0,.72);
}

.nc-cta{
  margin-top: 24px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

/* DERECHA (imagen adaptada al alto del texto) */
.nc-hero__right{
  height: 100%;
  display: flex;
}

.nc-image-wrapper{
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.nc-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 899px){
  .nc-hero__right{
    display: none;
  }
}

/* =========================
   CTA FORM (Home)
========================= */
.cta-form{
  background: #2CB1A6;
  /* más compacto que tu 3rem */
  padding-block: 40px;
}

.cta-form__inner{
  text-align: center;
}

.cta-form__title{
  color: #fff;
  margin: 0 0 18px;
}

.cta-form__form{
  max-width: 720px;
  margin: 0 auto;
}

.cta-form__field{
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  outline: none;
  font-size: 1rem;
  background: #fff;
  margin-bottom: 12px;
}

.cta-form__field--textarea{
  resize: none;
}

.cta-form__actions{
  margin-top: 14px;
}

.cta-form__button{
  color: #fff;
  border-color: rgba(255,255,255,.85);
  background: transparent;
}

.cta-form__field {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  outline: none;
  font-size: 1rem;
  font-family: inherit;   /* 👈 clave */
  line-height: 1.4;       /* 👈 iguala altura visual */
  color: #111;
  background: #fff;
}

.cta-form__field::placeholder {
  color: #6b7280;
  opacity: 1; /* evita diferencias raras en Safari */
}








/* FAQ block (Home) */
.how-faq__head{
  max-width: 65ch;
}

.how-faq__list{
  display: grid;
  gap: 12px;
}

/* Cada fila como “card” pero en formato acordeón */
.how-faq__item{
  border: 1px solid var(--border-strong); /* mismo grosor visual que inputs */
  border-radius: var(--radius-1);        /* EXACTAMENTE igual que .button */
  background: #fff;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}



/* Q */
.how-faq__q{
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* quita el marker nativo */
.how-faq__q::-webkit-details-marker{ display:none; }

/* plus / minus */
.how-faq__q::after{
  content: "+";
  font-weight: 700;
  color: #2CB1A6;
  flex: 0 0 auto;
}

.how-faq__item[open] .how-faq__q::after{
  content: "–";
}

/* A */
.how-faq__a{
  padding: 0 18px 16px;
  border-top: 1px solid rgba(0,0,0,.06);
}


.how-faq__q:hover{
  color: #2CB1A6;
}

.how-faq__list{
  display: grid;
  gap: 12px;
  margin-bottom: var(--space-6);
}

/* Ajuste de títulos cuando se usan dentro de cards (Search / Ports) */
.card .section-title{
  margin-top: 0;
}

/* Company header con fondo marca + overlay oscuro (igual vibe que Home hero) */
.company-detail__header--brand{
  border-bottom: none;
  padding-block: 34px;
  background:
    linear-gradient(rgba(0,0,0,.40), rgba(0,0,0,.40)),
    linear-gradient(#2CB1A6, #2CB1A6);
}

/* Textos en blanco dentro del header */
.company-detail__header--brand .page-title{
  color: #fff;
}

.company-detail__header--brand .company-detail__subtitle{
  color: rgba(255,255,255,.85);
  opacity: 1; /* anula tu opacity .7 */
}

/* Breadcrumbs en blanco */
.company-detail__header--brand .breadcrumbs{
  color: rgba(255,255,255,.85);
}

.company-detail__header--brand .breadcrumbs a{
  color: #fff;
  text-decoration-color: rgba(255,255,255,.45);
}

.company-detail__header--brand .breadcrumbs a:hover{
  text-decoration-color: rgba(255,255,255,.85);
}

/* Breadcrumbs en header marca: sobreescribir color real (lo define .breadcrumbs ol) */
.company-detail__header--brand .breadcrumbs ol{
  color: rgba(255,255,255,.70);
}

.company-detail__header--brand .breadcrumbs a{
  color: #BFE9E5; /* verde clarito */
  text-decoration-color: rgba(191,233,229,.45);
}

.company-detail__header--brand .breadcrumbs a:hover{
  color: #E6F7F5;
  text-decoration-color: rgba(230,247,245,.85);
}

/* Separadores "/" dentro del header marca */
.company-detail__header--brand .breadcrumbs li::after{
  color: rgba(191,233,229,.55);
}

/* Último item (Empresa) NO es link: es <li aria-current="page"> */
.company-detail__header--brand .breadcrumbs li[aria-current="page"]{
  color: #D7F3F0;
  font-weight: 700;
}


/* Caja del logo: mismo fondo que el header marca */
.company-detail__header--brand .company-header__logo{
  background: rgba(0,0,0,.12);          /* “oscuro” sutil encima del verde */
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  border-radius: 16px;
  padding: 14px;
}

/* Logo: ocupar el máximo posible manteniendo proporciones */
.company-header__logo img{
  display: block;
  width: auto;
  height: auto;
  max-width: 160px;   /* ajusta si quieres más grande */
  max-height: 78px;   /* clave para que rectangulares no queden enanos */
  object-fit: contain;
}

/* Caja del logo: que NO corte la imagen */
.company-header__logo{
  overflow: visible;         /* por si lo tenías en hidden */
  display: flex;
  align-items: center;
  justify-content: center;

  /* marco con tamaño controlado */
 width: clamp(140px, 16vw, 190px);
  height: clamp(84px, 10vw, 110px);
  padding: 12px;
  box-sizing: border-box;
}

/* La imagen se adapta al marco sin deformarse */
.company-header__logo img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 760px){
  .nav-dropdown__panel{
    left: 50%;
    transform: translateX(-50%);
    width: min(780px, calc(100vw - 24px));
  }
}





/* =========================
   Mobile header menu (<=770px)
========================= */

/* Hamburger (oculto en desktop) */
.menu-toggle{
  display:none;
  margin-left:auto;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction: column;
  gap:6px;
  color:#111;                 /* negro por defecto (páginas no-home) */
}
.site-header--light .menu-toggle{
  border-color: rgba(255,255,255,.25);
}

.menu-toggle__bar{
  display:block;
  width:24px;                 /* más largo */
  height:3px;                 /* más gordo */
  background: currentColor;   /* hereda negro/blanco */
  border-radius: 2px;
}

/* Drawer */
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.mobile-menu__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}
.mobile-menu__panel{
  position: absolute;
  top: 0;
  left: 0;                         /* 👈 ahora desde la izquierda */
  height: 100%;
  width: min(360px, 90vw);
  background: #fff;
  color: #111;
  box-shadow: 12px 0 40px rgba(0,0,0,.18);  /* sombra invertida */
  display: flex;
  flex-direction: column;
}


.mobile-menu__panel{
  transform: translateX(-100%);
  transition: transform .28s ease;
}

body.menu-open .mobile-menu__panel{
  transform: translateX(0);
}


.mobile-menu__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.mobile-menu__title{ font-weight: 800; }
.mobile-menu__close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: transparent;
  cursor: pointer;
}
.mobile-menu__body{
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.mobile-menu__link{
  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(0,0,0,.08);
}
.mobile-menu__divider{
  height: 1px;
  background: rgba(0,0,0,.10);
  margin: 6px 0;
}
.mobile-menu__row{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile-menu__cta{
  width: 100%;
  justify-content: center;
}

/* breakpoint: header compacto */
@media (max-width: 770px){

  /* fuera navegación */
  .site-nav{
    display: none !important;
  }

  /* mantenemos acciones (EN/ES) y las mandamos a la derecha */
  .site-header__actions{
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  /* ocultamos SOLO el CTA (Añadir empresa) */
  .site-header__cta{
    display: none !important;
  }

  /* mostramos la hamburguesa (al lado del idioma) */
  .menu-toggle{
    display: inline-flex;
    margin-left: 8px;   /* separación respecto al EN/ES */
  }
}


/* body lock cuando el menú está abierto */
body.menu-open{
  overflow: hidden;
}

/* Fix del dropdown de servicios en móvil (para que no empuje el layout) */
@media (max-width: 760px){
  .nav-dropdown__panel{
    left: 50%;
    transform: translateX(-50%);
    width: min(780px, calc(100vw - 24px));
  }
}

/* Home (header oscuro): hamburger blanco */
.site-header--light .menu-toggle{
  color:#fff;
}

/* En páginas normales (header blanco): negro ya por defecto */
@media (max-width: 770px){

  /* ocultamos navegación */
  .site-nav{ display: none !important; }

  /* ocultamos SOLO el CTA */
  .site-header__cta{ display: none !important; }

  /* layout móvil: left = burger, center = logo, right = idioma */
  .site-header__inner{
    position: relative;
    justify-content: center;         /* centro real */
    padding-left: 52px;              /* hueco para burger */
    padding-right: 92px;             /* hueco para idioma (ajustable) */
  }

  /* burger izquierda */
  .menu-toggle{
    display: inline-flex;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }

  /* logo centrado */
  .brand{
    justify-self: center;
    margin: 0;
  }

  /* idioma derecha */
  .site-header__actions{
    display: flex !important;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
}

@media (max-width: 770px){
  .lang-dropdown__arrow{
    display: none !important;
  }
}

@media (max-width: 900px){

  /* Convertimos el split en "stack" reordenable */
  .split--2-1{
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  /* Hacemos que los hijos internos pasen a ser items del flex */
  .split--2-1 > aside{ display: contents; }
  .split--2-1 > .company-main{ display: contents; }

  /* Orden que quieres */
  .company-contact{ order: 1; }
  .company-block--description{ order: 2; }
  .company-block--services{ order: 3; }
  .company-block--gallery{ order: 4; }
  .company-map{ order: 5; }
}







