/* ==============================
   VARIABLES BATEIL
============================== */
:root{
  --bateil-black:#111114;
  --bateil-dark:#1c1c22;
  --bateil-yellow:#FFC107;
  --bateil-gray:#f6f7fb;
}

/* ==============================
   BASE
============================== */
body{
  background: var(--bateil-gray);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.hero-space{
  padding: 2rem 0;
}

/* ==============================
   NAVBAR
============================== */
.navbar{
  background: var(--bateil-black) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.navbar-brand{
  letter-spacing: .5px;
}

.navbar-brand img{
  max-height: 42px;
}

/* Que el brand se vea más "institucional" */
.navbar-brand span{
  letter-spacing: .6px;
  text-shadow: 0 0 6px rgba(255,193,7,.35);
}

/* Links */
.navbar .nav-link{
  color: rgba(255,255,255,.85) !important;
  position: relative;
  padding: .65rem .9rem;
  transition: color .2s ease;
}

.navbar.navbar-dark .navbar-nav .nav-link{
  font-size: 1.15rem !important;
  font-weight: 700 !important;
}

/* Línea debajo (animada) */
.navbar .nav-link::after{
  content:"";
  position:absolute;
  left: .9rem;
  right: .9rem;
  bottom: .35rem;
  height: 2px;
  background: var(--bateil-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
  border-radius: 2px;
  opacity: .95;
}

/* Hover: texto blanco + línea amarilla */
.navbar .nav-link:hover{
  color:#fff !important;
  text-shadow:
    0 0 6px rgba(255,193,7,.45),
    0 0 12px rgba(255,193,7,.25);
}
.navbar .nav-link:hover::after{
  transform: scaleX(1);
}

/* Activo */
.navbar-dark .navbar-nav .nav-link.active{
  color:#fff !important;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(255,193,7,.35);
}
.navbar-dark .navbar-nav .nav-link.active::after{
  transform: scaleX(1);
  height: 3px;
}

/* ==============================
   CARRUSEL
============================== */
.carousel .carousel-item > div{
  border-bottom: 4px solid var(--bateil-yellow);
}

.bateil-carousel-caption{
  background: rgba(0,0,0,.45);
  border-radius: 12px;
  padding: 12px 16px;
}

/* ==============================
   CARRUSEL (IMAGEN COMPLETA)
============================== */
#bateilCarousel .carousel-item{
  height: 640px;
  background: #111;
  overflow: hidden;
}

#bateilCarousel .bateil-carousel-bg{
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.06);
  opacity: .82;
}

#bateilCarousel .bateil-carousel-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
}

#bateilCarousel .bateil-carousel-img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#bateilCarousel .carousel-caption,
#bateilCarousel .carousel-control-prev,
#bateilCarousel .carousel-control-next,
#bateilCarousel .carousel-indicators{
  z-index: 2;
}

/* Móvil */
@media (max-width: 768px){
  #bateilCarousel .carousel-item{
    height: 320px;
  }
}

/* ==============================
   BOTONES
============================== */
.btn-bateil{
  background: var(--bateil-yellow);
  border: 0;
  color: #111;
  font-weight: 700;
}

.btn-bateil:hover{
  filter: brightness(.95);
}

.btn-outline-bateil{
  border: 2px solid var(--bateil-yellow);
  color: #111;
  font-weight: 700;
  background: transparent;
}

.btn-outline-bateil:hover{
  background: var(--bateil-yellow);
  color: #111;
}

/* ==============================
   CARDS AMARILLAS
============================== */
.bateil-card{
  background: var(--bateil-yellow);
  color:#000;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .25s ease, box-shadow .25s ease;
}

.bateil-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.bateil-card-text{
  color:#111;
  opacity:.9;
}

.bateil-card-muted{
  color:#222;
  opacity:.75;
}

/* ==============================
   FOOTER BATEIL (LIMPIO + COMPACTO)
============================== */
.bateil-footer{
  background: var(--bateil-black);
  color: var(--bateil-yellow);
}

.bateil-footer a{
  color: rgba(255,193,7,.88);
  text-decoration: none;
}
.bateil-footer a:hover{
  color:#fff;
  text-decoration: underline;
}

.bateil-footer-title{
  color: var(--bateil-yellow);
  font-weight: 800;
  letter-spacing: .4px;
}

.bateil-footer-muted{
  color: rgba(255, 193, 7, .75);
}

.bateil-footer-divider{
  height: 1px;
  background: rgba(255, 193, 7, .18);
  border-radius: 99px;
}

/* Compacta el espacio entre columnas principales */
.bateil-footer .container > .row{
  --bs-gutter-x: .6rem;
  --bs-gutter-y: 1.1rem;
}

.bateil-footer-row{
  --bs-gutter-x: .6rem;
  --bs-gutter-y: 1.1rem;
}

/* Links */
.bateil-footer-links li{ margin-bottom: .55rem; }
.bateil-footer-links a{ padding-left: .15rem; }

/* Items contacto */
.bateil-footer-item{
  display:flex;
  align-items:flex-start;
  gap:.6rem;
  margin-bottom:.65rem;
  color: rgba(255,193,7,.88);
}
.bateil-footer-item i{
  margin-top:.15rem;
  color: var(--bateil-yellow);
}

/* Evita que el correo empuje layout */
.footer-break{
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Redes */
.bateil-social{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid rgba(255, 193, 7, .75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bateil-yellow);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.bateil-social:hover{
  background: var(--bateil-yellow);
  color:#000;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

/* Benito abajo del copyright */
.footer-benito-bottom{
  display:flex;
  justify-content:center;
  margin-top: 10px;
}
.footer-benito-bottom img{
  width: 160px;
  max-width: 90%;
  opacity: .95;
  transition: transform .3s ease;
}
.footer-benito-bottom img:hover{
  transform: translateY(-4px);
}

/* Mapa */
.bateil-map{
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
  background: #000;
}
.bateil-map iframe{
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
  box-shadow: none !important;
}

/* Barra inferior */
.bateil-footer-bottom{
  border-top: 1px solid rgba(255, 193, 7, .14);
  background: rgba(0,0,0,.08);
}

/* ==============================
   CALENDARIO BATEIL
============================== */
.cal-cell{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,193,7,.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cal-cell:hover{
  transform: translateY(-3px);
  border-color: rgba(255,193,7,.6);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.cal-day{
  color: #111;
}

.cal-pill{
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

.cal-empty{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.history-gallery-img{
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: transparent;
}

/* ==============================
   CARDS DE ACTIVIDADES
============================== */
.card-bateil{
  overflow: hidden;
}

.card-bateil-media,
.card-bateil-img,
.card-bateil-placeholder{
  width: 100%;
  height: 360px;
  display: block;
}

.card-bateil-media,
.card-bateil-img{
  object-fit: cover;
  object-position: center;
  background: #111;
}

video.card-bateil-media{
  background: #111;
}

@media (max-width: 768px){
  .card-bateil-media,
  .card-bateil-img,
  .card-bateil-placeholder{
    height: 280px;
  }
}

/* ==============================
   CHIPS FILTRO ACTIVIDADES - BATEIL
============================== */
.bateil-chip{
  background: #000;
  color: #f5c400;
  border: 1px solid #f5c400;
  font-weight: 600;
  transition: all 0.25s ease;
}

.bateil-chip:hover{
  background: #f5c400;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.bateil-chip.active{
  background: #f5c400;
  color: #000;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* ==============================
   MARCA DE AGUA (BATEIL)
============================== */
.bateil-watermark{
  position: relative;
  overflow: hidden;
}

.bateil-watermark::before{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("../img/fondo.png");
  background-repeat: repeat;
  background-size: 520px;
  background-position: center;
  opacity: 0.20;
  z-index: 0;
}

.bateil-watermark > *{
  position: relative;
  z-index: 1;
}

/* ==============================
   BENITO BOT
============================== */
#benito-btn{
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 140px;
  height: 140px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
}

#benito-btn img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .25s ease;
}

#benito-btn:hover img{
  transform: scale(1.06);
}

@keyframes benito-pop-in {
  0%{
    opacity: 0;
    transform: scale(.6) translateY(20px);
  }
  60%{
    opacity: 1;
    transform: scale(1.08) translateY(0);
  }
  100%{
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes benito-blink {
  0%, 100%{
    transform: scale(1);
  }
  50%{
    transform: scale(1.05);
  }
}

#benito-btn.benito-show{
  animation: benito-pop-in .6s ease-out;
}

#benito-btn.benito-blink img{
  animation: benito-blink .9s ease-in-out 2;
}

#benito-bubble{
  position: fixed;
  right: 125px;
  bottom: 95px;
  max-width: 220px;
  background: #ffffff;
  color: #111;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  z-index: 9998;
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .3s ease;
}

#benito-bubble.show{
  opacity: 1;
  transform: translateY(0);
}

#benito-bubble::after{
  content: "";
  position: absolute;
  right: -8px;
  bottom: 16px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
}

#benito-bubble strong{
  color: #111;
}

#benito-chat{
  position: fixed;
  bottom: 116px;
  right: 110px;
  width: 320px;
  min-height: 420px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px) translateY(10px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s ease;
}

#benito-chat.open{
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) translateY(0) scale(1);
}

.benito-header{
  background: #111;
  color: #F4C400;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
}

.benito-quick-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0 14px;
  background: #fff;
}

.benito-chip{
  border: 1px solid #F4C400;
  background: #fff8d6;
  color: #111;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.benito-chip:hover{
  background: #F4C400;
}

#benito-messages{
  height: 300px;
  overflow: auto;
  padding: 14px;
  background: #fff;
}

.msg{
  margin-bottom: 10px;
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.45;
  white-space: pre-wrap;

  opacity: 0;
  transform: translateY(10px) scale(.98);
  animation: benito-msg-in .28s ease forwards;
}

@keyframes benito-msg-in{
  from{
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.msg.user{
  margin-left: auto;
  background: #F4C400;
  color: #111;
  text-align: left;
}

.msg.bot{
  margin-right: auto;
  background: #f3f4f6;
  color: #111;
  text-align: left;
}

.msg.typing{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.typing-text{
  font-size: 13px;
  color: #555;
}

.typing-dots{
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  display: inline-block;
  animation: benito-typing 1s infinite ease-in-out;
}

.typing-dot:nth-child(2){
  animation-delay: .15s;
}

.typing-dot:nth-child(3){
  animation-delay: .3s;
}

@keyframes benito-typing{
  0%, 80%, 100%{
    opacity: .35;
    transform: translateY(0);
  }
  40%{
    opacity: 1;
    transform: translateY(-3px);
  }
}

.benito-input{
  display: flex;
  border-top: 1px solid #ddd;
  background: #fff;
}

.benito-input input{
  flex: 1;
  border: none;
  padding: 12px;
  outline: none;
  font-size: 14px;
  min-width: 0;
}

.benito-input button{
  background: #F4C400;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 600;
  transition: filter .2s ease;
  white-space: nowrap;
}

.benito-input button:hover{
  filter: brightness(.95);
}

/* ==============================
   BENITO BOT - MÓVIL
============================== */
@media (max-width: 768px){

  #benito-btn{
    width: 92px;
    height: 92px;
    right: 10px;
    bottom: 10px;
  }

  #benito-chat{
    left: 10px;
    right: 10px;
    bottom: 88px;
    width: auto;
    max-width: none;
    min-height: 0;
    height: 58vh;
    max-height: 500px;
    border-radius: 16px;
    transform-origin: bottom center;
  }

  #benito-bubble{
    display: none;
  }

  .benito-quick-actions{
    padding: 10px 10px 0 10px;
    gap: 6px;
  }

  .benito-chip{
    font-size: 12px;
    padding: 6px 10px;
  }

  #benito-messages{
    flex: 1;
    min-height: 0;
    height: auto;
    padding: 12px;
  }

  .benito-input{
    flex-shrink: 0;
  }

  .benito-input input{
    min-width: 0;
    font-size: 14px;
    padding: 10px;
  }

  .benito-input button{
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .msg{
    max-width: 92%;
    font-size: 14px;
  }
}
