*, *::before, *::after {
  font-family: 'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #303030;
}

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

/* Header superpuesto sobre el vídeo */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(48, 48, 48, 0.95);
  color: #ffffff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  box-sizing: border-box;
  z-index: 100;
}

.site-header .brand {
  font-size: 24px;
  font-weight: 400;
  justify-self: start;
  white-space: nowrap;
}

.site-header .menu {
  display: flex;
  gap: 32px;
  justify-self: center;
}

.site-header .menu a {
  font-size: 20px;
  font-weight: 300;
  white-space: nowrap;
}

.site-header .phone {
  font-size: 20px;
  font-weight: 400;
  justify-self: end;
  white-space: nowrap;
}

.site-header .menu a:hover,
.site-header .brand:hover,
.site-header .phone:hover {
  opacity: 0.75;
}

/* Vídeo a pantalla completa */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bloque centrado: Equipo */
.equipo {
  padding: 96px 24px;
  scroll-margin-top: 80px;
}

.equipo-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.equipo h2 {
  font-size: 42px;
  color: #000000;
  font-weight: 600;
  margin: 0 0 24px;
}

.equipo p {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.equipo a {
  font-weight: 700;
  color: #a33a20;
  text-decoration: none;
}

/* Contactos del equipo: tres columnas */
.equipo-contactos {
  padding: 0 24px 96px;
}

.equipo-columnas {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.equipo-columna {
  min-width: 0;
  text-align: center;
}

.equipo-icono {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 25px;
  border-radius: 50%;
  object-fit: cover;
}

.equipo-columna h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 18px 0 25px;
}

.equipo-mail-principal {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
}

.equipo-mails {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

.equipo-mails li {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.equipo-mails strong {
  font-weight: 700;
}

@media (max-width: 768px) {
  .equipo-columnas {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Franja con imagen y texto sobre la función del notario */
.notario-franja {
  width: 100%;
  height: 500px;
  box-sizing: border-box;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121212;
  background-image: linear-gradient(to bottom, rgba(18, 18, 18, 0.90), rgba(18, 18, 18, 0.90)), url('/media/notario-fondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.notario-franja p {
  max-width: 1000px;
  margin: 0;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.23;
  color: #ffffff;
  text-align: center;
}

/* Servicios: icono centrado y acordeón cerrado inicialmente */
.servicios {
  padding: 96px 24px;
  scroll-margin-top: 80px;
}

.servicios-icono {
  display: block;
  width: 159px;
  height: 159px;
  margin: 0 auto 48px;
  border-radius: 50%;
  object-fit: contain;
}

.servicios-acordeon {
  max-width: 1000px;
  margin: 0 auto;
}

.servicios-acordeon details {
  border-bottom: 1px solid #dddddd;
}

.servicios-acordeon details:first-child {
  border-top: 1px solid #dddddd;
}

.servicios-acordeon summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 24px;
  font-weight: 600;
  color: #000000;
  cursor: pointer;
  list-style: none;
}

.servicios-acordeon summary::-webkit-details-marker {
  display: none;
}

.servicios-acordeon summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 32px;
  font-weight: 300;
  color: #bc9942;
}

.servicios-acordeon details[open] summary::after {
  content: '−';
}

.servicios-acordeon summary:focus-visible {
  outline: 2px solid #bc9942;
  outline-offset: 4px;
}

.servicios-contenido {
  padding: 0 0 24px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
}

.servicios-contenido p {
  margin: 0 0 16px;
}

.servicios-contenido p:last-child {
  margin-bottom: 0;
}

/* Franja del socio con enlaces institucionales */
.socio-franja {
  width: 100%;
  height: 700px;
  box-sizing: border-box;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background-color: #000000;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40)), url('/media/socio-fondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  scroll-margin-top: 80px;
}

.socio-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.socio-franja h2 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
}

.socio-franja h3 {
  margin: 0 0 32px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.socio-enlaces {
  list-style: disc outside;
  padding: 0 0 0 24px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.socio-enlaces li {
  margin: 0 0 12px;
}

.socio-enlaces a {
  color: #ffffff;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* Texto centrado de contacto */
.contacto-intro {
  padding: 96px 24px;
  text-align: center;
}

.contacto-inner {
  max-width: 900px;
  margin: 0 auto;
}

.contacto-intro h2 {
  margin: 0 0 24px;
  font-size: 30px;
  font-weight: 600;
}

.contacto-intro p {
  margin: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.6;
}

/* Formulario de contacto, sin etiquetas visibles */
.contacto-form {
  max-width: 560px;
  margin: 48px auto 0;
  text-align: left;
}

.contacto-form > input,
.contacto-telefono {
  box-sizing: border-box;
  width: 100%;
  height: 58px;
  margin: 0 0 32px;
  border: 0;
  border-bottom: 1px solid #d5d5d5;
  border-radius: 0;
  background: #ffffff;
}

.contacto-form > input,
.contacto-telefono input,
.contacto-telefono select {
  font-size: 16px;
  font-weight: 400;
  color: #303030;
  padding: 12px 0;
}

.contacto-form input::placeholder {
  color: #888888;
  opacity: 1;
}

.contacto-telefono {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contacto-telefono select {
  width: 118px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
}

.contacto-telefono input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
}

.prefijo-selector {
  position: relative;
  flex-shrink: 0;
  width: 118px;
}

.prefijo-selector[hidden],
.prefijo-paises[hidden],
.contacto-telefono select[hidden] {
  display: none;
}

.prefijo-toggle,
.prefijo-opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: #ffffff;
  color: #303030;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
}

.prefijo-toggle {
  padding: 12px 0;
  min-height: 44px;
}

.prefijo-selector img {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.prefijo-flecha {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #888888;
  margin-left: auto;
}

.prefijo-paises {
  position: absolute;
  top: 100%;
  left: 0;
  width: 340px;
  max-width: calc(100vw - 48px);
  max-height: 264px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #dddddd;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 110;
}

.prefijo-opcion {
  padding: 12px;
  min-height: 44px;
}

.prefijo-opcion span:last-child {
  margin-left: auto;
  flex-shrink: 0;
}

.prefijo-opcion:hover,
.prefijo-opcion:focus-visible {
  background: #f5f2e9;
}

.contacto-consentimiento {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.3;
  cursor: pointer;
}

.contacto-consentimiento input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #666666;
  border-radius: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.contacto-consentimiento input:checked {
  background: #b99740;
  border-color: #b99740;
}

.contacto-consentimiento input:checked::after {
  content: '✓';
  display: block;
  text-align: center;
  color: #ffffff;
  font-size: 16px;
  line-height: 16px;
}

.contacto-consentimiento a {
  color: #a33a20;
  text-decoration: none;
}

.contacto-enviar {
  display: block;
  margin: 36px auto 0;
  width: 125px;
  height: 56px;
  border: 0;
  background: #b99740;
  color: #121212;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.contacto-enviar:hover {
  background: #a18132;
}

.contacto-form :is(input, select, button, a):focus-visible {
  outline: 2px solid #b99740;
  outline-offset: 4px;
}

.contacto-form .contacto-estado,
.contacto-form .contacto-aviso {
  margin: 20px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

/* Ubicación: dos columnas iguales a todo el ancho */
.ubicacion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.ubicacion-mapa {
  height: 756px;
  position: relative;
  background: #eeeeee;
}

.ubicacion-mapa iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ubicacion-datos {
  height: 756px;
  display: flex;
  align-items: center;
  padding: 64px clamp(24px, 5vw, 80px);
  box-sizing: border-box;
  min-width: 0;
  background: #303030;
  color: #ffffff;
  text-align: left;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
}

.ubicacion-datos h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.ubicacion-datos p {
  margin: 0 0 20px;
}

.ubicacion-datos p:last-child {
  margin-bottom: 0;
}

.ubicacion-datos strong {
  font-weight: 700;
}

.ubicacion-datos a {
  color: #ffffff;
  text-decoration: none;
}

.ubicacion-datos .ubicacion-web {
  margin-bottom: 0;
}

.ubicacion-datos .ubicacion-web a {
  font-size: 26px;
  font-weight: 700;
  color: #ff8562;
}

.ubicacion-datos .ubicacion-direccion {
  margin-bottom: 0;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.45;
}

.ubicacion-datos .ubicacion-email {
  margin-bottom: 40px;
  font-size: 26px;
  font-weight: 300;
}

.ubicacion-datos .ubicacion-email a {
  color: #ff8562;
}

@media (max-width: 768px) {
  .ubicacion {
    grid-template-columns: 1fr;
  }

  .ubicacion-datos {
    padding: 48px 24px;
  }
}

/* Pie con enlaces legales */
.site-footer {
  background-color: #000000;
  color: #ffffff;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-copyright {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  justify-self: start;
}

.footer-centro {
  text-align: center;
}

.footer-credit {
  margin: 12px 0 0;
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.site-footer a {
  font-size: 14px;
  font-weight: 700;
}

.footer-linkedin {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.site-footer a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .site-footer {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .footer-copyright,
  .footer-linkedin {
    justify-self: center;
    text-align: center;
  }
}

.site-footer a:hover {
  opacity: 0.75;
}

/* Imagen de financiación después del footer */
.financiacion {
  background: #ffffff;
  padding: 24px;
  text-align: center;
}

.financiacion img {
  display: block;
  width: 760px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.financiacion-texto {
  margin: 16px 0 0;
  color: #000000;
  font-size: 14px;
  font-weight: 300;
}

/* Páginas legales */
.legal-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 24px 64px;
}

.legal-main h1 {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 32px;
}

.legal-content {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-content section {
  margin-bottom: 36px;
}

.legal-content h2 {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.legal-content p {
  margin: 0 0 20px;
}

.legal-content ul {
  padding-left: 24px;
  margin: 0 0 20px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  font-weight: 700;
}

.legal-content a {
  color: #b24c30;
  text-decoration: underline;
}

/* Menú: pantallas pequeñas */
@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .site-header .brand {
    font-size: 18px;
  }

  .site-header .menu {
    display: none;
  }

  .site-header .phone {
    font-size: 16px;
  }
}

/* Hero: título y acceso a contacto superpuestos al vídeo */
.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: end;
  gap: 24px;
  padding: 96px 24px 32px;
  color: #ffffff;
  box-sizing: border-box;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.15;
  font-weight: 700;
  color: #ffffff;
}

.hero-contacto {
  justify-self: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  background: #b99740;
  color: #121212;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  text-decoration: none;
}

.hero-contacto:hover {
  background: #a18132;
}

.hero-contacto:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.contacto-intro {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 72px 24px 24px;
  }
}

/* Selector ES/EN visible también en móvil, fuera del menú colapsado. */
.site-header {
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 24px;
}
/* El menú se centra sobre la pantalla, no sobre el espacio entre laterales. */
.site-header .menu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.language-switch {
  display: flex;
  gap: 4px;
  align-items: center;
}
.language-switch a {
  display: inline-flex;
  min-width: 32px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}
.language-switch a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
  font-weight: 700;
}
.language-switch a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
@media (max-width: 1200px) and (min-width: 769px) {
  .site-header { padding: 0 16px; column-gap: 14px; }
  .site-header .brand { font-size: 20px; }
  .site-header .menu { gap: 16px; }
  .site-header .menu a, .site-header .phone { font-size: 16px; }
}
@media (max-width: 1000px) {
  .site-header { grid-template-columns: 1fr auto auto; column-gap: 12px; }
  .site-header .menu { display: none; }
}
@media (max-width: 600px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 40px 32px;
    height: 80px;
    column-gap: 8px;
    align-content: center;
  }
  .site-header .brand { font-size: clamp(15px, 4vw, 18px); }
  .site-header .phone { grid-row: 2; grid-column: 1; justify-self: start; font-size: 14px; }
  .language-switch { grid-column: 2; grid-row: 1 / 3; }
}
