@import url('../variables.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
BASE
========================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: var(--fuente-size);
  background: var(--gris-claro);
  color: var(--texto);
  margin: 0;
  overflow-x: hidden;
  transition: .3s;
}

main {
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
}

body.fuente-legible {
  font-family: 'OpenDyslexic', sans-serif !important;
}

body.fuente-legible * {
  line-height: 1.8 !important;
  word-spacing: .15em !important;
}

body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

/* =========================
TIPOGRAFÍA
========================= */

h1,
h2,
h3,
.cesac-title,
.titulo-institucional {
  font-family: 'Cabin', sans-serif;
  color: var(--guinda);
}

.titulo-institucional {
  font-weight: 700;
}

.linea-dorada {
  width: 50px;
  height: 3px;
  background: var(--dorado);
  margin: 15px 0;
}

.barra-institucional {
  height: 6px;
  background: var(--guinda);
}

.shadow-institucional {
  box-shadow:
    0 10px 30px rgba(0, 0, 0, .08);
}

/* =========================
BOTONES
========================= */

.btn-institucional {
  background: var(--guinda);
  color: #fff;
  border-radius: 30px;
  padding: 12px 30px;
  text-decoration: none;
  display: inline-block;
  transition: .3s;
  font-weight: 500;
}

.btn-institucional:hover {
  background: var(--guinda);
  color: #fff;
  transform: translateY(-2px);
}

/* =========================
VENTANILLAS
========================= */

.ventanilla-tab {
  border: 2px solid var(--guinda);
  padding: 10px 25px;
  background: transparent;
  color: var(--guinda);
  border-radius: 50px;
  cursor: pointer;
  transition: .3s;
  font-weight: 700;
}

.ventanilla-tab.active {
  background: var(--guinda);
  color: #fff;
}

.ventanilla-panel {
  animation: fade .4s ease;
}

@keyframes fade {

  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }

}

/* =========================
PERSONAJE
========================= */

.character-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character-img {

  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--guinda);
  background: #fff;
  transition: .3s;

}

.character-card:hover .character-img {
  transform: scale(1.05);
}

.speech-bubble {

  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 15px;
  background: var(--negro);
  color: #fff;
  border-radius: 15px;
  display: none;
  z-index: 100;

}

.speech-bubble.active {

  display: block;

}

.speech-bubble::after {

  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  border: 10px solid transparent;
  border-top-color: var(--negro);

}

.avatar-play-btn{
    margin-top: 15px;
    padding: 12px 24px;
    background: #7A003C;
    color: #fff;
    border: 2px solid #7A003C;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: .3px;
    transition: all .3s ease;
}

.avatar-play-btn:hover{
    background: #5E002E;
    border-color: #5E002E;
}

/* =========================
CARRUSEL
========================= */

.carousel {

  height: 100%;

}

.carousel-inner {

  overflow: hidden;
  border-radius: 1rem;
  min-height: 380px;
  height: auto;

}

.carousel-item {

  height: 380px;

}

.carousel-item img {

  width: 100%;
  height: 100%;
  object-fit: cover;

}

.carousel-control-prev,
.carousel-control-next {

  width: 8%;

}

/* =========================
CONTACTO
========================= */

.contacto-card {

  border: none;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .06);
  transition: .3s;

}

.contacto-card:hover {

  transform: translateY(-4px);

}

.link-hover {

  transition: .3s;

}

.link-hover:hover {

  color: var(--dorado) !important;
  transform: translateX(5px);

}

/* =========================
ENLACES
========================= */

.enlace-card {

  border: none;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
  min-height: 150px;

}

.enlace-card:hover {

  transform: translateY(-5px);

  box-shadow:
    0 10px 25px rgba(0, 0, 0, .15);

  background:
    rgba(157, 33, 72, .05);

}

.enlace-card a {

  display: block;

}

.enlace-card img {

  width: 250px;
  height: auto;
  display: block;
  margin: auto;
  object-fit: contain;

}

/* =========================
FACEBOOK
========================= */

.facebook-container iframe {

  width: 100%;
  height: 520px;
  border: none;
  border-radius: 20px;

}

/* =========================
WHATSAPP
========================= */

.whatsapp-float {

  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: var(--verde_whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  transition: .3s;

}

.whatsapp-float:hover {

  transform: scale(1.1);

}

.whatsapp-float svg {

  width: 32px;
  fill: #fff;

}

/* =========================
LECTURA
========================= */

.reading-highlight {

  background: var(--amarillo);
  color: #000;
  border-radius: 4px;

}

body.high-contrast .reading-highlight {

  background: #fff;
  color: #000;

}

/* =========================
FOCUS
========================= */

:focus-visible {

  outline: 3px solid var(--amarillo);
  outline-offset: 2px;

}

/* =========================
RESPONSIVE
========================= */

@media(max-width:768px) {

  main {

    padding: 20px;

  }

  .character-img {

    width: 130px;
    height: 130px;

  }

  .carousel-item {

    height: 240px;

  }

  .carousel-inner {

    min-height: 240px;

  }

  .enlace-card img {

    width: 180px;

  }

  .btn-institucional {

    width: 100%;
    text-align: center;
    margin-bottom: 10px;

  }

  .facebook-container iframe {

    height: 400px;

  }

}

@media(prefers-reduced-motion:reduce) {

  * {
    animation: none !important;
    transition: none !important;
  }

}