/* ===========================
   BLOQUE 1: Variables y base
   =========================== */

:root {
  --font-family-sans-serif: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --navbar-height: 80px;

  /* Variables de bloques (portada/tarjetas/textos/imágenes) */
  --color-primario: #0d6efd;
  --color-texto: #000000;
  --color-texto-titulo-tarjeta: var(--color-primario);
  --sombra-suave: 0 8px 20px rgba(0, 0, 0, .1);
}

html, body {
  font-family: var(--font-family-sans-serif);
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

main {
  margin-top: 0;
}

main > .container {
  margin-top: 0;
}

/* ===========================
   BLOQUE 2: Navbar público
   =========================== */

/* Navbar fijo arriba */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f1f1;
}

/* Título / marca del portal */
.brand-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;     /* puedes bajar a 1.0–1.1 si quieres más discreto */
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #0d6efd;         /* mismo azul de text-primary */
}

/* Links del navbar */
#navbarPublic .nav-link {
  position: relative;
  color: #495057;
  font-weight: 500;
  transition: color 0.25s ease;
}

/* Hover azul */
#navbarPublic .nav-link:hover,
#navbarPublic .nav-link:focus {
  color: #0d6efd; /* azul Bootstrap */
}

/* Línea animada debajo del link */
#navbarPublic .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #0d6efd;
  transition: width 0.25s ease;
}

#navbarPublic .nav-link:hover::after,
#navbarPublic .nav-link:focus::after {
  width: 100%;
}

/* Estado activo */
#navbarPublic .nav-link.active {
  color: #0d6efd;
  font-weight: 600;
}

#navbarPublic .nav-link.active::after {
  width: 100%;
}

/* Botón "Iniciar sesión" */
#navbarPublic .btn-outline-primary {
  transition: all 0.25s ease;
}

#navbarPublic .btn-outline-primary:hover {
  background-color: #0d6efd;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
  transform: translateY(-1px);
}

#navbarPublic .btn-outline-registro {
  background-color: #0d6efd;
  color: #fff;
  transition: all 0.25s ease;
}

#navbarPublic .btn-outline-registro:hover {
  background-color: #fff;
  color: #0d6efd;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
  transform: translateY(-1px);
}

/* ===========================
   BLOQUE 3: Hero (ahora ocupado por la portada dinámica)
   =========================== */

.hero {
  background: #ffffff;
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-img{
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px - 52px); /* 52px ≈ alto del marquee */
    object-fit: contain;
    object-position: center;
    padding: 2rem;
}

.hero-content{
    position: relative;
    z-index: 5;
    height: calc(100% - 80px - 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content .container {
  pointer-events: auto;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
  color: #fff;
}

/* Marquee: ya NO va dentro del hero, así que queda estático,
   como una franja normal justo debajo de la portada */
.hero-marquee{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #00a0df;
    padding: .75rem 0;
    z-index: 10;
    overflow: hidden;
}

/* Responsive del hero */
@media (max-width: 991px) {
  .hero {
    height: 420px;
    min-height: 420px;
  }

  .hero-img {
    height: calc(420px - 80px);
  }
}

@media (max-width: 575.98px) {
  .hero {
    height: 320px;
    min-height: 320px;
    padding-top: 70px;
  }

  .hero-img {
    top: 70px;
    height: calc(320px - 70px);
    padding: 1rem;
  }
}

/* ===========================
   BLOQUE 4: Marquee / cinta
   =========================== */

.marquee {
  display: flex;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.marquee__group {
  display: flex;
  white-space: nowrap;
}

/* Texto del marquee */
.marquee__group span {
  padding: 0 2rem;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Animación simple (si la reutilizas en iconos/flechas) */
.animate-bounce {
  animation: bounceVertical 3.5s ease-in-out infinite;
}

@keyframes bounceVertical {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* ===========================
   BLOQUE 5: Bloques dinámicos
   (tarjetas / textos / imágenes generados por renderizarBloquesPublico)
   =========================== */
.titulo-bloque{
    font-size: 2.9rem;
}
.bloque-header {
  position: relative;
  margin-bottom: 1.5rem;
}

.tarjeta-col {
  max-width: 340px;
}

.tarjeta-card {
  width: 100%;
  border-left: 8px solid var(--color-tarjeta, var(--color-primario));
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.tarjeta-imagen-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.tarjeta-imagen-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tarjeta-titulo {
  color: var(--color-texto-titulo-tarjeta);
  font-size: 1.5rem;      /* Tamaño */
  font-weight: 700;       /* Negrita */
}

.tarjeta-texto {
  font-size: 1.1rem;
  color: var(--color-texto);
}

.elemento-unico {
  width: 80%;
  max-width: 80%;
  flex: 0 0 80%;
  margin: 0 auto 1.5rem auto;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .elemento-unico {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
}

.texto-caja {
  width: 100%;
  max-width: 550px;
  padding: 25px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--sombra-suave);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.texto-caja:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.texto-titulo {
  color: var(--color-primario);
}

.texto-contenido {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-texto);
  text-align: center;
}

.imagen-caja {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--sombra-suave);
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.imagen-caja:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.imagen-caja img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.imagen-caja:hover img {
  transform: scale(1.06);
}

/* ===========================
   BLOQUE 6: Timeline / pasos
   =========================== */

.timeline-icon { 
  width:52px; 
  height:52px; 
  font-size:18px; 
}

.timeline-item { 
  transition: transform .25s ease; 
}

.timeline-item:hover { 
  transform: translateY(-4px);
}

/* ===========================
   BLOQUE 7: Tarjetas de contacto
   =========================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

.contact-card {
  border-radius: .6rem;
  padding: 1.75rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: visible;
  background: #fff;
  min-height: 170px;
  justify-content: flex-start;
}

.contact-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 14px 40px rgba(11,24,40,0.06); 
  transition: all .18s ease; 
}

/* icono encima de la tarjeta */
.contact-icon-top { 
  width: 100%; 
  display:flex; 
  justify-content:center; 
  margin-top: -38px; 
  margin-bottom: 6px; 
  z-index: 2; 
}

.contact-icon-top .icon-gradient {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 12px;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  color: white;
}

.contact-phone .icon-gradient { 
  background: linear-gradient(135deg,#00b0ff,#0066cc); 
}

.contact-whatsapp .icon-gradient { 
  background: linear-gradient(135deg,#00c853,#00bfa5); 
}

.contact-location .icon-gradient { 
  background: linear-gradient(135deg,#ff7043,#ff8a65); 
}

.contact-title { 
  font-size: 1rem; 
  margin-top: 6px; 
}

.contact-desc { 
  color: #6c757d; 
  margin-bottom: .6rem; 
  line-height: 1.3; 
}

.contact-card .actions { 
  margin-top: .35rem; 
  display:flex; 
  gap:.5rem; 
  flex-wrap:wrap; 
  justify-content:center; 
}

.contact-card .actions .btn { 
  height: 38px; 
  padding: .35rem .6rem; 
  font-size:.88rem; 
}

/* pequeña línea superior de acento */
.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 6px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  background: transparent;
  z-index: 0;
}

.contact-phone::before { 
  background: linear-gradient(90deg,#00b0ff,#0066cc); 
}

.contact-whatsapp::before { 
  background: linear-gradient(90deg,#00c853,#00bfa5); 
}

.contact-location::before { 
  background: linear-gradient(90deg,#ff7043,#ff8a65); 
}

/* asegurar que icono y contenido estén encima del acento */
.contact-card .icon-gradient,
.contact-card .contact-body { 
  position: relative; 
  z-index: 2; 
}


/* ===========================
   BLOQUE 9: Utilidades varias
   =========================== */

/* Secciones ancladas respetan la altura del navbar fijo */
section {
  scroll-margin-top: 90px; /* altura del navbar */
}

/* Títulos de sección */
.section-title {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #858796;
}

/* Scroll suave horizontal de actividades */
#activitiesScroll {
  overflow-x: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge viejo */
  padding-left: 12px;
  padding-right: 12px;
}

#activitiesScroll::-webkit-scrollbar {
  display: none;                /* Chrome / Safari */
}

/* ===========================
   BLOQUE 10: Ajustes responsivos
   =========================== */

/* <= 992px */
@media (max-width: 991px) {
  .activities-scroll { 
    padding-left: 0.75rem; 
    padding-right: 0.75rem; 
    gap: 1.5rem; 
    column-gap:1.5rem; 
  }

  .activity-card { 
    width: 340px; 
  }

  .activity-card > div:first-child { 
    height: 200px; 
  }

  .activity-card .card-body { 
    min-height: 280px; 
  }

  .hero { 
    min-height: 300px; 
  }
}

/* <= 576px (móvil) */
@media (max-width: 575.98px) {
  /* Header aún más minimalista: solo logo, sin texto */
  .navbar-brand img {
    height: 30px;
  }

  .brand-title {
    display: none;   /* oculta el texto largo del header en móvil */
  }

  #navbarPublic .nav-link {
    font-size: 0.95rem;
  }

  .activity-card {
    min-height: 440px;
  }

  .activity-card > div:first-child { 
    height: 180px; 
  }

  .activities-wrapper { 
    margin-left: 0; 
    margin-right: 0; 
    gap: 1rem; 
  }

  .activity-img {
    height: 180px;
  }

  .hero { 
    min-height: 260px; 
    padding-top: 2rem; 
    padding-bottom: 2rem; 
  }
}

/* <= 992px: grid de contacto más compacto */
@media (max-width: 992px) {
  .contact-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

/* <= 576px: grid de contacto en una sola columna */
@media (max-width: 576px) {
  .contact-grid { 
    grid-template-columns: 1fr; 
  }
}
/* ===========================
   BLOQUE 11: Carrusel de informcaion
   =========================== */

   /* CONTENEDOR GENERAL */
.informacion-carousel {
  position: relative;
}

.informacion-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.informacion-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

/* TRACK */
.informacion-scroll-track {
  display: flex;
  gap: 16px;
  padding: 10px;
  align-items: stretch; /* clave para igualar alturas */
  flex-wrap: wrap;
}

/* ITEM */
.informacion-item {
  flex:1 1 0;
  display: flex;
}

/* TARJETA */
.informacion-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 392px;
  border-radius: 15px;
  overflow: hidden;
}

/* IMAGEN */
.informacion-img {
  height: 150px;
}

.informacion-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CONTENIDO */
.informacion-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  text-align: center;
}

.informacion-body h5 {
  font-weight: bold;
}

.informacion-card:hover { 
  transform: translateY(-6px); 
  box-shadow: 0 25px 60px rgba(11, 24, 40, 0.25); 
  transition: all .18s ease; 
}

/* COLORES LATERALES */
.border-educativo {
  border-left: 8px solid #64B5F6;
}

.border-ciudadano {
  border-left: 8px solid #AB47BC;
}

.border-ambiente {
  border-left: 8px solid #4CAF50;
}

.border-animal {
  border-left: 8px solid #FFB74D;
}
/* TÍTULO */
.titulo-card {
  font-weight: 700;
  margin-bottom: 12px;
}

/* LISTA */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ITEM */
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.0rem;
  line-height: 1.4;
  transition: all .2s ease;
}

/* HOVER SUTIL */
.info-list li:hover {
  transform: translateX(5px);
}

/* ICONO CON FONDO */
.icon-box {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

/* TEXTO */
.info-list span {
  color: #444;
}


/* ===========================
   IMAGENES INFORMATIVAS INICIO
   =========================== */

.contenedor-info {
  display: flex;
  align-items: center;     
  justify-content: space-between;
  gap: 20px;      
}
.bloque-imagen :hover{
  transform: translateY(-6px); 
  box-shadow: 0 25px 60px rgba(11, 24, 40, 0.25); 
  transition: all .18s ease; 
}

/* TEXTO */

.bloque-texto {
  flex: 1; 
  padding: 15px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  display: inline-block;
  font-size: 1.5rem;
  text-align: justify;
  transition: transform 0.3s ease, box-shadow 0.3s ease;         
}


/* IMAGEN */
.bloque-imagen {
  flex: 1;
  text-align: center;
}

.bloque-imagen img {
  width: 950px;
  max-width: 100%;
  border-radius: 5%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;  
}

@media (max-width: 768px) {
  .contenedor-info {
    flex-direction: column;
    text-align: center;
  }
}

.fila-imagenes {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* permite que bajen en móvil */
}

.resultado img {
  width: 400px;
  max-width: 100%;
  border-radius: 5%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.resultado:hover {
  transform: translateY(-6px); 
  box-shadow: 0 25px 60px rgba(11, 24, 40, 0.25); 
  transition: all .18s ease; 
}

.alianzas-imagen img{
  width: 1300px;
  max-width: 100%;
  border-radius: 5%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.alianzas-imagen:hover {
  transform: translateY(-6px); 
  box-shadow: 0 25px 60px rgba(11, 24, 40, 0.25); 
  transition: all .18s ease; 
}

/* ===========================
   FORMULARIO DE CONTACTO PÚBLICO
   =========================== */

/* Contenedor exterior “shell” */
.contact-shell{
  border-radius: 22px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(21,77,196,.10), rgba(255,255,255,0));
  border: 1px solid rgba(21,77,196,.12);
  box-shadow: 0 18px 50px rgba(11,24,40,.06);
  margin-bottom: 2rem;
}

/* Card del form */
.contact-form-card{
  border-radius: 18px;
  background: #fff;
  overflow: hidden; /* recorta el header con bordes redondos */
  border: 1px solid rgba(16,24,40,.06);
  box-shadow: 0 8px 28px rgba(11,24,40,.08);
}

/* Header */
.contact-form-header{
  display:flex;
  gap: 12px;
  align-items:center;
  padding: 18px 18px;
  background:
    radial-gradient(1200px 280px at 0% 0%, rgba(13,110,253,.22), rgba(13,110,253,.06)),
    linear-gradient(135deg, rgba(21,77,196,.10), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(13,110,253,.12);
}

.contact-form-header__icon{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #154dc4);
  box-shadow: 0 10px 24px rgba(13,110,253,.25);
  flex: 0 0 auto;
}

.contact-form-header__title{
  font-weight: 800;
  color:#0b2f74;
  line-height: 1.1;
}

.contact-form-header__subtitle{
  font-size: .95rem;
  color:#4b5d7a;
}

/* Body (padding) */
.contact-form-body{
  padding: 18px;
}

/* Labels e inputs */
.contact-form-card .form-label{
  font-size: .95rem;
  color: #445773;
}

.contact-form-card .form-control{
  border-radius: 12px;
  font-size: 1.02rem;
  border: 1px solid rgba(16,24,40,.10);
  padding: .7rem .85rem;
  box-shadow: none;
}

.contact-form-card .form-control:focus{
  border-color: rgba(13,110,253,.45);
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.12);
}

/* Textarea */
.contact-form-card textarea{
  min-height: 120px;
  resize: vertical;
}

/* Botón */
#contactSubmitBtn{
  border-radius: 12px;
  padding: 0.72rem 1.2rem;
  font-size: 1.02rem;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(13,110,253,.18);
}

#contactSubmitBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(13,110,253,.22);
}

/* Responsive - móvil */
@media (max-width: 640px){
  .contact-shell{
    padding: 10px;
    border-radius: 18px;
  }

  .contact-form-header{
    padding: 14px 14px;
  }

  .contact-form-body{
    padding: 14px;
  }

  .contact-form-card .form-label{
    font-size: .95rem;
  }

  .contact-form-card .form-control{
    font-size: .98rem;
    padding: .62rem .75rem;
  }

  #contactSubmitBtn{
    width: 100%;
    font-size: 1rem;
    padding: 0.7rem;
  }

  .section-title{
    font-size: 1.28rem;
    margin-bottom: 1rem;
  }
}