/* ============================================
  Archivo: lluvia.css
  Descripción: Estilos para la página de la sección "Recorridos > Lluvias" del sistema web Ecorut@s.
  Notas:
    - Define variables de color específicas para esta sección.
    - Incluye estilos para títulos, tarjetas, cajas interactivas y enlaces.
    - Basado en recursos de Uiverse.io (autor: Cornerstone-04).
    - Contiene ajustes responsivos para dispositivos medianos y pequeños.
============================================ */

/* =========================
  1. VARIABLES DE COLOR
========================= */
:root {
  --color-negro: black;
  --color-blanco: white;
  --color-verde: #398738;
}

/* =========================
  2. TÍTULOS Y SEPARADORES
========================= */

/* Estilo para el título principal */
.titulo-principal h1 {
  color: var(--color-verde);
  font-weight: bold;
}

/* Línea decorativa debajo del título */
.separador {
  border-color: var(--color-negro) !important;
}

/* Estilo para subtítulos principales */
.subtitulo-principal h2 {
  color: var(--color-negro);
  font-weight: bold;
}

/* =========================
  3. TARJETAS
========================= */

/* Sombra para tarjetas */
.card {
  box-shadow: 0 4px 6px var(--color-negro);
}

/* Título nivel 3 dentro del cuerpo de tarjeta */
.card-body h3 {
  color: var(--color-verde);
  font-weight: bold;
}

/* Título nivel 4 dentro del cuerpo de tarjeta */
.card-body h4 {
  color: var(--color-negro);
  font-weight: bold;
}

/* Texto en negrita dentro del cuerpo de tarjeta */
.card-body .card-text {
  font-weight: bold;
}

/* =========================
  4. CAJAS INTERACTIVAS (BOX)
  Basado en Uiverse.io por Cornerstone-04
========================= */

/* Estilo base para cajas */
.box {
  width: 100%;
  height: auto;
  float: left;
  transition: .5s linear;
  position: relative;
  display: block;
  overflow: hidden;
  padding: 15px;
  text-align: center;
  margin: 0 5px;
  background: transparent;
  font-weight: 900;
}

/* Líneas decorativas antes de la caja */
.box:before {
  position: absolute;
  content: '';
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  border-bottom: 4px solid transparent;
  border-left: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(100%);
}

/* Líneas decorativas después de la caja */
.box:after {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-top: 4px solid transparent;
  border-right: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(-100%);
}

/* Sombra y animación al pasar el cursor */
.box:hover {
  box-shadow: 0 5px 15px var(--color-negro);
}

/* Animación para línea inferior */
.box:hover:before {
  border-color: var(--color-negro);
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .3s;
}

/* Animación para línea superior */
.box:hover:after {
  border-color: var(--color-negro);
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .5s;
}

/* =========================
  5. ENLACES
========================= */

/* Estilo general para enlaces */
a {
  color: var(--color-negro);
  text-decoration: none;
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

/* =========================
  6. DISEÑO RESPONSIVO
  Ajustes para dispositivos medianos (md)
========================= */
@media screen and (max-width: 768px) {
  .titulo-principal h1 {
    font-size: 31px;
  }

  .subtitulo-principal h2 {
    font-size: 26px;
  }

  .card-body h3 {
    font-size: 23px;
  }

  .card-body h4 {
    font-size: 20px;
  }

  .card-body .card-text {
    font-size: 14px;
  }

  .box {
    font-size: 14px;
    padding: 13px;
  }
}

/* =========================
  7. DISEÑO RESPONSIVO
  Ajustes para dispositivos pequeños (sm)
========================= */
@media screen and (max-width: 576px) {
  .titulo-principal h1 {
    font-size: 29px;
  }

  .subtitulo-principal h2 {
    font-size: 24px;
  }

  .card-body h3 {
    font-size: 21px;
  }

  .card-body h4 {
    font-size: 18px;
  }

  .card-body .card-text {
    font-size: 12px;
  }

  .box {
    font-size: 12px;
    padding: 11px;
  }
}