:root {
  --color-primary: #0099bb;
  --color-secondary: #00284F;
  --color-accent: #e2401f;
  --color-light: #FFFFFF;
  --color-dark: #000000;
  --color-gray: #555555;
  --transition-base: all 0.3s ease;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--color-gray);
  padding-top: 120px;
  background-color: var(--color-light);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-secondary);
  position: relative;
  font-weight: 300;
  margin-bottom: 1rem;
}

h2 {
  font-size: calc(1.5rem + 1em) !important;
}
.single h2 {
    font-size: 2rem !important;
}
h2::after, .section-title h1::after{
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--color-primary);
  margin: 15px 0 20px;
}
p {
  font-size:1.2em;
  font-weight: 300;
}
.single h2::after {
  content: unset;
}
.single h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--color-primary);
    margin: 10px auto;
}

.breadcrumb li a {
    color: var(--color-gray);
    text-decoration: none;
}

.text-light h1,
.text-light h2,
.text-light h3,
.text-light h4,
.text-light h5,
.text-light h6 {
  color: var(--color-light) !important;
}

.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6 {
  color: var(--color-light) !important;
}
.bg-primary {
    background-color: var(--color-primary) !important;
}
.lead {
  color: var(--color-gray);
  font-weight: 300;
}
.bg-dark .lead, .bg-dark p {
  color: var(--color-light);
}
.ratio-i {
    width: 100%;
    background-color: transparent;
    background-position: center;
    background-size: cover;
    display: inline-block;
}
.i-16_9 {
    padding-bottom: 56.25%;
}
.i-16_5 {
    padding-bottom: 32%;
}
.i-4_3 {
    padding-bottom: 75%;
}
.i-1_1 {
    padding-bottom: 100%;
}
.i-9_16 {
    padding-bottom: 177.77%;
}
.i-3_4 {
    padding-bottom: 144%;
}
.i-20 {
    padding-bottom: 20%;
}
.btn-outline-primary {
--bs-btn-color: var(--color-primary);
--bs-btn-border-color: var(--color-primary);
--bs-btn-hover-bg: var(--color-primary);
--bs-btn-hover-border-color: var(--color-primary);
--bs-btn-active-bg: var(--color-primary);
--bs-btn-active-border-color: var(--color-primary);
--bs-btn-disabled-color: var(--color-primary);
--bs-btn-disabled-border-color: var(--color-primary);
}
.active>.page-link, .page-link.active {
    z-index: 3;
    color: var(--bs-pagination-active-color);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.parallax-section {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-light);
  z-index: 1040;
  transition: var(--transition-base);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.topbar a.nav-link {
    --bs-nav-link-padding-y: 0rem;
    font-weight: 300;
    font-size: small;
}
.topbar .cta a {
    background: var(--color-primary);
}
/* Barra de navegación principal */
.menu-ppal {
  position: fixed;
  width: 100%;
  top: 35px;
  background: var(--color-primary);
  color: var(--color-light);
  z-index: 1030;
  transition: var(--transition-base);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Enlaces del menú */
.menu-ppal a {
    color: var(--color-light);
    text-decoration: none;
    font-weight: 400;
    padding: 0rem 1rem;
    transition: var(--transition-base);
    line-height: 4em;
}

.menu-ppal a:hover {
  color: var(--color-accent);
}

/* Logo */
.navbar-brand img {
  transition: var(--transition-base);
  max-width: 180px;
}

.navbar-brand:hover img {
  opacity: 0.8;
}

/* MegaMenu base */
.MegaMenu {
  display: none;
  position: absolute;
  top: 85%;
  left: 0;
  right: 0;
  background: var(--color-light);
  color: var(--color-dark);
  z-index: 1029;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}


/* Mostrar MegaMenu al hacer hover en su <li> padre */
.navbar-nav > .nav-item {
  position: static;
}

.navbar-nav > .nav-item:hover .MegaMenu {
  display: block;
}
.MegaMenu .row li a {
    color: var(--color-primary);
    line-height: 2em;
    border-bottom: 1px solid;
    width: 100%;
    display: block;
}
/* Responsive: ocultar MegaMenu en dispositivos móviles */
@media (max-width: 991.98px) {
  .MegaMenu {
    display: none !important;
  }
}
/* Mobile sidebar menu */
#SidemainMenu {
  position: fixed;
  right: 0;
  top: 0;
  max-width: 80%;
  width: 100%;
  height: 100%;
  background: var(--color-dark);
  z-index: 9999;
  overflow-y: auto;
  padding: 5rem 1.5rem 2rem;
}

/* Oculto por defecto en mobile hasta que se active */
#SidemainMenu.d-none {
  display: none !important;
}
#SidemainMenu li a {
    color: var(--color-light);
    display: block;
    text-decoration: none;
    width: 100%;
    border-bottom: 1px solid;
    margin-bottom: 1em;
}
button.btn.btn-sm.text-light.toggle-accordionSM {
    font-size: 1.5em;
    background: var(--color-accent);
    line-height: 1em;
    margin: -10px 0px 0px 0px;
}
/* ============ HERO SECTION ============ */
#hero {
    position: relative;
    overflow: hidden;
 
}
#hero a {
    text-decoration: none;
}
.hero-slide {
  height: 80vh;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.carousel-item {
  transition: transform 0.6s ease-in-out;
}

/* ============ NOTICIAS SECTION ============ */
#noticias {
  padding: 5rem 0;
  background-color: var(--color-light);
}

#noticias .section-title {
  margin-bottom: 3rem;
}

#noticias .card {
  transition: var(--transition-base);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: none;
  border-radius: 0;
  height: 100%;
  overflow: hidden;
}

#noticias .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

#noticias .img-hover-zoom {
  overflow: hidden;
  display: block;
}

#noticias .img-hover-zoom img {
  transition: transform 0.5s ease;
  width: 100%;
  height: auto;
}

#noticias .card:hover .img-hover-zoom img {
  transform: scale(1.05);
}

#noticias .hover-title {
  transition: color 0.3s ease;
}

#noticias .hover-title:hover {
  color: var(--color-primary) !important;
}

#noticias .hover-badge {
  transition: all 0.3s ease;
}

#noticias .hover-badge:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

#noticias .hover-btn {
  transition: all 0.3s ease;
}

#noticias .hover-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#noticias .card-body {
    padding: 1.5rem;
    padding-bottom: 0em;
}

#noticias .card-title {
  font-weight: 400;
  margin-bottom: 1rem;
}

#noticias .card-text {
  color: var(--color-gray);
  margin-bottom: 1.5rem;
}

#noticias .badge {
  font-weight: 400;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
}
a.badge.hover-badge {
    display: inline;
    z-index: 2;
    position: relative;
}
.share-redes {
    display: block;
    margin: auto;
    text-align: center;
}
.share-redes li {
    list-style: none;
    display: contents;

}
ul.share-redes a {
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.3em;
}
.share-redes img {
    height: 20px;
}
.stretched-link::after {
    position: unset;
}
#rrss .card-rrss a:nth-child(2) {
    color: var(--color-primary);
}
#rrss .card-rrss  p {
    color: var(--color-light) !important;
}
/* ============ AGENDA SECTION ============ */
#agenda-finis {
  background-image: url('https://noticias.uft.cl/wp-content/uploads/2024/08/WhatsApp-Image-2024-08-14-at-4.35.43-PM.jpeg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 5rem 0;
  color: var(--color-light);
  position: relative;
}

#agenda-finis::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 0;
}

#agenda-finis > .container {
  position: relative;
  z-index: 1;
}

#agenda-finis .agenda-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  position: relative;
}

#agenda-finis .agenda-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--color-accent);
  margin-top: 15px;
}

#agenda-finis .agenda-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 2rem;
}

#agenda-finis .card {
  transition: var(--transition-base);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  overflow: hidden;
  height: 100%;
}

#agenda-finis .card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

#agenda-finis .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: var(--transition-base);
}

#agenda-finis .card:hover .card-img-top {
  opacity: 0.8;
}

#agenda-finis .card-body {
  padding: 1.5rem;
}

#agenda-finis .card-title {
  font-weight: 400;
  margin: 0.5rem 0 1rem;
}

#agenda-finis .card-title a {
  color: var(--color-light) !important;
  text-decoration: none !important;
}
#agenda-finis p.small.text-muted.mb-2 {
    color: var(--color-light) !important;
}
#agenda-finis .card-text {
  opacity: 0.8;
  font-size: 0.9rem;
  margin-bottom: 0;
}

#agenda-finis .badge {
  font-weight: 400;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  background-color: var(--color-light) !important;
}

#agenda-finis .card-body > p:first-child {
  font-size: 0.9rem;
  color: #ffd700;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
#agenda-finis article h3 a {
    color: var(--color-light) !important;
}
/* ============ RRSS SECTION ============ */
#rrss {
  background-color: var(--color-dark);
  padding: 5rem 0;
}

#rrss .img-fluid {
  transition: var(--transition-base);
  border: 2px solid transparent;
}

#rrss a:hover .img-fluid {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#rrss .fa-instagram { color: #E1306C; }
#rrss .fa-facebook { color: #3B5998; }
#rrss .fa-linkedin { color: #0077B5; }
#rrss .fa-twitter { color: #1DA1F2; }

/* ============ BUTTONS ============ */
.btn {
  transition: var(--transition-base);
  font-weight: 400;
  letter-spacing: 0.5px;
  border-radius: 0;
}

.btn-outline-light:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-dark {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-dark:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ============ FOOTER ============ */
.footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-col {
  margin-bottom: 1.5rem;
}

.footer-title {
    font-size: large;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--color-light);
}

.footer-menu,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li,
.footer-contact li {
  margin-bottom: 0.75rem;
}

.footer a {
  color: var(--color-light);
  text-decoration: none;
  transition: var(--transition-base);
}

.footer a:hover {
  opacity: 0.8;
}

.footer-social {
  margin-top: 1.5rem;
}

.footer-social a {
    display: inline-block;
    margin: 2px;
}

.footer-social svg {
  fill: var(--color-light);
  width: 24px;
  height: 24px;
}

.footer-logo-col {
  text-align: center;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1rem;
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}
.footer-social li {
    list-style: none;
    display: inline;
}
img.redsocial {
    height: 20px;
}
/* ============ RESPONSIVE ADJUSTMENTS ============ */
@media (max-width: 992px) {
  .hero-slide {
    height: 40vh;
    min-height: unset;
    background-position: center center;
}
  nav#main-navbar {
    top: 0 !important;
  }
  
  #agenda-finis .masonry-row {
    column-count: 2;
  }
  
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 110px;
  }
  
  .menu-ppal {
    top: 50px;
  }
  
  #hero .carousel-item {
    min-height: 350px;
  }
  
  #agenda-finis .masonry-row {
    column-count: 1;
  }
  
  #agenda-finis {
    padding: 60px 0;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-logo-col {
    grid-column: span 2;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 100px;
  }
  
  .topbar {
    height: 50px;
  }
  
#hero p.text-light.mb-4 {
    display: none;
}
  h2::after {
    margin: 10px auto;
  }
  
  #noticias .card {
    margin-bottom: 1.5rem;
  }
  #noticias .col-sm-6.col-lg-4.col-xl-3 {
    position: unset !important;
    left: unset !important;
    top: unset !important;
}
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-logo-col {
    grid-column: span 1;
  }
}
/* Galería */
/* Galería */


.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Modal Gallery */
#galleryModal .modal-content {
  background-color: rgba(0,0,0,0.85);
}

#galleryModal .modal-body {
  padding: 0;
}

#galleryModal .carousel-inner {
  border-radius: 4px;
  overflow: hidden;
}

#galleryModal .carousel-item img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

#galleryModal .carousel-caption {
  background: rgba(0,0,0,0.7);
  padding: 1rem;
  left: 0;
  right: 0;
  bottom: 0;
}

#galleryModal .carousel-caption h5 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

#galleryModal .carousel-control-prev,
#galleryModal .carousel-control-next {
  width: 8%;
  opacity: 0.9;
}

#galleryModal .btn-close {
  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 10;
  filter: brightness(0) invert(1);
}
/* Asegurar que los controles sean visibles solo cuando sea necesario */
#galleryModal .carousel-control-prev,
#galleryModal .carousel-control-next {
  transition: opacity 0.3s ease;
}

#galleryModal .carousel-control-prev.hidden,
#galleryModal .carousel-control-next.hidden {
  opacity: 0;
  pointer-events: none;
}
/* Responsive */
@media (max-width: 992px) {
  #gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  #galleryModal .carousel-item img {
    max-height: 60vh;
  }
  
  #galleryModal .carousel-caption {
    padding: 0.5rem;
  }
  
  #galleryModal .carousel-caption h5 {
    font-size: 1rem;
  }
}
.vamos-arriba {
    display: none; /* Cambiado de block a none, se mostrará con JS */
    width: 40px; /* Un poco más grande para mejor usabilidad */
    height: 40px;
    background-color: var(--color-primary);
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 50%; /* Círculo perfecto */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="white" d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 999;
}

.vamos-arriba:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/*Card Agenda*/
section#agenda-finis .card-body, section#agenda-finis .card-body h4 a {
    color: var(--color-light) !important;
}
.card.tribe_events a.ratio-i {
    text-decoration: none;
}
.card.tribe_events .dia-semana {
    padding: 1em;
    text-align: center;
    display: flex;
}
.card.tribe_events .dia-semana time {
    background: var(--color-dark);
    padding: 1em;
    color: var(--color-light);
    text-decoration: none;
    line-height: 1.3em;
}
.card.tribe_events .dia-semana time span {
    font-size: 2em;
    font-weight: 300;
}


/*deshace vistas globales default de tribe events*/
.tribe-events-single-section-title {
    text-transform: unset !important;
    font-size: unset !important;
    font-weight: unset !important;
}
#tribe-events-pg-template {
    max-width: unset;
    padding: unset;
}
.tribe-events-event-meta:before, .tribe-events-event-meta~div:not(.tribe-events-event-meta):not(.event-tickets) {
    border-top: unset;
}

.tribe-common .tribe-common-c-btn-border, .tribe-common a.tribe-common-c-btn-border {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}
.single-tribe_events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button.tribe-events-c-subscribe-dropdown__button--active, .single-tribe_events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:focus, .single-tribe_events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:focus-within, .single-tribe_events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:hover, .tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button.tribe-events-c-subscribe-dropdown__button--active, .tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:focus, .tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:focus-within, .tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:hover {
    background-color: var(--color-dark);
    color: var(--color-light);
}
a.tribe-events-calendar-list__event-title-link.tribe-common-anchor-thin {
    font-weight: 300;
}

.tribe-common-g-row.tribe-events-calendar-list__event-row {
    border-bottom: 1px solid var(--color-gray);
}

ul.tribe-events-sub-nav {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

li.tribe-events-nav-previous,
li.tribe-events-nav-next {
    width: 50%;
}

li.tribe-events-nav-previous a {
    text-decoration: none;
    color: var(--color-gray);
    text-align: left;
    display: block;
}

li.tribe-events-nav-next a {
    text-decoration: none;
    color: var(--color-gray);
    text-align: right;
    display: block;
}



.slide-responsivo {
    padding: 56.25% 0 0 0;
    position: relative;
}
.slide-responsivo iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video responsivo clásico */
.video-responsivo, .wp-block-embed__wrapper {
    padding: 56.25% 0 0 0;
    position: relative;
}

.video-responsivo iframe, .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}