/* ===========================================================
   Candelas y Asociados — hoja de estilos
   Paleta y tipografía según manual de identidad corporativa.
   =========================================================== */

:root {
  --azul-candelas: #034792;
  --azul-candelas-oscuro: #023768;
  --negro: #1a1a1a;
  --gris-15: #d9d9da;
  --gris-35: #adaeb0;
  --gris-60: #767678;
  --blanco: #ffffff;

  --font-titulares: Georgia, "Times New Roman", Times, serif;
  --font-cuerpo: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --ancho-maximo: 1100px;
  --radio: 4px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-cuerpo);
  color: var(--negro);
  background: var(--blanco);
  line-height: 1.6;
}

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

a {
  color: var(--azul-candelas);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--azul-candelas);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-titulares);
  line-height: 1.25;
  color: var(--negro);
  font-weight: 700;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.6rem;
  margin-top: 0;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 0 24px;
}

/* -----------------------------------------------------------
   Cabecera
   El padding vertical/horizontal de la cabecera respeta el
   area de respeto de la marca (1X alrededor del logo, segun
   el manual): con un logo de 40px de alto, 1X ~ 20px, asi que
   dejamos margen de sobra en todas direcciones.
   ----------------------------------------------------------- */

.cabecera {
  border-bottom: 1px solid var(--gris-15);
  padding: 28px 0;
}

.cabecera .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cabecera__logo img {
  height: 40px;
  width: auto;
}

.nav-principal ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-principal a {
  color: var(--negro);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-principal a:hover,
.nav-principal a:focus,
.nav-principal a[aria-current="page"] {
  color: var(--azul-candelas);
  text-decoration: none;
  border-bottom: 2px solid var(--azul-candelas);
}

/* -----------------------------------------------------------
   Hero (portada)
   ----------------------------------------------------------- */

.hero {
  background: var(--blanco);
  padding: 64px 0;
  border-bottom: 1px solid var(--gris-15);
}

.hero__contenido {
  max-width: 700px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--gris-60);
}

/* -----------------------------------------------------------
   Botones
   ----------------------------------------------------------- */

.boton {
  display: inline-block;
  background: var(--azul-candelas);
  color: var(--blanco);
  padding: 12px 28px;
  border-radius: var(--radio);
  font-weight: 600;
  font-size: 0.95rem;
}

.boton:hover,
.boton:focus {
  background: var(--azul-candelas-oscuro);
  text-decoration: none;
}

.boton--secundario {
  background: transparent;
  color: var(--azul-candelas);
  border: 1px solid var(--azul-candelas);
}

.boton--secundario:hover,
.boton--secundario:focus {
  background: var(--azul-candelas);
  color: var(--blanco);
}

/* -----------------------------------------------------------
   Secciones genericas
   ----------------------------------------------------------- */

.seccion {
  padding: 56px 0;
}

.seccion--gris {
  background: #f7f7f8;
  border-top: 1px solid var(--gris-15);
  border-bottom: 1px solid var(--gris-15);
}

.seccion__cabecera {
  max-width: 700px;
  margin-bottom: 36px;
}

.seccion__cabecera p {
  color: var(--gris-60);
}

/* -----------------------------------------------------------
   Tarjetas de servicios / valores
   ----------------------------------------------------------- */

.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.tarjeta {
  border: 1px solid var(--gris-15);
  border-radius: var(--radio);
  padding: 28px;
  background: var(--blanco);
}

.tarjeta h3 {
  margin-top: 0;
  color: var(--azul-candelas);
}

.tarjeta p:last-child {
  margin-bottom: 0;
  color: var(--gris-60);
}

/* -----------------------------------------------------------
   Pagina de contacto
   ----------------------------------------------------------- */

.lista-contacto {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lista-contacto li {
  padding: 14px 0;
  border-bottom: 1px solid var(--gris-15);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lista-contacto li:last-child {
  border-bottom: none;
}

.lista-contacto dt {
  font-weight: 600;
  min-width: 140px;
}

.marcador-pendiente {
  color: var(--gris-60);
  font-style: italic;
}

/* -----------------------------------------------------------
   Contenido tipo texto legal
   ----------------------------------------------------------- */

.texto-legal h2 {
  margin-top: 2em;
  font-size: 1.3rem;
}

.texto-legal h2:first-child {
  margin-top: 0;
}

.texto-legal ul {
  padding-left: 1.2em;
}

/* -----------------------------------------------------------
   Pie de pagina
   ----------------------------------------------------------- */

.pie {
  background: var(--azul-candelas);
  color: var(--blanco);
  padding: 48px 0 28px;
  margin-top: 56px;
}

.pie a {
  color: var(--blanco);
}

.pie__superior {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.pie__logo img {
  height: 32px;
  width: auto;
  margin-bottom: 12px;
}

.pie__descriptor {
  color: #d6e2f2;
  font-size: 0.9rem;
  max-width: 320px;
}

.pie__nav ul,
.pie__legal ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pie__nav li,
.pie__legal li {
  margin-bottom: 8px;
}

.pie__titulo {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #a9c2df;
  margin-bottom: 12px;
}

.pie__inferior {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #a9c2df;
}

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */

@media (max-width: 640px) {
  .cabecera .contenedor {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 1.7rem;
  }

  .hero {
    padding: 40px 0;
  }

  .seccion {
    padding: 40px 0;
  }
}
