@import url('../variables.css');

/* =========================
   RESET
========================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fuente-size);
  background: var(--blanco);
  color: var(--texto);
  overflow-x: hidden;
  transition: .3s ease;
  text-rendering: auto;
}

/* =========================
   ACCESIBILIDAD
========================= */

body.fuente-legible {
  font-family: 'OpenDyslexic', sans-serif !important;
  line-height: 1.8 !important;
  word-spacing: .15em !important;
}

body.high-contrast {
  background: #000;
  color: #fff;

  --blanco: #000;
  --texto: #fff;
  --amarillo: #ffff00;
}

body.high-contrast a {
  color: var(--amarillo) !important;
}

:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 3px;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* =========================
   IMÁGENES
========================= */

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  height: 380px;

  background:
    url("../../img/portadas_organigramas/cesac.jpeg") center/cover no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.hero-content {
  position: relative;
  max-width: 1100px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* =========================
   SECCIONES
========================= */

.section {
  padding: 60px 20px;
  text-align: center;
}

.section h2 {
  color: var(--guinda);
  margin-bottom: 20px;
}

.btn-institucional {
  display: inline-block;

  margin-top: 2rem;
  padding: 12px 30px;

  background: var(--guinda);
  color: #fff;

  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;

  transition: .3s;
}

.btn-institucional:hover {
  background: var(--oro);
}

/* =========================
   ORGANIGRAMA
========================= */

#organigrama {
  background: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}

#organigrama .line {
  width: 80px;
  height: 4px;

  margin: .75rem auto 3rem;

  background: var(--oro);
  border-radius: 2px;
}

.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tree-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;

  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.tree-block {
  background: #fff;

  min-width: 250px;
  max-width: 300px;

  padding: 2rem 1.5rem;

  border-radius: 1rem;

  text-align: center;

  box-shadow:
    0 6px 10px rgba(0, 0, 0, .15);

  transition:
    transform .3s;
}

.tree-block:hover {
  transform: translateY(-8px);
}

.tree-block img {
  border-radius: 12px;
}

/* =========================
   INSTITUCIONAL
========================= */

#institucional {
  background: var(--gris_claro);

  padding: 4rem 1.5rem;

  text-align: center;
}

#institucional h2 {
  color: var(--guinda);
  font-size: 2.2rem;
}

.info-container {
  display: flex;
  flex-wrap: wrap;

  justify-content: center;

  gap: 2rem;

  margin-top: 2rem;
}

.info-card {
  flex: 1 1 220px;
  max-width: 250px;

  background: #fff;

  padding: 1.5rem 1rem;

  border-radius: 12px;

  text-align: center;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, .1);

  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.info-card:hover {
  transform: translateY(-8px);

  box-shadow:
    0 10px 20px rgba(0, 0, 0, .15);
}

.icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
  color: var(--oro);
}

.info-card h3 {
  color: var(--guinda);

  font-size: 1.1rem;

  margin-bottom: .5rem;

  text-transform: uppercase;
}

.info-card p {
  color: #555;

  font-size: .95rem;

  line-height: 1.5;
}

.info-card a {
  color: inherit;
  text-decoration: none;
}

.info-card a:hover {
  text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:768px) {

  .hero {
    height: 300px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .tree-row {
    flex-direction: column;
    align-items: center;
  }

  .tree-block {
    width: 90%;
    max-width: 400px;
  }

  .info-container {
    flex-direction: column;
    align-items: center;
  }

  .info-card {
    width: 90%;
    max-width: 350px;
  }

}

@media(max-width:480px) {

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: .95rem;
  }

  #institucional h2 {
    font-size: 1.8rem;
  }

  .section {
    padding: 40px 15px;
  }

}