* {
  font-family: "Montserrat", sans-serif;
}

:root {
  --primary-main: #424740;
  --primary-dark: #252f21;
  --primary-light: #5c6359;
  --primary-contrast: #d8e9d2;
  --background-default: #ffffff;
  --background-paper: #f8f9fa;
  --texto-default: #343a40;
  --background-card-img: #ffffff;

  --neon-primary-color: #ffffff;
  --neon-secondary-color: #ffffff;
  --neon-tertiary-color: #ffffff;

  --primary-navbg: #f0f1ee;
  --primary-navbghigh: #e2e5dc;

  --title-actv-color: #002d73;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --card-shadow-hover: rgba(0, 0, 0, 0.15);
  --menu-bg: #f0f1ee;
  --menu-bg-hover: #e2e5dc;

  --menu-bg-main: #e2e5dc;
  --menu-hover-text-main: #5c6359;
  --banner-gobbo: #dee2e6;
  --banner-icon: #343a40;

  --rotate-right: 0deg;
  --rotate-left: 0deg;
}

@media (min-width: 992px) {
  :root {
    /* (INI) Rotacion de icono en pantallas de mas de 992px */
    --rotate-right: 90deg;
    --rotate-left: -90deg;
    /* (FIN) Rotacion de icono en pantallas de mas de 992px */
  }
}

[data-theme="dark"] {
  --primary-main: #5c6359;
  --primary-dark: #313530;
  --primary-light: #889283;
  --primary-contrast: #1e201d;
  --background-default: #292a2d;
  --background-paper: #222124;
  --texto-default: #e9ecef;
  --background-card-img: #e9ecef;

  --neon-primary-color: #0047ab;
  --neon-secondary-color: #fbb611;
  --neon-tertiary-color: #ffffff;

  --title-actv-color: #ffffff;
  --card-bg: #222124;
  --card-shadow: rgba(255, 255, 255, 0.08);
  --card-shadow-hover: rgba(255, 255, 255, 0.15);
  --menu-bg: #222124;
  --menu-bg-hover: #3a3b3f;

  --menu-bg-main: #3a3b3f;
  --menu-hover-text-main: #889283;
  --banner-gobbo: #495057;
  --banner-icon: #dee2e6;
}

/* Personalización de la paginación usando las variables CSS */
.pagination {
  --bs-pagination-color: var(--texto-default);
  --bs-pagination-bg: var(--background-paper);
  --bs-pagination-border-color: var(--primary-light);
  --bs-pagination-focus-color: var(--primary-contrast);
  --bs-pagination-focus-bg: var(--primary-main);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(66, 71, 64, 0.25);
  --bs-pagination-hover-color: var(--primary-dark);
  --bs-pagination-hover-bg: var(--primary-navbg);
  --bs-pagination-hover-border-color: var(--primary-light);
  --bs-pagination-active-color: var(--primary-contrast);
  --bs-pagination-active-bg: var(--primary-main);
  --bs-pagination-active-border-color: var(--primary-main);
  --bs-pagination-disabled-color: var(--primary-light);
  --bs-pagination-disabled-bg: var(--background-paper);
  --bs-pagination-disabled-border-color: var(--primary-light);
}

/*
Animacion neon ENDE
*/
.neon-ende {
  text-shadow: 0 0 5px var(--neon-tertiary-color), 0 0 10px var(--neon-tertiary-color), 0 0 15px var(--neon-tertiary-color), 0 0 20px var(--neon-secondary-color), 0 0 35px var(--neon-secondary-color), 0 0 40px var(--neon-primary-color), 0 0 50px var(--neon-primary-color), 0 0 75px var(--neon-primary-color);
  animation: neon-dual-ende-animation 5s infinite alternate;
}

@keyframes neon-dual-ende-animation {
  0%,
  18%,
  22%,
  25%,
  53%,
  57%,
  100% {
    text-shadow: 0 0 5px var(--neon-tertiary-color), 0 0 10px var(--neon-tertiary-color), 0 0 15px var(--neon-tertiary-color), 0 0 20px var(--neon-secondary-color), 0 0 35px var(--neon-secondary-color), 0 0 40px var(--neon-primary-color), 0 0 50px var(--neon-primary-color), 0 0 75px var(--neon-primary-color);
  }
  20%,
  24%,
  55% {
    text-shadow: 0 0 2px var(--neon-tertiary-color), 0 0 5px var(--neon-tertiary-color), 0 0 10px var(--neon-secondary-color), 0 0 15px var(--neon-primary-color), 0 0 20px var(--neon-primary-color);
  }
}

/* Contenedor principal */
.header-logo-ende {
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

/* Logos con animación escalonada */
.header-logo-ende .col-3:nth-child(1) img {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 0.8s ease-out 0.8s forwards;
}

.header-logo-ende .col-3:nth-child(3) img {
  opacity: 0;
  transform: translateX(50px);
  animation: slideInRight 0.8s ease-out 0.8s forwards;
}

/* Keyframes */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.text-primary {
  color: rgba(var(--bs-primary-rgb), var(--bs-text-opacity)) !important;
}

/* Enlaces */
a {
  text-decoration: none;
  color: var(--texto-default);
}
#marca-gobbo {
  font-size: small;
  background-color: var(--banner-gobbo);
  border: 1px solid var(--banner-gobbo);
}
#marca-gobbo a {
  text-decoration: none;
  color: var(--banner-icon);
}

h2 {
  color: var(--texto-default);
  font-weight: 600;
  font-size: 40px;
  line-height: 56px;
}

.modal-content {
  background-color: var(--background-default);
}

/* Cards */
.card {
  background-color: var(--background-default);
  border: 1px solid var(--primary-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-body {
  color: var(--texto-default);
}

.card-footer {
  background-color: var(--background-default);
  border-top: 1px solid var(--texto-default);
}

#enlacesCarousel .card img {
  border-radius: 20px;
  background-color: var(--background-card-img);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  width: 100%;
  border-top-left-radius: 5px; /* solo bordes superiores */
  border-top-right-radius: 5px;
  border-bottom-left-radius: 0; /* bordes inferiores rectos */
  border-bottom-right-radius: 0;
}
/* Icon RRSS footer*/
.icon-rrss {
  font-size: xx-large;
}
/*divider*/
#divider hr,
.hr {
  border: none;
  border-top: 1px solid var(--primary-main);
  opacity: 1;
  margin-top: 16px;
}

/* Ini container */
.container {
  max-width: 1140px !important;
}

body {
  background-color: var(--background-default);
  color: var(--texto-default);
}

.fondo-default {
  background-color: var(--background-default);
}

.texto-default {
  color: var(--texto-default);
}
/* Fin container */
/* Ini Menu */
.dropdown-submenu {
  position: relative;
}

.fondo-nivel-0,
.dropdown-menu,
.dropdown-submenu > .dropdown-menu {
  background-color: var(--menu-bg);
  font-size: 0.9rem;
}

.texto-nivel-0,
.dropdown-item {
  color: var(--texto-default);
  border-bottom: 2px solid transparent;
}

#main-menu .texto-nivel-0 {
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
  z-index: 1;
}

#main-menu .texto-nivel-0::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--menu-bg-main);
  transition: left 0.4s ease;
  z-index: -1;
}

#main-menu .texto-nivel-0:focus::before,
#main-menu .texto-nivel-0.show::before,
#main-menu .texto-nivel-0:hover::before {
  left: 0;
}

#main-menu .texto-nivel-0:focus,
#main-menu .texto-nivel-0.show,
#main-menu .texto-nivel-0:hover {
  background-color: transparent;
  border-radius: 0;
  border-bottom-color: var(--menu-hover-text-main);
  color: var(--menu-hover-text-main) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--menu-bg-main);
  color: var(--menu-hover-text-main);
  border: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.icon-rotate {
  transition: transform 0.4s ease-in-out;
  display: inline-block;
}

.icon-rotate:hover .rotate-right,
.icon-rotate:focus .rotate-right {
  transform: rotate(var(--rotate-right));
  transition: transform 0.3s ease;
}

.icon-rotate:hover .rotate-left,
.icon-rotate:focus .rotate-left {
  transform: rotate(var(--rotate-left));
  transition: transform 0.3s ease;
}

.dropdown-submenu > .dropdown-menu {
  margin-left: 0.1rem;
  top: 0;
}

.dropdown-submenu > .dropdown-menu-left {
  left: 100%;
}

.dropdown-submenu > .dropdown-menu-right {
  right: 100%;
}

.navbar-nav {
  width: 100%;
}

#navbar-gob .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#navbar-gob .dropdown-submenu .dropdown-item .fas.fa-chevron-right {
  margin-left: auto;
  font-size: 0.8em;
  padding-left: 10px;
}

#navbar-gob .dropdown-submenu .dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

li[data-level="3"] {
  margin-left: 10px;
}

.dropdown-menu-left[data-bs-popper] {
  left: 0;
}

.dropdown-menu-right[data-bs-popper] {
  right: 0;
  left: unset;
}

/* Tamaño base (mobile first) */
.texto-nivel-0 {
  font-size: 0.75rem;
}

/* Small devices (≥576px) */
@media (min-width: 576px) {
  .texto-nivel-0 {
    font-size: 0.75rem;
  }
}

/* Medium devices (≥768px) */
@media (min-width: 768px) {
  .texto-nivel-0 {
    font-size: 0.75rem;
  }
}

/* Large devices (≥992px) */
@media (min-width: 992px) {
  .texto-nivel-0 {
    font-size: 0.75rem;
  }
}

/* X-Large devices (≥1200px) */
@media (min-width: 1200px) {
  .texto-nivel-0 {
    font-size: 0.9rem;
  }
}

/* XX-Large devices (≥1400px) */
@media (min-width: 1400px) {
  .texto-nivel-0 {
    font-size: 0.9rem;
  }
}
/* Fin Menu */

.linea-cabecera {
  height: 4px;
  background: #0047ab;
  background: linear-gradient(90deg, #0047ab 0%, #084aa6 75%, #fbb611 100%);
}

.icono-color {
  color: var(--banner-icon);
}

.mostrar-en-movil {
  display: none;
}

@media (max-width: 991px) {
  .ocultar-en-movil {
    display: none;
  }

  .mostrar-en-movil {
    display: block;
  }
}

/* Estilos para las cards de comunicados */
.card-comunicado {
  max-height: 134px;
  min-height: 134px;
  transition: all 0.3s ease;
}

.card-comunicado:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilos para el botón de cambio de tema */
#theme-switcher-button {
  border: none;
  background: transparent;
}

.btn-outline-primary {
  border: 1px solid var(--primary-light);
  color: var(--primary-light);
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--primary-main);
  color: var(--neon-tertiary-color);
  border-color: var(--background-default);
}

.btn-primary {
  background-color: var(--primary-main);
  color: var(--primary-navbg);
  border: 1px solid var(--primary-main);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--primary-navbg);
}

.btn-primary:focus,
.btn-primary:active {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.2);
}

#formularioContacto .row,
#trabaja-con-nosotros .row {
  margin-bottom: 15px;
}

.card-header,
.card-header .text-muted {
  color: var(--texto-default) !important;
}

/* FORMULARIO - DARK MODE */
[data-theme="dark"] .form-control {
  background-color: var(--background-default);
  color: var(--texto-default);
  border: 1px solid var(--primary-navbg);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-control::placeholder {
  color: var(--primary-light);
}

[data-theme="dark"] .g-recaptcha {
  filter: invert(1) hue-rotate(180deg);
}

ul.pagination {
  display: flex;
  justify-content: center;
}
ul.pagination li {
  display: contents !important;
}
ul.pagination li i {
  padding: 3px;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.date-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 60px;
}

.date-day {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  color: #2c3e50;
}
.date-month {
  font-size: 0.9rem;
  font-style: italic;
  color: #e74c3c;
  font-weight: 600;
}
.date-year {
  font-size: 0.75rem;
  color: #7f8c8d;
}

.card-title {
  min-height: 60px;
  color: var(--texto-default);
  font-weight: 600;
}
.card-text {
  color: var(--texto-default);
}

/* .news-container {
  min-height: 100vh;
} */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #7f8c8d;
}
.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: #bdc3c7;
}

/* =====================
   Tarjeta de noticias
   ===================== */
.news-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px var(--card-shadow);
  margin-bottom: 2.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px var(--card-shadow-hover);
}

.news-img {
  width: 100%;
  height: 400px; /* altura general */
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}

.news-card:hover .news-img {
  transform: scale(1.03);
}

.news-img-left {
  border-radius: 12px 0 0 12px;
}

.news-img-right {
  border-radius: 0 12px 12px 0;
}

@media (max-width: 992px) {
  .news-img-left,
  .news-img-right {
    border-radius: 12px 12px 0 0;
  }

  .news-img {
    height: 280px;
  }
}

.news-content {
  padding: 2rem;
}

.news-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--texto-default);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.news-title a {
  text-decoration: none;
  color: inherit;
}

.news-title a:hover {
  color: #3498db;
}

.news-date {
  color: #6c757d;
  font-style: italic;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Texto principal */
.news-text {
  text-align: justify;
  line-height: 1.7;
  color: #444;
}

.news-text p {
  color: var(--texto-default);
}

/* Fecha flotante */
.floating-date {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  z-index: 10;
}

.date-day {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
  color: #2c3e50;
  display: block;
}

.date-month {
  font-size: 1rem;
  color: #e74c3c;
  font-weight: 600;
  text-transform: uppercase;
}

.date-year {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: 3px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #2c3e50);
  border-radius: 2px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--texto-default);
  padding: 0 0.5rem;
}

/*MHCL 17/09/2025 BOTON DE DESPLAZAMIENTO HACIA ARRIBA RESPONSIVO*/
#btn-abajo-arriba {
  position: fixed;
  bottom: 5vh;
  right: 5vw;
  display: none;
  z-index: 999;
  border-radius: 50%;
  padding: 12px 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  #btn-abajo-arriba {
    bottom: 10vh;
    right: 5vw;
    padding: 10px 14px;
  }
}

#menu_adaptable {
  white-space: normal !important;
  word-wrap: break-word;
  max-width: 100%;
}

.badge.bg-primary {
  background-color: var(--primary-main) !important;
}

/* (INI) animacion y cambio de color del icono del carrusel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
  transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon {
  animation: bounceLeft 0.6s ease infinite alternate;
}

.carousel-control-next:hover .carousel-control-next-icon {
  animation: bounceRight 0.6s ease infinite alternate;
}

@keyframes bounceLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-5px);
  }
}

@keyframes bounceRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(5px);
  }
}
/* (FIN) animacion y cambio de color del icono del carrusel */
/* personal ejecutivo */
.card-img-top {
  height: 300px;
  object-fit: cover;
}
.card {
  transition: transform 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}