/**
 * Brintza - plantilla Joomla
 * Paleta y tipografía heredadas de la web 2016, maquetación moderna.
 */

/* ---------- Tokens ---------- */
:root {
  --c-navy: #1a2347;
  --c-navy-900: #11172f;
  --c-blue: #003f8b;
  --c-blue-600: #00214d;
  --c-grey: #8a8d93;
  --c-text: #3c3c3c;
  --c-muted: #6b6b6b;
  --c-line: #e3e5ea;
  --c-bg: #ffffff;
  --c-bg-soft: #f3f4f7;
  --c-red: #d45353;
  --c-orange: #f38547;
  --c-green: #98bf11;
  --c-sky: #3a8dde;
  --c-violet: #6a5acd;

  --ff-display: "Homenaje", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --ff-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-h1: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --fs-h2: clamp(1.6rem, 1.35rem + 1.1vw, 2.2rem);
  --fs-h3: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);

  --container: 1240px;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgb(17 23 47 / .06), 0 6px 20px rgb(17 23 47 / .08);
  --shadow-lg: 0 12px 40px rgb(17 23 47 / .16);
  --header-h: 88px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
iframe { border: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--c-navy);
  margin: 1.6em 0 .6em;
  letter-spacing: .01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); margin-top: 0; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.2rem; }

p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }
ul, ol { padding-inline-start: 1.25em; }
li + li { margin-top: .3em; }

a {
  color: var(--c-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color .2s var(--ease);
}
a:hover { color: var(--c-navy); }

:focus-visible {
  outline: 3px solid var(--c-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

strong { color: var(--c-navy-900); }

hr { border: 0; border-top: 1px solid var(--c-line); margin: 2rem 0; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .6rem .75rem; border-bottom: 1px solid var(--c-line); text-align: start; vertical-align: top; }
th { color: var(--c-navy); font-weight: 600; }

.visually-hidden, .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;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 1000;
  padding: .6rem 1rem;
  background: var(--c-navy);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons & forms ---------- */
.btn, .button, button.validate, input[type="submit"], .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .7em 1.4em;
  font: 500 1rem/1.2 var(--ff-body);
  color: #fff;
  background: var(--c-navy);
  border: 2px solid var(--c-navy);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover, .button:hover, button.validate:hover, input[type="submit"]:hover, .btn-primary:hover {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #fff;
}
.btn--ghost, .btn-secondary {
  background: transparent;
  color: var(--c-navy);
}
.btn--ghost:hover, .btn-secondary:hover { background: var(--c-navy); color: #fff; }
.btn--light { background: #fff; color: var(--c-navy); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .7); }
.btn--ghost-light:hover { background: #fff; color: var(--c-navy); border-color: #fff; }

label, .control-label, .form-label { display: block; font-weight: 600; color: var(--c-navy); margin-bottom: .35rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"],
input[type="url"], input[type="number"], select, textarea, .form-control, .form-select {
  width: 100%;
  padding: .7rem .9rem;
  font: inherit;
  color: var(--c-text);
  background: #fff;
  border: 1px solid #c9cdd6;
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgb(0 63 139 / .18);
}
textarea { min-height: 9rem; resize: vertical; }
.control-group, .mb-3 { margin-bottom: 1.1rem; }
.form-check { display: flex; gap: .6rem; align-items: flex-start; }
.form-check-input { margin-top: .35em; }
.invalid, .form-control-danger, input.invalid { border-color: var(--c-red) !important; }
.star, .form-control-feedback, .invalid-feedback { color: var(--c-red); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: #fff;
  transition: box-shadow .25s var(--ease);
}
.has-sticky-header .site-header { position: sticky; top: 0; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgb(17 23 47 / .1); }

.topbar {
  background: var(--c-navy);
  color: #cfd5ea;
  font-size: .85rem;
}
.topbar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.25rem;
  min-height: 38px;
}
.topbar p { margin: 0; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }

.private-area a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--ff-display);
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.private-area a::before {
  content: "";
  width: .9em; height: .9em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a5 5 0 0 0-5 5v4H5v13h14V10h-2V6a5 5 0 0 0-5-5Zm-3 9V6a3 3 0 1 1 6 0v4H9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* mod_languages */
/* "body div." prefix: core media/mod_languages/css loads AFTER this file with
   equal-specificity rules (li { margin: 0 .5rem }, a { padding: .5rem }), so we need more weight */
/* In the topbar the switcher fills its full height: the boxes touch top and bottom edges */
.topbar__inner > .mod-languages { align-self: stretch; display: flex; }
body div.mod-languages ul, body div.mod-languages .lang-inline {
  display: flex;
  align-items: stretch;
  gap: .1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
body div.mod-languages ul.lang-inline li, body div.mod-languages ul li { margin: 0; display: flex; }
body div.mod-languages ul li.lang-active { background: none; }
body div.mod-languages a, body div.mod-languages .lang-active span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  padding: .15rem .45rem;
  border-radius: 0;
  text-align: center;
  text-transform: lowercase;
  font-family: var(--ff-display);
  font-size: 1rem;
  letter-spacing: .06em;
}
.mod-languages .lang-active a {
  background: #fff;
  color: var(--c-navy);
}
.mod-languages a:hover { background: rgb(255 255 255 / .15); text-decoration: none; }
.mod-languages .lang-active a:hover { background: #fff; }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: var(--header-h);
}
.brand { display: inline-flex; flex-shrink: 0; }
.brand__logo { width: clamp(160px, 18vw, 220px); height: auto; }

/* Main nav (core mod_menu markup) */
.main-nav .mod-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav .mod-menu > li {
  position: relative;
  margin: 0;
  display: flex;
  align-items: center;
}
.main-nav .mod-menu > li > a,
.main-nav .mod-menu > li > span {
  display: block;
  padding: .6rem .9rem;
  font-family: var(--ff-display);
  font-size: 1.2rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-navy);
  text-decoration: none;
  position: relative;
}
.main-nav .mod-menu > li > a::after {
  content: "";
  position: absolute;
  inset-inline: .9rem;
  bottom: .25rem;
  height: 2px;
  background: var(--c-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.main-nav .mod-menu > li > a:hover::after,
.main-nav .mod-menu > li.active > a::after { transform: scaleX(1); }
.main-nav .mod-menu > li.active > a { color: var(--c-blue); }

.mod-menu__toggle-sub {
  display: inline-grid;
  place-items: center;
  width: 1.75rem; height: 1.75rem;
  margin-inline-start: -.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-navy);
  cursor: pointer;
}
.mod-menu__toggle-sub .icon-chevron-down { display: none; }
.mod-menu__toggle-sub::before {
  content: "";
  width: .45rem; height: .45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
}
.mod-menu__toggle-sub[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }

.main-nav .mod-menu__sub {
  margin: 0;
  padding: .5rem;
  list-style: none;
  font-size: 1rem;
}
.main-nav .mod-menu__sub li { margin: 0; }
.main-nav .mod-menu__sub a {
  display: block;
  padding: .55rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
}
.main-nav .mod-menu__sub a:hover,
.main-nav .mod-menu__sub .current > a {
  background: var(--c-bg-soft);
  color: var(--c-blue);
}

@media (min-width: 961px) {
  .main-nav .mod-menu__sub {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 240px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--c-navy);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .main-nav .mod-menu > li:hover > .mod-menu__sub,
  .main-nav .mod-menu > li:focus-within > .mod-menu__sub,
  .main-nav .mod-menu__sub.show-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-toggle { display: none; }
}

/* Hamburger */
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--c-navy);
  color: #fff;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 961px) {
  .nav-toggle { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .main-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--c-line);
    box-shadow: var(--shadow-lg);
    padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .main-nav.is-open { display: block; animation: navIn .25s var(--ease); }
  .main-nav .mod-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav .mod-menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--c-line); }
  .main-nav .mod-menu > li > a { flex: 1; padding: .9rem .25rem; }
  .main-nav .mod-menu > li > a::after { display: none; }
  .mod-menu__toggle-sub { width: 44px; height: 44px; margin: 0; }
  .main-nav .mod-menu__sub { display: none; flex-basis: 100%; padding: 0 0 .75rem 1rem; }
  .main-nav .mod-menu__sub.show-menu { display: block; }
}
@keyframes navIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Hero & banner ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgb(17 23 47 / .94) 0%, rgb(26 35 71 / .82) 45%, rgb(26 35 71 / .35) 100%),
    var(--hero-image) center / cover no-repeat,
    var(--c-navy);
  overflow: hidden;
}
.hero::after {
  /* triángulos del logotipo como motivo */
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: -6%;
  width: min(42vw, 520px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 200' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='.07' d='M0 0l100 100L0 200z'/%3E%3Cpath fill='%23ffffff' fill-opacity='.09' d='M30 60l40 40-40 40z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.5rem, 2rem + 7vw, 7.5rem);
}
.hero h1, .hero h2, .hero .hero__title {
  color: #fff;
  font-size: clamp(2.2rem, 1.5rem + 3.4vw, 4.2rem);
  max-width: 18ch;
  margin: 0 0 1rem;
  letter-spacing: .01em;
}
.hero p { max-width: 58ch; font-size: 1.15rem; color: #e3e7f5; }
.hero strong { color: #fff; }
.hero .btn { margin-top: .75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero__actions .btn { margin: 0; }

.page-banner {
  position: relative;
  color: #fff;
  background:
    linear-gradient(90deg, rgb(17 23 47 / .88), rgb(26 35 71 / .45)),
    var(--banner-image) center / cover no-repeat,
    var(--c-navy);
}
.page-banner .container {
  min-height: clamp(110px, 6rem + 4vw, 170px);
  display: flex;
  align-items: center;
}
.page-banner__title {
  margin: 0;
  color: #fff;
  font-weight: 400;
  font-family: var(--ff-display);
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ---------- Service cards (home) ---------- */
.services-band {
  position: relative;
  z-index: 2;
  margin-top: clamp(-4rem, -2rem - 3vw, -2rem);
}
.is-interior .services-band { margin-top: 2rem; }
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service-cards li { margin: 0; }
.service-card {
  --accent: var(--c-blue);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--c-text); }
.service-card__media { aspect-ratio: 264 / 128; overflow: hidden; background: var(--c-bg-soft); }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s var(--ease); }
.service-card:hover .service-card__media img { transform: scale(1.05); }
.service-card__body {
  flex: 1;
  padding: 1rem 1.1rem 1.2rem;
  border-top: 4px solid var(--accent);
}
.service-card__title, .service-card__text, .service-card__media { display: block; }
.service-card__title {
  margin: 0 0 .3rem;
  font-family: var(--ff-display);
  font-size: 1.45rem;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.service-card__text { margin: 0; font-size: .92rem; color: var(--c-muted); }
.service-card--fiscal { --accent: var(--c-red); }
.service-card--contable { --accent: var(--c-orange); }
.service-card--laboral { --accent: var(--c-green); }
.service-card--mercantil { --accent: var(--c-sky); }
.service-card--juridico { --accent: var(--c-violet); }

/* ---------- Main ---------- */
.site-main { flex: 1; padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); outline: none; }
.is-home .site-main { padding-top: clamp(2.5rem, 2rem + 2vw, 4rem); }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  margin-bottom: 2rem;
}
.home-grid__a > * + *, .home-grid__b > * + * { margin-top: 1.5rem; }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } }

/* Hide empty featured view on home when it renders nothing */
.is-home .blog-featured:not(:has(.blog-item)) { display: none; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.has-sidebar .content-layout { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 900px) { .has-sidebar .content-layout { grid-template-columns: 1fr; } }

/* Module chrome "card" */
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header, .card > h3:first-child {
  margin: 0;
  padding: 1rem 1.4rem;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-navy);
}
.card-header a { color: #fff; text-decoration: none; }
.card-body { padding: 1.3rem 1.4rem; }
.card-body > :last-child { margin-bottom: 0; }
.card.card--plain, .card.plain { border: 0; box-shadow: none; background: transparent; }
.card.card--plain .card-header, .card.plain .card-header { background: none; color: var(--c-navy); padding-inline: 0; border-bottom: 2px solid var(--c-navy); }
.card.card--plain .card-body, .card.plain .card-body { padding-inline: 0; }

/* Intro empresa */
.intro-lead { font-size: 1.1rem; }
.intro-lead strong { color: var(--c-blue); }
.link-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  text-decoration: none;
}
.link-more::after { content: "→"; transition: transform .2s var(--ease); }
.link-more:hover::after { transform: translateX(4px); }

/* Horario */
.schedule { display: grid; gap: .5rem; margin: 0; }
.schedule div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--c-line); }
.schedule div:last-child { border: 0; padding-bottom: 0; }
.schedule dt { font-weight: 600; color: var(--c-navy); }
.schedule dd { margin: 0; }
.schedule-note { margin-top: 1rem; padding: .75rem 1rem; background: #fff6ef; border-inline-start: 4px solid var(--c-orange); border-radius: var(--radius-sm); font-size: .95rem; }

/* Latest news (mod_articles) */
.mod-articles-items, .mod-articles, .mod-list.newsflash {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mod-articles-items > li, .mod-articles .mod-articles-item {
  margin: 0;
  padding: .85rem 0;
  border-bottom: 1px solid var(--c-line);
}
.mod-articles-items > li:first-child { padding-top: 0; }
.mod-articles-items > li:last-child { border: 0; padding-bottom: 0; }
.mod-articles-item-content { display: grid; gap: .15rem; }
.mod-articles-title, .mod-articles .mod-articles-title {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.mod-articles-title a { text-decoration: none; color: var(--c-navy); }
.mod-articles-title a:hover { color: var(--c-blue); text-decoration: underline; }
.mod-articles-date, .mod-articles .published, .mod-articles dd { font-size: .85rem; color: var(--c-muted); }
.mod-articles dl, .mod-articles .article-info, .mod-articles-item dl { margin: 0; padding: 0; }
.mod-articles-item dt { display: none; }
.mod-articles-item dd { margin: 0; }
.mod-articles dt { display: none; }

/* Breadcrumbs */
.breadcrumbs-band { background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); }
.breadcrumbs-band .container { padding-block: .7rem; }
.mod-breadcrumbs__wrapper { margin: 0; font-size: .9rem; }
.breadcrumb, .mod-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--c-muted);
}
.breadcrumb-item { margin: 0; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; margin-inline-end: .35rem; color: #b5b9c3; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-blue); text-decoration: underline; }
.mod-breadcrumbs__here, .mod-breadcrumbs__divider, .breadcrumb .icon-location { display: none; }
.breadcrumb.px-3 { padding: 0; }
.mod-articles-date .icon-calendar { display: none; }

/* ---------- Content (com_content) ---------- */
.com-content-article, .com-content-category-blog, .com-content-featured, .contact, .com-contact {
  max-width: 100%;
}
.page-header h1, .page-header h2, .com-content-article h1, .com-content-article .page-header h2 {
  margin-top: 0;
  padding-bottom: .4em;
  border-bottom: 2px solid var(--c-line);
  position: relative;
}
.page-header h1::after, .page-header h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 64px; height: 2px;
  background: var(--c-navy);
}
.com-content-article__body ul, .item-content ul, .category-desc ul { list-style: none; padding-inline-start: 0; }
.com-content-article__body ul > li, .item-content ul > li, .category-desc ul > li {
  position: relative;
  padding-inline-start: 1.5rem;
}
.com-content-article__body ul > li::before, .item-content ul > li::before, .category-desc ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: .15rem;
  top: .62em;
  width: 0; height: 0;
  border-block: .3rem solid transparent;
  border-inline-start: .5rem solid var(--c-navy);
}
.com-content-article__body ul ul > li::before { border-inline-start-color: var(--c-grey); }

/* Imagen de artículo flotante (servicios) */
.item-image, figure.item-image {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.item-image img { width: 100%; }
.item-image.float-end, .item-image.right, .float-end { float: inline-end; margin-inline-start: 2rem; max-width: min(42%, 380px); }
.item-image.float-start, .item-image.left, .float-start { float: inline-start; margin-inline-end: 2rem; max-width: min(42%, 380px); }
@media (max-width: 640px) {
  .item-image.float-end, .item-image.float-start, .float-end, .float-start { float: none; max-width: 100%; margin-inline: 0; }
}
.com-content-article::after { content: ""; display: table; clear: both; }

/* Texto a 75ch + columna derecha de imagen (Brintza, servicios, noticias) */
.com-content-article__body:has(> .item-image),
.page-news .com-content-category-blog {
  display: grid;
  grid-template-columns: minmax(0, 75ch) minmax(300px, 1fr);
  column-gap: 2.5rem;
  align-items: start;
}
.com-content-article__body:has(> .item-image) > *,
.page-news .com-content-category-blog > * { grid-column: 1; }
.page-news .com-content-category-blog > h1 { grid-column: 1 / -1; }
.com-content-article__body:has(> .item-image) > .item-image,
.page-news .com-content-category-blog > .category-desc {
  grid-column: 2;
  grid-row: 1 / span 50;
  float: none;
  max-width: none;
  margin: 0;
}
.page-news .com-content-category-blog > .category-desc { grid-row: 2 / span 50; }
.com-content-article__body:has(> .item-image) > .item-image,
.page-news .category-desc img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.com-content-article__body:has(> .item-image) > .item-image img,
.page-news .category-desc img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* Photo gallery in the right column (replaces the single full image): one large, the rest below */
.com-content-article__body:has(> .item-image) > .photo-gallery {
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .6rem;
}
/* Mosaic: wide = full row, half = 2 per row, tall (vertical photos) = 3 per row */
.photo-gallery a { grid-column: span 6; }
.photo-gallery a.is-half { grid-column: span 3; }
.photo-gallery a.is-tall, .photo-gallery a.is-third { grid-column: span 2; }
.photo-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.com-content-article__body:has(> .item-image) > .photo-gallery img,
.photo-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 700 / 323;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.com-content-article__body:has(> .item-image) > .photo-gallery a.is-half img,
.photo-gallery a.is-half img { aspect-ratio: 16 / 10; object-position: center; }
.com-content-article__body:has(> .item-image) > .photo-gallery a.is-tall img,
.photo-gallery a.is-tall img { aspect-ratio: 9 / 16; object-position: center; }
.com-content-article__body:has(> .item-image) > .photo-gallery a.is-third img,
.photo-gallery a.is-third img { aspect-ratio: 4 / 3; object-position: center; }
/* On narrow screens the gallery goes after the text, so the text is not pushed far down */
@media (max-width: 900px) {
  .com-content-article__body:has(> .item-image) > .photo-gallery.item-image { order: 1; margin: 1.5rem 0 0; }
}
.photo-gallery a:hover img, .photo-gallery a:focus-visible img { transform: scale(1.04); }

/* Lightbox (template.js) */
.lightbox {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(10 14 30 / .92); }
.lightbox__figure {
  height: 100%;
  margin: 0;
  padding: 3.5rem 4.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 7.5rem); object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgb(0 0 0 / .5); }
.lightbox__caption { font-size: .95rem; color: #d7dcea; text-align: center; }
.lightbox__btn {
  position: absolute;
  width: 3rem; height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  line-height: 1;
  transition: background .2s;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: rgb(255 255 255 / .28); }
.lightbox__close { top: .75rem; right: .75rem; }
.lightbox__close::before { content: "×"; }
.lightbox__prev, .lightbox__next { top: 50%; translate: 0 -50%; }
.lightbox__prev { left: .75rem; }
.lightbox__next { right: .75rem; }
.lightbox__prev::before { content: "‹"; }
.lightbox__next::before { content: "›"; }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }
@media (max-width: 640px) {
  .lightbox__figure { padding: 3.5rem .5rem 4.5rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: .75rem; translate: none; }
  .lightbox__prev { left: calc(50% - 3.5rem); }
  .lightbox__next { right: calc(50% - 3.5rem); }
}

.view-category .category-desc { max-width: 75ch; }
.page-news .com-content-category-blog > .category-desc { max-width: none; }
@media (max-width: 900px) {
  .com-content-article__body:has(> .item-image),
  .page-news .com-content-category-blog { grid-template-columns: minmax(0, 1fr); }
  .com-content-article__body:has(> .item-image) > .item-image,
  .page-news .com-content-category-blog > .category-desc {
    grid-column: 1;
    grid-row: auto;
    order: -1;
    width: 100%;
    margin-bottom: 1.5rem;
  }
  .page-news .com-content-category-blog > h1 { order: -2; }
}

/* Páginas legales: caja estrecha para líneas cortas */
.page-legal .site-main > .container { max-width: calc(68ch + 2 * var(--gutter)); }
.page-legal .com-content-article__body :is(p, li) { text-align: justify; hyphens: auto; }
.lead-box {
  padding: 1.25rem 1.5rem;
  background: var(--c-bg-soft);
  border-inline-start: 4px solid var(--c-navy);
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
}

.article-info, .com-content-article__info {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin: 0 0 1.25rem;
  font-size: .88rem;
  color: var(--c-muted);
}
.article-info dt { display: none; }
.article-info dd { margin: 0; }
.article-info [class^="icon-"], .article-info [class*=" icon-"] { display: none; }

/* Blog (noticias / servicios) */
.blog-items {
  display: grid;
  gap: 1.25rem;
}
.blog-items.columns-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.blog-items.columns-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.blog-item {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.blog-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-item .item-content > :last-child { margin-bottom: 0; }
.blog-item h2, .blog-item .item-title {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
}
.blog-item h2 a { color: var(--c-navy); text-decoration: none; }
.blog-item h2 a:hover { color: var(--c-blue); }
.blog-item { overflow: hidden; }
.blog-item .item-content { display: flex; flex-direction: column; height: 100%; }
.blog-item .item-image {
  order: -1;
  float: none;
  max-width: none;
  margin: -1.25rem -1.4rem 1.1rem;
  aspect-ratio: 16 / 8;
  border-radius: 0;
  box-shadow: none;
}
.blog-item .item-image img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.blog-item .page-header h2 { border: 0; padding: 0; margin: 0 0 .5rem; font-size: 1.6rem; }
.blog-item .page-header h2::after { display: none; }
.blog-item .lead-box { padding: 0; background: none; border: 0; font-size: 1rem; color: var(--c-muted); }
.blog-item .readmore { margin-top: auto; padding-top: .5rem; }
.readmore { margin: .75rem 0 0; }
.readmore .btn { padding: .45em 1.1em; font-size: .9rem; background: transparent; color: var(--c-navy); }
.readmore .btn:hover { background: var(--c-navy); color: #fff; }
.readmore .icon-chevron-right, .readmore [class^="icon-"] { display: none; }
.items-more ol, .com-content-category-blog__links ol { padding-inline-start: 1.2rem; }

/* Pagination */
.pagination, .com-content-category-blog__navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}
.page-item { margin: 0; }
.page-link {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 .6rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--c-navy);
}
.page-item.active .page-link { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }
.page-item.disabled .page-link { color: #b5b9c3; }
.counter { color: var(--c-muted); font-size: .9rem; }

/* Enlaces de interés */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  max-width: none;
}
@media (max-width: 900px) { .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .links-grid { grid-template-columns: minmax(0, 1fr); } }
.links-group {
  padding: 1.25rem 1.4rem;
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  border-top: 4px solid var(--c-navy);
}
.links-group h2 { margin: 0 0 .75rem; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .05em; }
.links-group ul { list-style: none; margin: 0; padding: 0; }
.links-group li { padding: 0 !important; }
.links-group li::before { display: none; }
.links-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .45rem 0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--c-line);
}
.links-group li:last-child a { border: 0; }
.links-group a::after { content: "↗"; font-size: .85em; color: var(--c-grey); }
.links-group a:hover { color: var(--c-navy); }

/* ---------- Contacto ---------- */
.com-contact, .contact {
  display: grid;
  gap: 2rem;
}
.com-contact__container, .contact-miscinfo, .com-contact__miscinfo { max-width: none; }
.contact-address, .com-contact__address {
  display: grid;
  gap: .4rem;
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  font-style: normal;
}
.contact-address dt, .com-contact__address dt { display: none; }
.contact-address dd, .com-contact__address dd { margin: 0; }
.com-contact__address .icon-address, .com-contact__address [class^="icon-"], .contact-address [class^="icon-"] { display: none; }
.contact-form, .com-contact__form {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}
.contact-form fieldset, .com-contact__form fieldset { border: 0; padding: 0; margin: 0; }
.contact-form legend, .com-contact__form legend {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  color: var(--c-navy);
  margin-bottom: 1rem;
}
.map-embed {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--c-bg-soft);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (min-width: 900px) {
  .com-contact:has(.com-contact__form) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  .com-contact > .page-header, .com-contact > h1, .com-contact > h2 { grid-column: 1 / -1; }
}

/* ---------- Alerts ---------- */
joomla-alert, .alert {
  display: block;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-inline-start: 4px solid var(--c-blue);
  background: #eef4fc;
}
joomla-alert[type="success"], .alert-success { border-color: var(--c-green); background: #f4f9e6; }
joomla-alert[type="danger"], joomla-alert[type="error"], .alert-danger { border-color: var(--c-red); background: #fcefef; }
joomla-alert[type="warning"], .alert-warning { border-color: var(--c-orange); background: #fff6ef; }
.alert-heading { margin: 0 0 .25rem; font-size: 1.2rem; }
.joomla-alert--close, .btn-close { float: inline-end; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: inherit; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  color: #c6cbe0;
  background: var(--c-navy);
  font-size: .95rem;
}
.site-footer a { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
.footer-logo {
  width: 180px;
  height: auto;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .75rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer strong { color: #fff; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { margin: 0 0 .35rem; }
.site-footer__bottom { border-top: 1px solid rgb(255 255 255 / .1); background: var(--c-navy-900); font-size: .85rem; }
.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 2rem;
  padding-block: 1rem;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom .mod-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__bottom .mod-menu li { margin: 0; }
.site-footer__bottom a { color: #c6cbe0; text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; text-decoration: underline; }

/* ---------- Cookie notice ---------- */
.cookie-notice {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: 1rem 1.25rem;
  color: #e3e7f5;
  background: var(--c-navy-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .92rem;
  animation: cookieIn .35s var(--ease);
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; flex: 1 1 320px; }
.cookie-notice a { color: #fff; }
.cookie-notice .btn { padding: .5em 1.2em; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Error / offline ---------- */
.error-box { max-width: 720px; text-align: center; padding-block: 3rem; }
.error-box__code {
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  line-height: 1;
  color: var(--c-navy);
  opacity: .15;
}
.error-box__debug { text-align: start; overflow-x: auto; font-size: .85rem; }
.offline-page { display: grid; place-items: center; background: var(--c-bg-soft); padding: 1rem; }
.offline-box {
  width: min(100%, 420px);
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.offline-box img { margin: 0 auto 1.5rem; }
.offline-form { display: grid; gap: .5rem; text-align: start; }
.offline-form .btn { justify-content: center; margin-top: .75rem; }

/* ---------- Print ---------- */
@media print {
  .topbar, .main-nav, .nav-toggle, .page-banner, .hero, .services-band, .site-footer__bottom nav, .cookie-notice, .mod-breadcrumbs__wrapper { display: none !important; }
  .site-header { position: static; box-shadow: none; }
  .site-footer { background: none; color: #000; }
  .footer-logo { filter: none; }
  a { color: #000; }
}

/* ---------- Contacto: maquetación a dos columnas sobre el layout core ---------- */
.com-contact > h2,
.com-contact__container > h2 { display: none; }
.com-contact__miscinfo > dl { margin: 0; }
.com-contact__miscinfo > dl > dt { display: none; }
.com-contact__miscinfo > dl > dd { margin: 0; }
.com-contact__miscinfo h2 { font-size: 1.5rem; margin: 1.5rem 0 .75rem; }
.contact-address dd + dd .contact-suburb::before { content: ""; }
.contact-form .field-spacer { font-size: .85rem; color: var(--c-muted); }
.contact-form .field-spacer label { font-weight: 400; color: inherit; }
.contact-form .red { color: var(--c-red); }
.contact-form .btn-primary { margin-top: .5rem; }
.contact-form #jform_consentbox { border: 0; padding: 0; margin: 0; }
.contact-form .control-group:has(> .control-label #jform_consentbox-lbl) > .control-label { display: none; }
.contact-form .form-check-label { font-weight: 400; color: var(--c-text); font-size: .92rem; }
@media (min-width: 900px) {
  .com-contact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas:
      "title title"
      "info form"
      "misc form";
    column-gap: 2.5rem;
    align-items: start;
  }
  .com-contact > h1, .com-contact > .page-header { grid-area: title; }
  .com-contact__container { grid-area: info; }
  .com-contact__form { grid-area: form; position: sticky; top: calc(var(--header-h) + 1rem); }
  .com-contact__miscinfo { grid-area: misc; }
}

/* ---------- Modal mínimo (Bootstrap JS lo usa el aviso de privacidad) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 1050; overflow-y: auto; }
.modal.show { display: block; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgb(17 23 47 / .55); }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 1; }
.modal-dialog { width: min(92vw, 900px); margin: 5vh auto; }
.modal-content { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; background: var(--c-navy); color: #fff; }
.modal-title { margin: 0; color: #fff; font-size: 1.4rem; }
.modal-header .btn-close { width: 2rem; height: 2rem; border: 0; background: none; color: #fff; cursor: pointer; position: relative; }
.modal-header .btn-close::before { content: "×"; font-size: 1.8rem; line-height: 1; }
.modal-body { height: 70vh; }
.modal-body iframe { width: 100%; height: 100%; border: 0; }
.modal-open { overflow: hidden; }
.component-only { padding: 1.5rem; }

/* ---------- Adjuntos (circulares PDF) ---------- */
.attachments {
  margin: 2rem 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--c-bg-soft);
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--c-navy);
}
.attachments__title { margin: 0 0 .75rem; font-size: 1.5rem; }
.attachments__list { list-style: none; margin: 0; padding: 0; }
.attachments__list li { margin: 0; padding: 0; }
.attachments__list li::before { display: none; }
.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 600;
  text-decoration: none;
}
.attachment-link:hover .attachment-link__text { text-decoration: underline; }
.attachment-link__icon {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: var(--c-red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.attachment-link__meta { font-weight: 400; font-size: .85rem; color: var(--c-muted); }
.attachment-link--compact { margin: .5rem 0 0; }
.attachment-link--compact a { font-weight: 600; }
.attachment-link--compact a::before { content: "PDF"; display: inline-block; margin-inline-end: .5rem; padding: .1rem .35rem; border-radius: 4px; background: var(--c-red); color: #fff; font-size: .7rem; vertical-align: .1em; }
.article-source { color: var(--c-muted); font-size: .92rem; }
