/**
 * Camiño Seguro — estilos do sitio
 *
 * Filosofía: selectores pai → fillo (.site-header .gap, .hero-stack .frecha…),
 * clases curtas no HTML, sen BEM con __.
 *
 * Zonas: 1 Base → 2 Reixa global → 3 Cabeceira → 4 Hero → 5 Contido → 6 Pe
 */

/* =============================================================================
   ZONA 1 — Base (global)
   ============================================================================= */

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

html {
  background-color: #007bc4;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Xunta Sans", "XuntaSans", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 16px;
  background-color: #007bc4;
  color: #93faff;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 48rem) {
  body {
    font-size: 20px;
    line-height: 24px;
  }
}

p {
  font-family: "Xunta Sans", "XuntaSans", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-style: normal;
}

.sr-only {
  position: absolute;
  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;
  left: 0.75rem;
  top: 0;
  z-index: 10000;
  padding: 0.65rem 1rem;
  background-color: #0a0a0a;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: underline;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateY(-120%);
  transition: transform 0.15s ease-out;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0.75rem);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

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

a:visited {
  color: inherit;
}

a:hover,
a:active {
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

a[href^="tel:"],
a[href^="tel:"]:visited {
  color: #ffda00;
  font-weight: 700;
}

h2 {
  color: #fff;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 24px;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* =============================================================================
   ZONA 2 — Reixa global (comparte varios bloques)
   ============================================================================= */

.contenedor {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 16px;
  box-sizing: border-box;
}

.page-body {
  width: 100%;
  box-sizing: border-box;
}

/* =============================================================================
   ZONA 3 — Cabeceira (.site-header …)
   ============================================================================= */

.site-header {
  position: relative;
  z-index: 10;
  overflow: visible;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: #007bc4;
}

.site-header .inner {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-header .gap {
  display: none;
  flex: 0 0 0;
  height: 0;
  overflow: hidden;
}

.site-header .logos {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header .rule {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  height: 1px;
  background-color: #fff;
  flex-shrink: 0;
}

.site-header .brand {
  display: flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.site-header .logo {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
}

.site-header .logo.xacobeo {
  height: 21px;
}

@media (min-width: 48rem) {
  .site-header {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .site-header .inner {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .site-header .gap {
    display: block;
    flex: 0 0 50px;
    height: 50px;
    overflow: visible;
  }

  .site-header .rule {
    display: block;
  }

  .site-header .logo {
    height: 48px;
  }

  .site-header .logo.xacobeo {
    height: 24px;
  }
}

/* =============================================================================
   ZONA 4 — Hero (.hero-stack …)
   ============================================================================= */

.hero-stack {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero-stack .hero {
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background-color: #003d66;
}

.hero-stack .hero img {
  width: 100%;
  height: 218px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-stack .frecha {
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;
  z-index: 5;
  pointer-events: none;
}

.hero-stack .frecha-slot {
  position: relative;
  overflow: visible;
  line-height: 0;
  padding-top: 27px;
}

.hero-stack .frecha-img {
  display: block;
  height: 395px;
  width: auto;
  margin-left: -45px;
  max-width: none;
  transform: rotate(15deg);
  transform-origin: center center;
}

@media (min-width: 48rem) {
  .hero-stack .hero img {
    height: 442px;
  }

  .hero-stack .frecha {
    top: -200px;
  }

  .hero-stack .frecha-slot {
    padding-top: 77px;
  }

  .hero-stack .frecha-img {
    height: 720px;
    margin-left: -97px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }

  .hero-stack .frecha-img {
    transform: none;
  }
}

/* =============================================================================
   ZONA 5 — Contido xeral (.contenido-general …)
   ============================================================================= */

.contenido-general {
  box-sizing: border-box;
  width: 100%;
  max-width:550px;
  
}

.contenido-general .lang-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  width: 380px;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  background-color: #007bc4;
}

.contenido-general .lang-tabs .tab {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-family: "Xunta Sans", "XuntaSans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
  padding: 0.5rem 0.35rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: transparent;
  text-transform: uppercase;
  color: #fff;
}

.contenido-general .lang-tabs .tab:hover {
  color: #fff;
  opacity: 0.92;
}

.contenido-general .lang-tabs .tab.is-active,
.contenido-general .lang-tabs .tab[aria-selected="true"] {
  background-color: #fff;
  color: #007bc4;
}

.contenido-general .lang-tabs .tab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.contenido-general .lang-tabs .tab.is-active:focus-visible,
.contenido-general .lang-tabs .tab[aria-selected="true"]:focus-visible {
  outline-color: #007bc4;
}

.contenido-general .lang-panels {
  width: 100%;
}

.contenido-general .title-main {
  font-family: "Anton", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 47px;
  line-height: 49px;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.contenido-general .panel .num.num-block,
.contenido-general .panel .num.num-app,
.contenido-general .panel .num.num-app strong {
  color: #ffda00;
  font-weight: 700;
}

.contenido-general .panel a.row-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.contenido-general .panel a.row-link:visited {
  color: inherit;
}

.contenido-general .panel a.row-link[href^="tel:"] {
  color: #93faff;
  font-weight: 400;
}

.contenido-general .panel a.row-link[href^="tel:"] .num {
  color: #ffda00;
  font-weight: 700;
}

.contenido-general .panel a.row-link.row-link--external {
  color: #93faff;
}

.contenido-general .panel a.row-link.row-link--external .desc {
  color: #93faff;
}

@media (min-width: 48rem) {
  .contenido-general {
    margin-left: 350px; margin-top: 40px;
    width: calc(100% - 350px);
  }

  .contenido-general .lang-tabs {
    justify-content: flex-start;
    gap: 20px;
    width: auto;
    max-width: 100%;
  }

  .contenido-general .lang-tabs .tab {
    flex: 0 0 auto;
  }

  .contenido-general .title-main {
    font-size: 82px;
    line-height: 86px;
  }
}

@media (max-width: 48rem) {
  .contenido-general {
    margin-top: 100px;
  }

  .contenido-general .lang-tabs {
    width: 100%;
    max-width: none;
    justify-content: space-evenly;
  }

  .contenido-general .lang-tabs .tab {
    flex: 0 1 auto;
  }

  .contenido-general main > section + section {
    margin-top: 1.5rem;
  }

  .contenido-general main .panel {
    margin-top: 0;
    background-color: transparent;
  }

  .contenido-general main a.row-link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5rem;
    row-gap: 0.2rem;
    padding: 0.65rem 12px;
    border-bottom: 1px solid #93faff;
    background: linear-gradient(to top, #0070b3 0%, #007bc4 50%, #007bc4 100%);
  }

  .contenido-general main a.row-link:last-of-type {
    border-bottom: none;
  }

  .contenido-general main a.row-link .num {
    flex: 0 0 auto;
  }

  .contenido-general main a.row-link .desc {
    flex: 1 1 12rem;
    min-width: 0;
  }
}

/* =============================================================================
   ZONA 6 — Pe de páxina (footer …)
   ============================================================================= */

.site-footer {
  margin-top: calc(2.5rem + 50px);
}

.site-footer__xunta {
  width: 100%;
  box-sizing: border-box;
  background-color: #007bc4;
  color: #fff;
}

.site-footer__xunta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
  box-sizing: border-box;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.site-footer__logo:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.site-footer__logo-img {
  display: block;
  width: auto;
  height: 36px;
  object-fit: contain;
}

.site-footer__nav {
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.5rem;
}

.site-footer__item {
  margin: 0;
}

.site-footer__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(255 255 255 / 0.88);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__link:visited {
  color: rgb(255 255 255 / 0.88);
}

.site-footer__link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer__link:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 40rem) {
  .site-footer__list {
    justify-content: flex-start;
  }
}