/*
Theme Name: Tema UNU
Theme URI: https://biblioteca.unu.edu.pe
Author: Dannn
Description: Tema personalizado para la Biblioteca de la UNU. Desarrollado por Dannn para mostrar recursos, efemérides, servicios y más.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tema-unu
*/

/* Carrusel de imagenes */

/* ================= RESET Y BASE ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --header-height: 90px;
}

@media (max-width: 768px) {
  :root {
    --header-height: 110px;
  }
}

body {
  margin: 0;
  padding: 0;
  /* Removemos el padding del body */
  background-color: #f8f9fa;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* ================= ESTILOS NAVBAR DINÁMICO ================== */
.navbar {
  margin-bottom: 0 !important;
  height: var(--header-height);
  background: linear-gradient(135deg, #008000 0%, #006400 100%);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  border-bottom: 4px solid transparent;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Efecto cuando se hace scroll */
.navbar.scrolled {
  background: rgba(0, 128, 0, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  border-bottom-color: #ffffff;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Efecto de pulsación sutil */
.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      #ffffff 25%,
      #f0f0f0 50%,
      #ffffff 75%,
      transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-brand:hover {
  text-decoration: none;
  transform: scale(1.05);
}

/* Logo con efecto de rotación sutil al hover */
.navbar-brand img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
  transform: rotate(360deg) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* TEXTO DEL LOGO CON ANIMACIONES */
.navbar-brand .brand-text {
  color: white;
  font-size: 16px;
  line-height: 1.2;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.navbar-brand .brand-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  transition: left 0.6s ease;
}

.navbar-brand:hover .brand-text::after {
  left: 100%;
}

.navbar-brand .brand-text .main-title {
  font-size: 18px;
  display: block;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.navbar-brand .brand-text .sub-title {
  font-size: 14px;
  display: block;
  font-weight: 600;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MENÚ CON EFECTOS DINÁMICOS */
.navbar-nav .nav-link {
  color: white !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 16px !important;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Efecto de onda al hover */
.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.navbar-nav .nav-link:hover::before {
  width: 120%;
  height: 120%;
}

.navbar-nav .nav-link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* Efecto de subrayado animado */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
}

/* Iconos con animación */
.navbar-nav .nav-link i {
  transition: all 0.3s ease;
  display: inline-block;
}

.navbar-nav .nav-link:hover i {
  transform: scale(1.2) rotate(10deg);
  color: #ffffff;
}

/* BOTÓN HAMBURGUESA ANIMADO */
.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.navbar-toggler:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  transition: all 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-icon {
  transform: rotate(90deg);
}

/* EFECTOS DE CARGA INICIAL */
.navbar-nav .nav-item {
  margin: 0 4px;
  animation: slideInRight 0.6s ease-out both;
}

.navbar-nav .nav-item:nth-child(1) {
  animation-delay: 0.1s;
}

.navbar-nav .nav-item:nth-child(2) {
  animation-delay: 0.2s;
}

.navbar-nav .nav-item:nth-child(3) {
  animation-delay: 0.3s;
}

.navbar-nav .nav-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================= CONTENIDO PRINCIPAL ================== */
#content-area {
  padding: 20px;
  padding-top: 20px;
  /* Espacio para el header fijo */
  min-height: calc(100vh - 200px);
  animation: fadeInContent 0.8s ease-out 0.5s both;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-title {
  color: #008000;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #008000;
  position: relative;
}

.content-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: #ffffff;
  animation: expandLine 1s ease-out 0.5s both;
}

@keyframes expandLine {
  from {
    width: 0;
  }

  to {
    width: 50px;
  }
}

/* ================= ANIMACIONES GENERALES ================== */
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 128, 0, 0.2);
  border-top: 3px solid #008000;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= ALERTAS ANIMADAS ================== */
.alert {
  border-radius: 12px;
  margin: 20px 0;
  animation: slideInUp 0.5s ease-out;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f1c0c7);
  color: #721c24;
}

/* ================= RESPONSIVO ================== */
@media (max-width: 768px) {
  #content-area {
    padding-top: 85px;
    /* Menos espacio en móviles */
  }

  .navbar-brand .brand-text .main-title {
    font-size: 15px;
  }

  .navbar-brand .brand-text .sub-title {
    font-size: 12px;
  }

  .navbar-nav .nav-link {
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
  }

  .navbar-collapse {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
  }
}

@media (max-width: 480px) {
  #content-area {
    padding-top: 80px;
    /* Aún menos espacio en pantallas muy pequeñas */
  }

  .navbar-brand .brand-text .main-title {
    font-size: 14px;
  }

  .navbar-brand .brand-text .sub-title {
    font-size: 11px;
  }

  .navbar-brand img {
    height: 35px;
  }
}

/* ================= EFECTOS ADICIONALES ================== */
/* Partículas flotantes de fondo */
.navbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 80%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%),
    radial-gradient(circle at 40% 60%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 50%);
  pointer-events: none;
  animation: floatParticles 8s ease-in-out infinite;
}

@keyframes floatParticles {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.widget {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.widget::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 20%,
      rgba(76, 175, 80, 0.1) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 80%,
      rgba(76, 175, 80, 0.05) 0%,
      transparent 50%),
    radial-gradient(circle at 40% 60%,
      rgba(76, 175, 80, 0.08) 0%,
      transparent 50%);
  pointer-events: none;
  animation: floatParticlesWidget 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes floatParticlesWidget {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.widget-link {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.widget-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.widget-link:hover::before {
  left: 100%;
}

.widget-link:hover {
  color: #4caf50;
  text-shadow: 0 0 5px rgba(76, 175, 80, 0.4);
}

.widget {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 8px 20px rgba(0, 128, 0, 0.05);
}

.hero-slider {

  margin-top: var(--header-height) !important;
  position: relative;
  width: 100%;
  height: 500px;
  /* 👈 CLAVE */
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  overflow: hidden;
}

.slide.active {
  opacity: 1;
}


.slide.active {
  opacity: 1;
}

.slide-content {
  background: rgba(0, 0, 0, 0.4);
  padding: 30px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

/*fin de los slides*/
/* Horizontal Services Bar */
.services-bar {
  background: white;
  margin: 20px auto;
  max-width: 1200px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.services-list {
  display: flex;
  list-style: none;
}

.service-item {
  flex: 1;
  border-right: 1px solid #eee;
}

.service-item:last-child {
  border-right: none;
}

.service-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: #333;
  text-align: center;
  transition: all 0.3s ease;
}

.service-link:hover {
  background: #f8f9fa;
  color: #4caf50;
  transform: translateY(-2px);
}

.service-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

/* Main Content */
.main-container {
  max-width: 1200px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 30px;
  padding: 0 20px;
}

/* Sidebar */
.sidebar {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  height: fit-content;
}

.widget {
  margin-bottom: 30px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4caf50;
}

.widget-content {
  color: #666;
}

.widget-list {
  list-style: none;
}

.widget-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-link {
  text-decoration: none;
  color: #666;
  transition: color 0.3s ease;
}

.widget-link:hover {
  color: #4caf50;
}

/* Content Area */
.content-area {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  /* elimina el padding superior */
}

.content-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.news-item {
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.news-item:last-child {
  border-bottom: none;
}

.news-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.news-meta {
  color: #999;
  font-size: 14px;
  margin-bottom: 10px;
}

.news-excerpt {
  color: #666;
  line-height: 1.6;
}

/* Social Media */
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  background: white !important;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: white !important;
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: white;
  transform: translateY(-2px);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #45a049;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}


.hero-slider img,
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* evita “salidas” y quita el warning */
  overflow: clip;
  overflow-clip-margin: content-box;
}


/* Responsive Design */
@media (max-width: 768px) {
  .slide img {
    object-position: center top;
  }

  .hero-slider {
    height: 250px;
    margin: 0 !important;
    margin-top: var(--header-height) !important;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .welcome-section {
    text-align: center;
  }

  .university-name {
    font-size: 20px;
  }

  .library-title {
    font-size: 24px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(76, 175, 80, 0.95);
    padding: 20px;
    gap: 10px;
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }



  .services-list {
    flex-direction: column;
  }

  .service-item {
    border-right: none;
    border-bottom: 1px solid #eee;
  }

  .service-item:last-child {
    border-bottom: none;
  }

  .main-container {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 10px auto;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 50px;
    height: 50px;
    font-size: 12px;
  }

  .university-name {
    font-size: 18px;
  }

  .library-title {
    font-size: 20px;
  }


  .slide {
    font-size: 18px;
  }

  .service-link {
    padding: 15px;
  }

  .sidebar,
  .content-area {
    padding: 0 30px 30px 30px;
    /* elimina el padding superior */
  }
}

@media screen and (max-width: 600px) {
  footer div {
    text-align: center !important;
  }

  footer img {
    margin: 0 auto 8px;
  }
}






.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* Modern Arrow Styles */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-arrow--prev {
  left: 30px;
}

.slider-arrow--next {
  right: 30px;
}

/* Arrow Icons */
.arrow-icon {
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.3s ease;
}

.arrow-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: #2c2c2c;
  transform: translate(-50%, -50%);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.arrow-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #2c2c2c;
  border-right: 2px solid #2c2c2c;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.arrow-icon--left::before {
  transform: translate(-30%, -50%);
}

.arrow-icon--left::after {
  transform: translate(-70%, -50%) rotate(-135deg);
}

.arrow-icon--right::before {
  transform: translate(-70%, -50%);
}

.arrow-icon--right::after {
  transform: translate(-30%, -50%) rotate(45deg);
}

.slider-arrow:hover .arrow-icon {
  transform: scale(1.1);
}

.slider-arrow:hover .arrow-icon::before,
.slider-arrow:hover .arrow-icon::after {
  background: #000;
  border-color: #000;
}

/* Dots Navigation */
.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .slider-arrow {
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  }

  .slider-arrow--prev {
    left: 20px;
  }

  .slider-arrow--next {
    right: 20px;
  }

  .arrow-icon {
    width: 20px;
    height: 20px;
  }

  .arrow-icon::before {
    width: 10px;
    height: 1.5px;
  }

  .arrow-icon::after {
    width: 6px;
    height: 6px;
    border-width: 1.5px;
  }
}

@media (max-width: 480px) {
  .slider-arrow {
    width: 45px;
    height: 45px;
  }

  .slider-arrow--prev {
    left: 15px;
  }

  .slider-arrow--next {
    right: 15px;
  }

  .arrow-icon {
    width: 18px;
    height: 18px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .slider-nav {
    bottom: 15px;
    gap: 8px;
  }
}

/* Dark mode variant for serious/corporate sites */
@media (prefers-color-scheme: dark) {
  .slider-arrow {
    background: rgba(0, 0, 0, 0.8);
  }

  .slider-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
  }

  .arrow-icon::before,
  .arrow-icon::after {
    background: #fff;
    border-color: #fff;
  }

  .slider-arrow:hover .arrow-icon::before,
  .slider-arrow:hover .arrow-icon::after {
    background: #fff;
    border-color: #fff;
  }
}

/* ================= RESET Y BASE ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}





/* Efecto cuando se hace scroll */
.navbar.scrolled {
  background: rgba(0, 128, 0, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  border-bottom-color: #ffffff;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Efecto de pulsación sutil */
.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      #ffffff 25%,
      #f0f0f0 50%,
      #ffffff 75%,
      transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-brand:hover {
  text-decoration: none;
  transform: scale(1.05);
}

/* Logo con efecto de rotación sutil al hover */
.navbar-brand img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover img {
  transform: rotate(360deg) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* TEXTO DEL LOGO CON ANIMACIONES */
.navbar-brand .brand-text {
  color: white;
  font-size: 16px;
  line-height: 1.2;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.navbar-brand .brand-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  transition: left 0.6s ease;
}

.navbar-brand:hover .brand-text::after {
  left: 100%;
}

.navbar-brand .brand-text .main-title {
  font-size: 18px;
  display: block;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.navbar-brand .brand-text .sub-title {
  font-size: 14px;
  display: block;
  font-weight: 600;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MENÚ CON EFECTOS DINÁMICOS */
.navbar-nav .nav-link {
  color: white !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 16px !important;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

/* Efecto de onda al hover */
.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.navbar-nav .nav-link:hover::before {
  width: 120%;
  height: 120%;
}

.navbar-nav .nav-link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* Efecto de subrayado animado */
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
}

/* Iconos con animación */
.navbar-nav .nav-link i {
  transition: all 0.3s ease;
  display: inline-block;
}

.navbar-nav .nav-link:hover i {
  transform: scale(1.2) rotate(10deg);
  color: #ffffff;
}

/* BOTÓN HAMBURGUESA ANIMADO */
.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.navbar-toggler:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  transition: all 0.3s ease;
}

.navbar-toggler:hover .navbar-toggler-icon {
  transform: rotate(90deg);
}

/* EFECTOS DE CARGA INICIAL */
.navbar-nav .nav-item {
  margin: 0 4px;
  animation: slideInRight 0.6s ease-out both;
}

.navbar-nav .nav-item:nth-child(1) {
  animation-delay: 0.1s;
}

.navbar-nav .nav-item:nth-child(2) {
  animation-delay: 0.2s;
}

.navbar-nav .nav-item:nth-child(3) {
  animation-delay: 0.3s;
}

.navbar-nav .nav-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================= CONTENIDO PRINCIPAL ================== */
#content-area {
  padding: 20px;
  padding-top: 20px;
  /* Espacio para el header fijo */
  min-height: calc(100vh - 200px);
  animation: fadeInContent 0.8s ease-out 0.5s both;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-title {
  color: #008000;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #008000;
  position: relative;
}

.content-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: #ffffff;
  animation: expandLine 1s ease-out 0.5s both;
}

@keyframes expandLine {
  from {
    width: 0;
  }

  to {
    width: 50px;
  }
}

/* ================= ANIMACIONES GENERALES ================== */
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 128, 0, 0.2);
  border-top: 3px solid #008000;
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= ALERTAS ANIMADAS ================== */
.alert {
  border-radius: 12px;
  margin: 20px 0;
  animation: slideInUp 0.5s ease-out;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f1c0c7);
  color: #721c24;
}

/* ================= RESPONSIVO ================== */
@media (max-width: 768px) {
  .hero-slider {
    margin: 0 !important;
    margin-top: var(--header-height) !important;
    height: 250px;
  }

  #content-area {
    padding-top: 85px;
    /* Menos espacio en móviles */
  }

  .navbar-brand .brand-text .main-title {
    font-size: 15px;
  }

  .navbar-brand .brand-text .sub-title {
    font-size: 12px;
  }

  .navbar-nav .nav-link {
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
  }

  .navbar-collapse {
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
  }
}

@media (max-width: 480px) {
  #content-area {
    padding-top: 80px;
    /* Aún menos espacio en pantallas muy pequeñas */
  }

  .navbar-brand .brand-text .main-title {
    font-size: 14px;
  }

  .navbar-brand .brand-text .sub-title {
    font-size: 11px;
  }

  .navbar-brand img {
    height: 35px;
  }
}

/* ================= EFECTOS ADICIONALES ================== */
/* Partículas flotantes de fondo */
.navbar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
  animation: floatParticles 8s ease-in-out infinite;
}

@keyframes floatParticles {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.slider-arrow:hover {
  color: #ffffff;
  /* o el color que prefieras al pasar el mouse */
  transform: translateY(-50%) scale(1.2);
}

.slider-arrow.prev {
  left: 15px;
}

.slider-arrow.next {
  right: 15px;
}


@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.nav-link.active::after {
  width: 80% !important;
}

/* ===============================
   ENLACES DE INTERÉS (carrusel)
================================ */

.enlaces-scope {
  --ei-green: #008000;
  --ei-border: #e5e7eb;
  --ei-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  --ei-radius: 16px;
}

.enlaces-interes {
  background: #fff;
  border-top: 1px solid var(--ei-border);
  border-bottom: 14px solid var(--ei-green);
}

.enlaces-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px 18px;
}

.enlaces-title {
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #111827;
  font-size: 18px;
}

.enlaces-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enlaces-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ei-border);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  user-select: none;
}

.enlaces-btn:focus {
  outline: 3px solid rgba(11, 107, 47, .25);
  outline-offset: 2px;
}

.enlaces-viewport {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge viejo */
  padding: 6px 2px;
  border-radius: var(--ei-radius);
}

.enlaces-viewport::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.enlaces-track {
  display: flex;
  gap: 16px;
  align-items: center;
  scroll-snap-type: x mandatory;
}

.enlace-card {
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  min-width: 170px;
  height: 74px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--ei-border);
  border-radius: 14px;
  box-shadow: var(--ei-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none;
}

.enlace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
}

.enlace-card img {
  display: block;
  width: auto !important;
  height: auto !important;

  max-width: 100% !important;
  /* que nunca pase el ancho del card */
  max-height: 44px !important;
  /* controla el alto */
  object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
  .enlaces-btn {
    display: none;
  }

  /* en móvil se desliza con dedo */
  .enlace-card {
    min-width: 150px;
    overflow: hidden;
  }
}

@media (max-width: 991.98px) {

  /* el menú se despliega full ancho, pegado al header */
  #navbarContent.navbar-collapse {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-height);
    margin: 0;
    padding: 14px 16px;

    background: linear-gradient(135deg, #008000 0%, #006400 100%);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
    z-index: 2000;
  }

  #navbarContent .nav-link {
    padding: 12px 14px !important;
    border-radius: 10px;
  }

  #navbarContent .nav-link:hover {
    background: rgba(255, 255, 255, .10);
  }
}

/* Quitar subrayado y color de enlace en todo el card */
a.servicio-card,
a.servicio-card:hover,
a.servicio-card:focus,
a.servicio-card:active {
  text-decoration: none !important;
  color: inherit !important;
}

/* Por si algún hijo hereda subrayado */
a.servicio-card * {
  text-decoration: none !important;
  color: inherit !important;
}

.page-content {
  background: transparent;
  padding: 0;
}

.actividad {
  background: #f9f9f9;
  padding: 15px 20px;
  border-left: 4px solid #007c3d;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* ==========================
   ULTIMAS ADQUISICIONES
   ========================== */
.ultimas-adquisiciones details {
  margin-bottom: 10px;
  padding: 10px;
  background-color: #f4f4f4;
  border-left: 5px solid green;
  border-radius: 5px;
}

.ultimas-adquisiciones summary {
  cursor: pointer;
  font-size: 18px;
}

.ultimas-adquisiciones ul {
  list-style: none;
  padding-left: 20px;
}

.ultimas-adquisiciones a {
  text-decoration: none;
  color: #007b5e;
  font-weight: 500;
}

.ultimas-adquisiciones a:hover {
  text-decoration: underline;
}

/* Logos dentro de tablas (ajusta el número a gusto) */
.wp-block-table img{
  width: 280px !important;
  height: auto !important;
}
