/*
Theme Name: COPLITELE-IA
Theme URI: https://github.com/albertorbital/Coplitele-IA_wordpress
Author: COPLITELE-IA Team
Description: Tema oficial WordPress para el proyecto COPLITELE-IA sobre codiseño, personalización y tecnología educativa con Inteligencia Artificial.
Version: 1.0.0
Text Domain: coplitele-ia
*/

/* COPLITELE-IA Custom Premium Stylesheet (High Fidelity) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables & Custom Properties */
:root {
  --color-blue: hsl(224, 98%, 56%);
  --color-teal: hsl(175, 65%, 65%);
  --color-green: hsl(155, 55%, 58%);
  --color-blue-rgb: 29, 91, 254;
  --color-teal-rgb: 124, 228, 224;
  --color-green-rgb: 90, 206, 139;
  
  --color-bg-light: hsl(210, 40%, 98%);
  --color-bg-dark: hsl(222, 24%, 8%);
  --color-bg-card-light: #ffffff;
  --color-bg-card-dark: rgba(15, 22, 40, 0.75);
  
  --color-border-light: rgba(0, 0, 0, 0.06);
  --color-border-dark: rgba(255, 255, 255, 0.07);
  
  --color-text-light: hsl(222, 30%, 12%);
  --color-text-dark: hsl(210, 20%, 95%);
  --color-text-muted-light: hsl(222, 10%, 45%);
  --color-text-muted-dark: hsl(210, 10%, 68%);
  
  --font-primary: 'Google Sans Flex', 'Outfit', 'Plus Jakarta Sans', 'Inter', sans-serif;
  
  --shadow-light: 0 4px 20px 0 rgba(31, 38, 135, 0.03);
  --shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --shadow-hover-light: 0 10px 30px 0 rgba(31, 38, 135, 0.06);
  --shadow-hover-dark: 0 12px 40px 0 rgba(0, 0, 0, 0.5);

  --gradient-brand: linear-gradient(135deg, var(--color-blue), var(--color-teal), var(--color-green));
  --badge-bg: #ffffff;
  --logo-gray-dots: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  --badge-bg: #0c111f;
  --logo-gray-dots: rgba(255, 255, 255, 0.12);
}

/* Base resetting & defaults */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-family: var(--font-primary);
  color: var(--color-text-light);
  background-color: var(--color-bg-light);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  overflow-x: hidden;
  line-height: 1.5;
}

body.dark-mode {
  color: var(--color-text-dark);
  background-color: var(--color-bg-dark);
}

/* Typography and Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(29, 91, 254, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 91, 254, 0.35);
}

/* Floating Ambient Glows */
.ambient-glow {
  position: fixed !important;
  width: min(450px, 85vw) !important;
  height: min(450px, 85vw) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(124, 228, 224, 0.07) 0%, rgba(29, 91, 254, 0.03) 50%, rgba(0, 0, 0, 0) 70%) !important;
  z-index: -2 !important;
  pointer-events: none !important;
  filter: blur(40px) !important;
  max-width: 100vw !important;
  contain: paint !important;
}
.glow-1 { top: 5% !important; left: 0% !important; }
.glow-2 { top: 45% !important; right: 0% !important; background: radial-gradient(circle, rgba(90, 206, 139, 0.06) 0%, rgba(124, 228, 224, 0.02) 50%, rgba(0, 0, 0, 0) 70%) !important; }
.glow-3 { bottom: 10% !important; left: 5% !important; }

/* Navigation & Floating Gray Header */
header {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  transform: none;
  width: 92%;
  max-width: 1400px;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 36px;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  backdrop-filter: none;
  border: 1px solid transparent;
  border-radius: 100px;
  box-shadow: none !important;
}

header.scrolled {
  height: 66px;
  top: 6px;
  background: hsla(220, 15%, 97%, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06) !important;
}
body.dark-mode header.scrolled {
  background: hsla(222, 24%, 8%, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(255, 255, 255, 0.05);
}

/* Imagotype layout - NO OVERLAP */
.imagotype-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--color-text-light);
  transition: color 0.3s ease;
}

body.dark-mode .brand-name {
  color: var(--color-text-dark);
}

.logo-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.4s ease;
  flex-shrink: 0;
}

.logo-wrapper svg {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.logo-wrapper:hover svg {
  transform: rotate(15deg);
}

/* Header logo container styling */
#header-logo-container {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transform-origin: center;
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  line-height: 1.1;
}

.brand-title .c, .brand-title .o, .brand-title .p, .brand-title .l, .brand-title .i { color: var(--color-text-light); }
.brand-title .t, .brand-title .e, .brand-title .l2, .brand-title .e2 { color: var(--color-blue); }
.brand-title .dash { color: rgba(0, 0, 0, 0.3); margin: 0 1px; }
.brand-title .ia { color: var(--color-green); }

.brand-tagline {
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted-light);
  font-weight: 700;
  margin-top: 1px;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-light);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-blue);
}

/* Header Controls & Search */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-input {
  font-family: var(--font-primary);
  font-size: 12.5px;
  width: 0px;
  opacity: 0;
  padding: 6px 0px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-light);
  outline: none;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search.active .header-search-input {
  width: 180px;
  opacity: 1;
  padding: 6px 12px 6px 34px;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
  pointer-events: auto;
}

.header-search-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--color-text-muted-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.header-search-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-blue);
}

.header-search.active .header-search-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent !important;
  color: var(--color-blue);
}

.header-search-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Language Selector Dropdown */
.lang-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-selector {
  font-family: var(--font-primary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 15px;
  border: 1px solid var(--color-border-light);
  background: transparent;
  cursor: pointer;
  outline: none;
  color: var(--color-text-light);
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
}

body.dark-mode .lang-selector {
  border-color: var(--color-border-dark);
  color: var(--color-text-dark);
}

.lang-selector:hover {
  background: rgba(29, 91, 254, 0.05);
  border-color: var(--color-blue);
}

.lang-arrow {
  position: absolute;
  right: 8px;
  pointer-events: none;
  width: 8px;
  height: 8px;
  color: var(--color-text-muted-light);
}

body.dark-mode .lang-arrow {
  color: var(--color-text-muted-dark);
}

.lang-arrow svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Theme Toggle Button & Controls */
.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text-muted-light);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-blue);
}

.btn-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Custom Language Dropdown */
.custom-lang-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
}

.lang-dropdown-btn {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  outline: none;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  height: 44px;
}

body.dark-mode .lang-dropdown-btn {
  border-color: var(--color-border-dark);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-dark);
}

.lang-dropdown-btn:hover {
  background: rgba(29, 91, 254, 0.05);
  border-color: var(--color-blue);
}

.dropdown-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  fill: currentColor;
}

.custom-lang-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 6px;
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 1001;
}

body.dark-mode .lang-dropdown-list {
  background: rgba(15, 22, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.custom-lang-dropdown.open .lang-dropdown-list {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-light);
}

body.dark-mode .lang-option {
  color: var(--color-text-dark);
}

.lang-option:hover {
  background: rgba(29, 91, 254, 0.06);
}

.lang-option[aria-selected="true"] {
  background: rgba(29, 91, 254, 0.1);
  color: var(--color-blue);
}

.flag-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ca-flag-icon svg {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-social-link {
  color: var(--color-text-muted-light);
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.header-social-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-blue);
  transform: scale(1.05);
}

.header-social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile hamburger menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-light);
  transition: all 0.3s ease;
}

body.dark-mode .menu-toggle span {
  background-color: var(--color-text-dark);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero Intro (Sección A - Pantalla completa) */
.hero-intro {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px; /* Reduced top gap above logo */
  padding-bottom: 40px;
  box-sizing: border-box;
  text-align: center;
}

.hero-intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

.logo-large-wrapper {
  position: relative;
  width: 100%;
  max-width: clamp(180px, 28vh, 360px); /* Tighter max-width scales logo to screen height */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

#hero-logo-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-intro-brand-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -30px; /* Adjusted to prevent overlapping the smaller logo */
  margin-bottom: 30px;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.hero-intro-brand-title {
  font-family: var(--font-primary);
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap; /* Keep length accurate */
}

.hero-intro-brand-title .co {
  color: var(--color-blue);
}

.hero-intro-brand-title .pli {
  color: var(--color-green);
}

.hero-intro-brand-title .tele {
  color: var(--color-teal);
}

.hero-intro-brand-title .dash {
  color: #cbd5e1;
  margin: 0 4px;
}
body.dark-mode .hero-intro-brand-title .dash {
  color: #475569;
}

.hero-intro-brand-title .ia {
  color: var(--color-teal);
}

/* ===================================================
   HERO BRAND TITLE — Letter entrance animation
   Each span (.co .pli .tele .dash .ia) animates in
   =================================================== */

/* Initial hidden state */
.hero-intro-brand-title .co,
.hero-intro-brand-title .pli,
.hero-intro-brand-title .tele,
.hero-intro-brand-title .dash,
.hero-intro-brand-title .ia {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: none; /* transitions disabled during animation setup */
}

/* When .hero-animated class is added to h2 — animate each span */
.hero-intro-brand-title.hero-animated .co  { animation: letter-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards; }
.hero-intro-brand-title.hero-animated .pli  { animation: letter-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards; }
.hero-intro-brand-title.hero-animated .tele { animation: letter-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.38s forwards; }
.hero-intro-brand-title.hero-animated .dash { animation: letter-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.52s forwards; }
.hero-intro-brand-title.hero-animated .ia   { animation: letter-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.62s forwards; }

@keyframes letter-in {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
  }
  60% {
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

/* Tagline fades in after title completes */
.hero-intro-tagline {
  opacity: 0;
  transform: translateY(12px);
  transition: none;
}

.hero-intro-tagline.hero-tagline-in {
  animation: tagline-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

@keyframes tagline-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Brand divider also animates in */
.brand-divider-line {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.brand-divider-line.hero-divider-in {
  animation: divider-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
}

@keyframes divider-in {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* Smooth scroll fade-out on the wrapper */
.hero-intro-brand-wrapper {
  will-change: opacity, transform;
  transition: opacity 0.15s linear, transform 0.15s linear;
}

.brand-divider-line {
  width: 100%; /* Spans exactly to match the width of the title! */
  height: 5px;
  background: var(--gradient-brand);
  margin: 15px 0;
  border-radius: 10px;
}

.hero-intro-tagline {
  font-family: var(--font-primary);
  font-size: clamp(20px, 3.2vw, 36px);
  font-weight: 500;
  color: var(--color-text-muted-light);
  margin-top: 0;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 1;
  transform: translateY(0);
}
body.dark-mode .hero-intro-tagline {
  color: var(--color-text-muted-dark);
}

.hero-intro-tagline.fade-out {
  opacity: 0;
  transform: translateY(4px);
}

.hero-intro-tagline .word-highlight {
  font-weight: 800;
}
.hero-intro-tagline .word-highlight.blue {
  color: var(--color-blue);
}
.hero-intro-tagline .word-highlight.teal {
  color: var(--color-teal);
}
.hero-intro-tagline .word-highlight.green {
  color: var(--color-green);
}
.hero-intro-tagline .word-rest {
  color: var(--color-text-muted-light);
  opacity: 0.35; /* Even lighter gray */
  font-weight: 500;
}
body.dark-mode .hero-intro-tagline .word-rest {
  color: var(--color-text-muted-dark);
  opacity: 0.35;
}

.scroll-down-arrow {
  position: relative;
  margin-top: clamp(20px, 4vh, 45px);
  margin-bottom: 20px;
  color: var(--color-blue);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce-down 2s infinite cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10;
}

.scroll-down-arrow:hover {
  color: var(--color-green);
}

.scroll-down-arrow svg {
  width: 32px;
  height: 32px;
}

@keyframes bounce-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Hero Body (Sección B) */
.hero-body {
  position: relative;
  padding: 80px 4% 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 91, 254, 0.01);
}

.hero-body-container {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
body.dark-mode .hero-body-container {
  background: rgba(15, 23, 42, 0.4);
}

.hero-body-container .hero-content {
  align-items: center;
  max-width: 800px;
  margin-bottom: 12px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-pill-tag {
  font-family: var(--font-primary);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-green);
  border: 1.5px solid var(--color-green);
  background: rgba(90, 206, 139, 0.04);
  padding: 5px 15px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-pill-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-green);
}

/* Hero H1 two-row layout */
.h1-row-black {
  display: block;
  color: var(--color-text-light);
}

body.dark-mode .h1-row-black {
  color: var(--color-text-dark);
}

.h1-row-colored {
  display: block;
}

.hero h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.12;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 span.blue-highlight { color: var(--color-blue); }
.hero h1 span.green-highlight { color: var(--color-green); }

.hero-desc {
  font-size: 15.5px;
  color: var(--color-text-muted-light);
  margin-bottom: 30px;
  line-height: 1.6;
}

body.dark-mode .hero-desc {
  color: var(--color-text-muted-dark);
}

/* Action Buttons (Screenshot-accurate) */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.btn-primary {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 30px;
  border: none;
  background-color: var(--color-blue);
  color: white;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: #0b4aed;
  transform: translateY(-1px);
}

.btn-secondary {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 30px;
  background: transparent;
  color: var(--color-green);
  border: 1.5px solid var(--color-green);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: rgba(90, 206, 139, 0.05);
  transform: translateY(-1px);
}

/* News section header row (title + see-all link) */
.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.news-section-title {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text-light);
  letter-spacing: -0.02em;
}

body.dark-mode .news-section-title {
  color: var(--color-text-dark);
}

/* News card grid (square cards with image) */
.news-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .news-cards-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  background: var(--color-bg-card-light);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  break-inside: avoid;
  margin-bottom: 20px;
}

body.dark-mode .news-card {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
}

.activity-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}

/* First card: taller image, heavier visual weight */
.news-cards-grid .news-card:nth-child(1) .news-card-image {
  aspect-ratio: 4 / 5;
}

/* Second card: standard proportion */
.news-cards-grid .news-card:nth-child(2) .news-card-image {
  aspect-ratio: 16 / 10;
}

/* Third card: compact, mostly text with small image */
.news-cards-grid .news-card:nth-child(3) .news-card-image {
  aspect-ratio: 16 / 8;
}

.news-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1e293b;
  flex-shrink: 0;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-badge {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 9px;
  border-radius: 8px;
  margin-bottom: 10px;
  width: fit-content;
}

.news-card-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1f3c;
  flex-grow: 1;
}

body.dark-mode .news-card-title {
  color: #f0f4ff;
}

/* Badge colors */
.badge-pub { background: rgba(29, 91, 254, 0.08); color: var(--color-blue); }
.badge-news { background: rgba(124, 228, 224, 0.1); color: #0fb1ab; }
.badge-trans { background: rgba(90, 206, 139, 0.08); color: #009e5e; }

body.dark-mode .badge-news { color: var(--color-teal); }
body.dark-mode .badge-trans { color: var(--color-green); }


/* Bigger logo in hero */
.logo-large-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: clamp(180px, 28vh, 360px);
  margin: 0 auto;
  overflow: visible;
}

.logo-radial-glow {
  position: absolute;
  width: 85%;
  height: 85%;
  background: radial-gradient(circle, rgba(124, 228, 224, 0.15) 0%, rgba(90, 206, 139, 0.04) 50%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

@keyframes logo-slow-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Interactive SVG specific styles */
.logo-large {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.logo-rotating-group {
  transform-origin: center;
}

/* Animation properties triggered by script */
.logo-arc-path {
  stroke-dashoffset: 0;
}

/* Stat Counters Row (Screenshot-accurate) */
.hero-stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  width: 100%;
  max-width: 1000px;
  z-index: 2;
}

.hero-stats-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  margin-top: 12px;
  border-top: 1px solid var(--color-border-light);
  padding-top: 24px;
  gap: 24px;
}

body.dark-mode .hero-stats-row {
  border-color: var(--color-border-dark);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-decoration: none;
  padding: 24px 16px;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-item:hover {
  background: #f1f5f9;
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.stat-icon-circle {
  width: auto;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .stat-icon-circle {
  background: transparent;
}

.stat-icon-circle lord-icon {
  width: 140px !important;
  height: 140px !important;
}

.stat-icon-circle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon-circle {
  transform: scale(1.05);
}

body.dark-mode .stat-item:hover {
  background: #292A44;
}

.stat-item:hover .stat-icon-circle svg {
  transform: rotate(8deg);
}

.stat-number {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 800;
  color: var(--color-blue);
  line-height: 1;
  margin-bottom: 8px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  transform-origin: center top;
}

.stat-item:hover .stat-number {
  transform: scale(1.4);
  color: var(--color-blue);
}

.stat-label {
  transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
  color: var(--color-blue) !important;
}

body.dark-mode .stat-number {
  color: var(--color-teal);
}

.stat-label {
  font-size: 11px;
  font-weight: 550;
  color: var(--color-text-muted-light);
}

body.dark-mode .stat-label {
  color: var(--color-text-muted-dark);
}

/* Section Pretitle, Title and Dashboard dashed separators */
.section-pretitle {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-green);
  margin-bottom: 8px;
  text-align: center;
}

.section-title-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 50px;
  width: 100%;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.dark-mode .section-title {
  color: var(--color-text-dark);
}


.section-title span.turquoise-highlight { color: #14b8a6; }
.section-title span.purple-highlight { color: #8b5cf6; }
.section-title span.green-highlight { color: var(--color-green); }

#actividades .section-title::after { background: var(--color-blue); }
#transferencia .section-title::after { background: #14b8a6; }
#publicaciones .section-title::after { background: #8b5cf6; }
#recursos .section-title::after { background: var(--color-green); }

.section-title span.blue-highlight {
  color: var(--color-blue);
}

/* Separator (styled as bottom line of header) */
.section-title::after {
  content: '';
  display: block;
  width: 140px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.title-separator {
  display: none !important;
}

.section-subtitle {
  font-size: 14.5px;
  color: var(--color-text-muted-light);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

body.dark-mode .section-subtitle {
  color: var(--color-text-muted-dark);
}

/* Objetivos Section Grid (Screenshot-accurate flat cards) */
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.objective-card {
  background: transparent;
  border: none;
  padding: 24px 16px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.dark-mode .objective-card {
  background: transparent;
  border: none;
}

.objective-card:hover {
  transform: translateY(-8px);
}

body.dark-mode .objective-card:hover {
  transform: translateY(-8px);
}

.objective-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: transparent;
  border-radius: 0;
}

body.dark-mode .objective-card-icon {
  background: transparent;
}

.objective-card-icon lord-icon {
  width: 180px !important;
  height: 180px !important;
}

.objective-card-icon svg {
  width: 180px;
  height: 180px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.objective-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text-light);
}

body.dark-mode .objective-card h3 {
  color: var(--color-text-dark);
}

.objective-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-muted-light);
}

body.dark-mode .objective-card p {
  color: var(--color-text-muted-dark);
}

/* Proyecto Tab Switcher Layout */
.project-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 40px;
  background: rgba(0, 0, 0, 0.03);
  padding: 5px;
  border-radius: 30px;
  width: max-content;
  border: 1px solid var(--color-border-light);
}

body.dark-mode .project-tabs {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--color-border-dark);
}

.project-tab-btn {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted-light);
  background: transparent;
}

body.dark-mode .project-tab-btn {
  color: var(--color-text-muted-dark);
}

.project-tab-btn.active {
  background-color: var(--color-blue);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(29, 91, 254, 0.15);
}

.project-tab-btn.active svg {
  fill: currentColor;
}

.project-tab-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Project Pane Switch Transitions */
.project-pane {
  display: none;
  width: 100%;
}

.project-pane.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

/* Project Description Layout details */
.project-desc-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.project-text-block h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--color-text-light);
}

body.dark-mode .project-text-block h3 {
  color: var(--color-text-dark);
}

.project-text-block p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-muted-light);
  margin-bottom: 20px;
}

body.dark-mode .project-text-block p {
  color: var(--color-text-muted-dark);
}

/* Metadata Grid 2x2 */
.project-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.meta-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
  padding: 14px 18px;
}

body.dark-mode .meta-box {
  background: rgba(255, 255, 255, 0.01);
  border-color: var(--color-border-dark);
}

.meta-label {
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-text-muted-light);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

body.dark-mode .meta-label {
  color: var(--color-text-muted-dark);
}

.meta-value {
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-light);
}

body.dark-mode .meta-value {
  color: var(--color-text-dark);
}

/* Framework Diagram Card (Right) */
.framework-card {
  background: #f3f8fc;
  border: 1px solid var(--color-border-light);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.dark-mode .framework-card {
  background: rgba(29, 91, 254, 0.03);
  border-color: var(--color-border-dark);
}

.framework-badge {
  background-color: var(--color-blue);
  color: white;
  border-radius: 14px;
  padding: 18px 24px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(29, 91, 254, 0.2);
  margin-bottom: 30px;
  width: 100%;
  max-width: 260px;
}

.framework-badge h4 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.framework-badge span {
  font-size: 10px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.framework-tags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.framework-tag {
  font-family: var(--font-primary);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: default;
}

.framework-tag.outline-blue {
  background: rgba(29, 91, 254, 0.04);
  border: 1px solid rgba(29, 91, 254, 0.15);
  color: var(--color-blue);
}

.framework-tag.outline-teal {
  background: rgba(124, 228, 224, 0.04);
  border: 1px solid rgba(124, 228, 224, 0.15);
  color: #0fb1ab;
}

body.dark-mode .framework-tag.outline-teal {
  color: var(--color-teal);
}

.framework-tag.outline-green {
  background: rgba(90, 206, 139, 0.04);
  border: 1px solid rgba(90, 206, 139, 0.15);
  color: var(--color-green);
}

/* Actividades de Transferencia Grid (Screenshot-accurate) */
.activities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .activities-grid {
    grid-template-columns: 1fr;
  }
}

.activity-card {
  background: var(--color-bg-card-light);
  border: 1px solid var(--color-border-light);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  height: 100%;
}

body.dark-mode .activity-card {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
}

.activity-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 91, 254, 0.25);
  box-shadow: var(--shadow-hover-light);
}

body.dark-mode .activity-card:hover {
  border-color: rgba(124, 228, 224, 0.25);
  box-shadow: var(--shadow-hover-dark);
}

.activity-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1e293b;
}

.activity-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.activity-card:hover .activity-image-wrapper img {
  transform: scale(1.06);
}

.activity-category {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 5;
  pointer-events: auto;
}

body.dark-mode .activity-category {
  background: rgba(12, 17, 31, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.activity-category .tag-icon {
  width: 13px;
  height: 13px;
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(12, 17, 31, 0.85);
  background-color: var(--color-green);
  box-shadow: 0 0 8px currentColor;
}

.activity-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.activity-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-light);
  line-height: 1.35;
}

body.dark-mode .activity-card h3 {
  color: var(--color-text-dark);
}

.activity-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text-muted-light);
  margin-bottom: 16px;
  flex-grow: 1;
}

body.dark-mode .activity-desc {
  color: var(--color-text-muted-dark);
}

.activity-pill-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.activity-pill {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.activity-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted-light);
  margin-top: auto;
}

body.dark-mode .activity-footer {
  border-color: rgba(255, 255, 255, 0.04);
  color: var(--color-text-muted-dark);
}

.activity-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-footer-item svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Color schemes for activity categories */
.color-blue {
  color: var(--color-blue);
}
.color-teal {
  color: var(--color-teal);
}
.color-green {
  color: var(--color-green);
}

.bg-blue-light { background-color: rgba(29, 91, 254, 0.05); color: var(--color-blue); }
.bg-teal-light { background-color: rgba(124, 228, 224, 0.08); color: var(--color-teal); }
.bg-green-light { background-color: rgba(90, 206, 139, 0.05); color: var(--color-green); }

/* Center Button Outline style (Screenshot-accurate) */
.center-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.btn-outline-blue {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 24px;
  border-radius: 20px;
  background: transparent;
  color: var(--color-blue);
  border: 1.5px solid var(--color-blue);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-blue:hover {
  background: rgba(29, 91, 254, 0.05);
}

/* Modals / Native Dialog Popups */
dialog {
  margin: auto;
  border: 1px solid var(--color-border-light);
  border-radius: 24px;
  padding: 32px;
  width: 600px;
  max-width: 90%;
  background: #ffffff;
  box-shadow: var(--shadow-dark);
  outline: none;
  animation: modalClose 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.dark-mode dialog {
  background: #0f1628;
  border-color: var(--color-border-dark);
  color: var(--color-text-dark);
}

dialog[open] {
  animation: modalOpen 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  cursor: auto;
}

dialog::backdrop {
  background: rgba(15, 20, 60, 0.65) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  /* Custom close cursor for the backdrop */
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="rgba(15,20,60,0.5)" stroke="white" stroke-width="2"/><path d="M14 14 L26 26 M26 14 L14 26" stroke="white" stroke-width="2.5" stroke-linecap="round"/></svg>') 20 20, pointer !important;
  opacity: 0;
  transition: opacity 0.4s ease;
}

dialog[open]::backdrop {
  opacity: 1 !important;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="18" fill="rgba(15,20,60,0.5)" stroke="white" stroke-width="2"/><path d="M14 14 L26 26 M26 14 L14 26" stroke="white" stroke-width="2.5" stroke-linecap="round"/></svg>') 20 20, pointer !important;
}

/* Details Dialog styles */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  gap: 16px;
}

.modal-close {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer !important;
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  color: var(--color-text-muted-light);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  outline: none;
  padding: 0;
}

body.dark-mode .modal-close {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-text-muted-dark);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  transform: scale(1.12) rotate(90deg);
  cursor: pointer !important;
}

.modal-body p {
  font-size: 14.5px;
  color: var(--color-text-muted-light);
  margin-bottom: 16px;
}

body.dark-mode .modal-body p {
  color: var(--color-text-muted-dark);
}

/* Mobile Nav Overlay Drawer */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 24, 0.96);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.mobile-menu-link {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-menu-link:hover {
  color: var(--color-teal);
  transform: scale(1.05);
}

/* Mobile Navigation Language Switcher */
.mobile-nav-lang-section {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mobile-lang-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mobile-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 99px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-lang-pill .flag-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-lang-pill .lang-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-lang-pill.active,
.mobile-lang-pill[aria-selected="true"] {
  background: var(--color-blue, #1d5bfe) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(29, 91, 254, 0.45);
}

.mobile-lang-pill:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
}

/* Common Section padding */
section.page-section {
  padding: 110px 4% 90px 4%;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Animations helper */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalOpen {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalClose {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.96) translateY(10px); }
}

/* Center dot active pulses */
@keyframes pulse-active-center-blue {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-blue)); }
  15% { transform: scale(1.4); filter: drop-shadow(0 0 20px rgba(29, 91, 254, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-blue)); }
}
@keyframes pulse-active-center-teal {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-teal)); }
  15% { transform: scale(1.4); filter: drop-shadow(0 0 20px rgba(124, 228, 224, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-teal)); }
}
@keyframes pulse-active-center-green {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-green)); }
  15% { transform: scale(1.4); filter: drop-shadow(0 0 20px rgba(90, 206, 139, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-green)); }
}

/* Perimeter dot active pulses */
@keyframes pulse-active-perim-blue {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-blue)); }
  15% { transform: scale(1.6); filter: drop-shadow(0 0 16px rgba(29, 91, 254, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-blue)); }
}
@keyframes pulse-active-perim-teal {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-teal)); }
  15% { transform: scale(1.6); filter: drop-shadow(0 0 16px rgba(124, 228, 224, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-teal)); }
}
@keyframes pulse-active-perim-green {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-green)); }
  15% { transform: scale(1.6); filter: drop-shadow(0 0 16px rgba(90, 206, 139, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--color-green)); }
}

/* Word group active pulses */
@keyframes pulse-active-word-blue {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(29, 91, 254, 0)); }
  15% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(29, 91, 254, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(29, 91, 254, 0)); }
}
@keyframes pulse-active-word-teal {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(124, 228, 224, 0)); }
  15% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(124, 228, 224, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(124, 228, 224, 0)); }
}
@keyframes pulse-active-word-green {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(90, 206, 139, 0)); }
  15% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(90, 206, 139, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(90, 206, 139, 0)); }
}

/* Active pulse triggering classes (bypass transition during keyframes) */
.logo-center-dot.center-blue.pulse-active-center {
  transition: none !important;
  animation: pulse-active-center-blue 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-center-dot.center-teal.pulse-active-center {
  transition: none !important;
  animation: pulse-active-center-teal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-center-dot.center-green.pulse-active-center {
  transition: none !important;
  animation: pulse-active-center-green 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.logo-perim-dot.perim-blue.pulse-active-perim {
  transition: none !important;
  animation: pulse-active-perim-blue 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-perim-dot.perim-teal.pulse-active-perim {
  transition: none !important;
  animation: pulse-active-perim-teal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-perim-dot.perim-green.pulse-active-perim {
  transition: none !important;
  animation: pulse-active-perim-green 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.logo-word-group.word-blue.pulse-active-word {
  transition: none !important;
  animation: pulse-active-word-blue 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-word-group.word-teal.pulse-active-word {
  transition: none !important;
  animation: pulse-active-word-teal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.logo-word-group.word-green.pulse-active-word {
  transition: none !important;
  animation: pulse-active-word-green 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* ----------------------------------------------------
 * SPA Navigation Views & Controls
 * ---------------------------------------------------- */
.spa-view {
  display: none;
  opacity: 0;
}

.spa-view.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease-out;
}

/* Header layout - logo left, nav centered, controls right */
header .imagotype-container {
  flex: 1 1 0%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-right: 0;
}
header nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
header .header-controls {
  flex: 1 1 0%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-left: 0;
}

/* Team Grid and Card styles */
.team-grid {
  column-count: 4;
  column-gap: 24px;
  margin-top: 30px;
  width: 100%;
}

.team-card {
  break-inside: avoid;
  margin-bottom: 24px;
  background: var(--color-bg-card-light);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

body.dark-mode .team-card {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.team-photo {
  width: 100%;
  overflow: hidden;
  background: #1e293b;
  flex-grow: 1; /* Stretch to fill */
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.team-role {
  font-family: var(--font-primary);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-blue);
  margin-bottom: 6px;
}

body.dark-mode .team-role {
  color: var(--color-teal);
}

.team-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-light);
}

body.dark-mode .team-name {
  color: var(--color-text-dark);
}

.team-bio {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted-light);
  margin-bottom: 16px;
  flex-grow: 1;
}

body.dark-mode .team-bio {
  color: var(--color-text-muted-dark);
}

.team-links {
  margin-top: auto;
}

/* Publications Grid and Card styles */
.publications-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}

.pub-card-row {
  background: var(--color-bg-card-light);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 75px 1fr auto;
  gap: 20px;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 10px;
  cursor: pointer;
}

body.dark-mode .pub-card-row {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
}

.pub-card-row:hover {
  transform: translateX(4px);
  border-color: #8b5cf6;
  background: #8b5cf6 !important;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.25);
}

.pub-card-row:hover * {
  color: #ffffff !important;
}

.pub-card-row:hover .pub-year-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.pub-card-row:hover .pub-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

.pub-card-row:hover svg {
  fill: #ffffff !important;
}

.pub-col {
  display: flex;
  flex-direction: column;
}

.pub-col-year { 
  font-weight: 700; 
  color: var(--color-text-muted-light); 
  display: flex;
  align-items: center;
}

.pub-year-badge {
  font-size: 13.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(29, 91, 254, 0.08);
  color: var(--color-blue);
  border: 1px solid rgba(29, 91, 254, 0.15);
  display: inline-block;
  text-align: center;
}

body.dark-mode .pub-year-badge {
  background: rgba(45, 212, 191, 0.1);
  color: var(--color-teal);
  border-color: rgba(45, 212, 191, 0.2);
}

.pub-col-citation {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--color-text-light);
  font-weight: 500;
}

body.dark-mode .pub-col-citation {
  color: var(--color-text-dark);
}

.pub-citation {
  margin: 0;
  word-break: break-word;
}

.pub-col-title { font-weight: 700; font-size: 15px; color: var(--color-text-light); }
.pub-col-authors { font-size: 13px; color: var(--color-text-muted-light); }
.pub-col-platform { 
  display: flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .pub-card-row {
    grid-template-columns: 75px 1fr auto;
  }
}
@media (max-width: 768px) {
  .pub-card-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pub-col-platform {
    justify-content: flex-start;
  }
}

/* Pub Filters */
.pub-filters-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.act-filter-btn {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted-light);
  padding: 8px 24px;
  border-radius: 30px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.act-filter-btn:hover {
  background: rgba(var(--color-blue-rgb), 0.08);
  color: var(--color-blue);
  border-color: rgba(var(--color-blue-rgb), 0.3);
}
.act-filter-btn.active {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  box-shadow: 0 4px 15px rgba(var(--color-blue-rgb), 0.3);
}


.rec-filter-btn {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted-light);
  padding: 8px 24px;
  border-radius: 30px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.rec-filter-btn:hover {
  background: rgba(var(--color-green-rgb), 0.08);
  color: var(--color-green);
  border-color: rgba(var(--color-green-rgb), 0.3);
}
.rec-filter-btn.active {
  background: var(--color-green);
  color: #fff;
  border-color: var(--color-green);
  box-shadow: 0 4px 15px rgba(var(--color-green-rgb), 0.3);
}

.pub-filter-btn {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted-light);
  padding: 8px 24px;
  border-radius: 30px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.pub-filter-btn:hover {
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
  border-color: #8b5cf6;
}
.pub-filter-btn.active {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
body.dark-mode .pub-filter-btn {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
  color: var(--color-text-muted-dark);
}
body.dark-mode .pub-filter-btn.active {
  background: #8b5cf6;
  color: #fff;
}

.pub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 91, 254, 0.2);
}

.pub-type-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(29, 91, 254, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pub-type-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.pub-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pub-tag {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pub-year {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted-light);
}

body.dark-mode .pub-year {
  color: var(--color-text-muted-dark);
}

.pub-zotero-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #c00;
  background: rgba(204, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
}

.pub-zotero-tag svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.pub-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text-light);
  line-height: 1.4;
}

body.dark-mode .pub-title {
  color: var(--color-text-dark);
}

.pub-citation {
  font-size: 13px;
  color: var(--color-text-muted-light);
  margin-bottom: 12px;
  line-height: 1.45;
}

body.dark-mode .pub-citation {
  color: var(--color-text-muted-dark);
}

.pub-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pub-keyword {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--color-text-muted-light);
  padding: 3px 8px;
  border-radius: 8px;
}

body.dark-mode .pub-keyword {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted-dark);
}

.pub-actions {
  align-self: flex-start;
  margin-top: 4px;
}

/* Image Resiliency and Scaling (Fixes user breaks) */
.image-showcase {
  width: 100% !important;
  max-width: 100% !important;
  height: 540px !important;
  max-height: 540px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.dark-mode .image-showcase {
  border: none !important;
}

.image-showcase img,
.image-showcase video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: block !important;
}

.resource-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Footer Styles */
footer {
  background: hsla(220, 15%, 10%, 1);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 4% 28px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.collaborators-wrapper {
  margin-bottom: 32px;
}

.collaborators-title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.collaborators-logos {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.colab-logo {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  color: rgba(255,255,255,0.85);
}

.colab-logo:hover {
  opacity: 1;
}

.colab-logo svg {
  width: 180px;
  height: 48px;
  display: block;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 24px 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 16px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.social-link:hover {
  background: rgba(29, 91, 254, 0.15);
  border-color: rgba(29, 91, 254, 0.3);
  color: white;
  transform: translateY(-1px);
}

.social-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}

/* Responsive: news grid collapse */
@media (max-width: 900px) {
  .news-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .news-cards-grid {
    grid-template-columns: 1fr;
  }
}


/* Responsive Breakpoints */
@media (max-width: 1100px) {
  header nav {
    display: none;
  }
  .objectives-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .activities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-desc-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  header {
    padding: 0 24px;
    width: 95%;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }
  .hero-content {
    align-items: center;
  }
  .btn-group {
    justify-content: center;
  }
  .hero-stats-row {
    margin-left: auto;
    margin-right: auto;
  }
  .logo-large-wrapper {
    max-width: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 95% !important;
    padding: 0 16px !important;
  }
  header nav {
    display: none !important;
  }
  .nav-menu, .header-search, .header-socials, header .header-controls .custom-lang-dropdown {
    display: none !important;
  }
  header .imagotype-container {
    flex: 0 1 auto !important;
  }
  header .header-controls {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }
  .menu-toggle {
    display: flex !important;
    margin-left: auto !important;
  }
  .header-logo-text {
    white-space: nowrap !important;
    font-size: 15px !important;
  }
  .imagotype-container {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .hero-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .objectives-grid {
    grid-template-columns: 1fr;
  }
  .activities-grid, .transferencia-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  .team-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 12px !important;
    column-count: auto !important;
    width: 100% !important;
  }
  .team-card {
    margin-bottom: 0 !important;
    border-radius: 16px !important;
  }
  /* Impact and Access Cards in 2 Columns on Mobile */
  .section-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 24px !important;
  }
  .section-nav-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 16px 10px !important;
    min-height: 155px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
  .section-nav-card .nav-card-icon {
    margin-bottom: 2px !important;
  }
  .section-nav-card .nav-card-icon lord-icon,
  .section-nav-card .nav-card-icon svg,
  .section-nav-card .trans-svg-icon {
    width: 48px !important;
    height: 48px !important;
  }
  .section-nav-card .nav-card-content h3 {
    font-size: 13.5px !important;
    font-weight: 750 !important;
    line-height: 1.25 !important;
    margin: 4px 0 2px !important;
  }
  .section-nav-card .nav-card-content p {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .section-nav-card .nav-card-arrow {
    display: none !important;
  }
  .publications-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .team-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 10px !important;
    column-count: auto !important;
    width: 100% !important;
  }
  .team-card-info {
    padding: 10px 8px !important;
  }
  .team-card-name {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }
  .team-card-role {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
  }
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
  }
  .hero-stats-row {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .stat-item {
    align-items: center;
    text-align: center;
  }
  .stat-icon-circle {
    margin-bottom: 4px;
  }
}

/* Quick Navigation Cards Grid (Fila 2) */
.section-nav-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 40px;
  width: 100%;
}

.section-nav-card {
  flex: 1 1 240px;
  max-width: 320px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: flex-start;
  align-items: center;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: var(--color-text-light);
  box-shadow: var(--shadow-light);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-nav-card h3 {
  font-size: 20px;
}

body.dark-mode .section-nav-card {
  background: var(--color-bg-card-dark);
  border-color: var(--color-border-dark);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-dark);
}

.card-actividades {
  background: var(--color-blue);
  border: none;
}
.card-actividades h3, .card-actividades p { color: #ffffff; }
.card-actividades:hover {
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(29, 91, 254, 0.3);
}
.card-actividades:hover h3 { color: var(--color-blue); }
.card-actividades:hover p { color: var(--color-text-light); }
body.dark-mode .card-actividades { background: var(--color-blue); border: none; }
body.dark-mode .card-actividades h3, body.dark-mode .card-actividades p { color: #ffffff; }

.card-transferencia {
  background: var(--color-teal);
  border: none;
}
.card-transferencia h3, .card-transferencia p { color: #ffffff; }
.card-transferencia:hover {
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(20, 184, 166, 0.3);
}
.card-transferencia:hover h3 { color: var(--color-teal); }
.card-transferencia:hover p { color: var(--color-text-light); }
body.dark-mode .card-transferencia { background: var(--color-teal); border: none; }
body.dark-mode .card-transferencia h3, body.dark-mode .card-transferencia p { color: #ffffff; }

.card-publicaciones {
  background: #8b5cf6;
  border: none;
}
.card-publicaciones h3, .card-publicaciones p { color: #ffffff; }
.card-publicaciones:hover {
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.3);
}
.card-publicaciones:hover h3 { color: #8b5cf6; }
.card-publicaciones:hover p { color: var(--color-text-light); }
body.dark-mode .card-publicaciones { background: #8b5cf6; border: none; }
body.dark-mode .card-publicaciones h3, body.dark-mode .card-publicaciones p { color: #ffffff; }

.card-recursos {
  background: var(--color-green);
  border: none;
}
.card-recursos h3, .card-recursos p { color: #ffffff; }
.card-recursos:hover {
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(90, 206, 139, 0.3);
}
.card-recursos:hover h3 { color: var(--color-green); }
.card-recursos:hover p { color: var(--color-text-light); }
body.dark-mode .card-recursos { background: var(--color-green); border: none; }
body.dark-mode .card-recursos h3, body.dark-mode .card-recursos p { color: #ffffff; }

.card-nueva-difusion {
  background: #00997d !important;
  border: none !important;
  outline: none !important;
}
.card-nueva-difusion h3,
.card-nueva-difusion p {
  color: #ffffff !important;
}
.card-nueva-difusion .nav-card-arrow {
  color: #ffffff !important;
}
.card-nueva-difusion .diff-svg-icon {
  color: #ffffff !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease !important;
}
.card-nueva-difusion:hover {
  background: #ffffff !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: 0 15px 35px rgba(0, 153, 125, 0.3) !important;
}
.card-nueva-difusion:hover h3 {
  color: #00997d !important;
}
.card-nueva-difusion:hover p {
  color: var(--color-text-light) !important;
}
.card-nueva-difusion:hover .nav-card-arrow {
  color: #00997d !important;
  transform: translateX(4px) !important;
}
.card-nueva-difusion:hover .diff-svg-icon {
  color: #00997d !important;
  transform: scale(1.08) rotate(3deg) !important;
}
body.dark-mode .card-nueva-difusion {
  background: #00997d !important;
  border: none !important;
  outline: none !important;
}
body.dark-mode .card-nueva-difusion h3,
body.dark-mode .card-nueva-difusion p {
  color: #ffffff !important;
}
body.dark-mode .card-nueva-difusion:hover {
  background: #ffffff !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
}
body.dark-mode .card-nueva-difusion:hover h3 {
  color: #00997d !important;
}
body.dark-mode .card-nueva-difusion:hover p {
  color: #374151 !important;
}

.section-nav-card:hover {
  transform: translateY(-4px);
}

.nav-card-icon {
  width: auto;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-nav-card:hover .nav-card-icon {
  transform: scale(1.05) rotate(3deg);
}

body.dark-mode .section-nav-card:hover .nav-card-icon {
  /* no background change */
}

.nav-card-icon lord-icon {
  width: 100px !important;
  height: 100px !important;
  transition: transform 0.3s ease;
}

.section-nav-card:hover .nav-card-icon lord-icon {
  transform: scale(1.05);
}

.nav-card-content {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.nav-card-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.nav-card-content p {
  font-size: 13px;
  color: var(--color-text-muted-light);
  line-height: 1.4;
}

body.dark-mode .nav-card-content p {
  color: var(--color-text-muted-dark);
}

.nav-card-arrow {
  font-size: 20px;
  color: var(--color-text-muted-light);
  transition: transform 0.3s ease, color 0.3s ease;
}

.section-nav-card:hover .nav-card-arrow {
  transform: translateX(4px);
  color: var(--color-blue);
}

@media (max-width: 900px) {
  .section-nav-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

/* Submenu Sticky Navigation */
.page-submenu-wrapper {
  position: sticky;
  top: 80px;
  z-index: 98;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 10px 0;
  transition: none;
  margin-top: 5px;
}

body.dark-mode .page-submenu-wrapper {
  background: none !important;
  border: none !important;
}

.page-submenu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-submenu {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Submenu Link Glassmorphism Idle & Active Rules */
.submenu-link {
  font-family: var(--font-primary);
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a !important;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 99px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .submenu-link {
  color: #ffffff !important;
  background: rgba(30, 41, 59, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.submenu-link:hover {
  color: var(--color-blue) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

body.dark-mode .submenu-link:hover {
  color: #ffffff !important;
  background: rgba(40, 53, 74, 0.9) !important;
}

.submenu-link.active,
body.dark-mode .submenu-link.active {
  color: #ffffff !important;
  background: var(--color-blue) !important;
  box-shadow: 0 4px 16px rgba(29, 91, 254, 0.35) !important;
  border-color: transparent !important;
}

body.dark-mode .submenu-link.active {
  color: #ffffff;
  background: var(--color-teal);
}

/* Decorative Project Progress Bar */
.decorative-progress-bar-container {
  width: 100%;
  max-width: 1200px;
  margin: 12px auto 20px auto;
  box-sizing: border-box;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.progress-bar-label {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted-light);
}

body.dark-mode .progress-bar-label {
  color: var(--color-text-muted-dark);
}

.progress-percentage {
  display: none !important;
}

.progress-bar-track {
  width: 100%;
  height: 28px;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  display: flex;
}

body.dark-mode .progress-bar-track {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.progress-bar-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-teal) 50%, var(--color-green) 100%);
  border-radius: 99px;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
  transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite linear;
}

/* Phase hover temporary state: hide normal completed fill */
.progress-bar-track.is-phase-hovered .progress-bar-fill {
  opacity: 0 !important;
}

/* 4-Year Segment Overlay for Progress Bar */
.progress-year-segments {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 2;
  pointer-events: none;
}

.progress-year-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-right: 1.5px solid rgba(255, 255, 255, 0.6);
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  position: relative;
}

body.dark-mode .progress-year-segment {
  border-right: 1.5px solid rgba(15, 23, 42, 0.6);
}

.progress-year-segment:last-child {
  border-right: none;
}

/* Base Year Label: subtle dark gray for non-completed / inactive states */
.progress-year-segment .year-label {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #475569;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
  user-select: none;
}

body.dark-mode .progress-year-segment .year-label {
  color: #94a3b8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Completed Segment (Normal state): white text on top of completed gradient fill */
.progress-year-segment.is-completed .year-label {
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* During Phase Hover: segments NOT highlighted MUST revert to dark gray (inactive) */
.progress-bar-track.is-phase-hovered .progress-year-segment:not(.highlight-year) {
  background: transparent !important;
  box-shadow: none !important;
}

.progress-bar-track.is-phase-hovered .progress-year-segment:not(.highlight-year) .year-label {
  color: #64748b !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  transform: none !important;
}

body.dark-mode .progress-bar-track.is-phase-hovered .progress-year-segment:not(.highlight-year) .year-label {
  color: #94a3b8 !important;
}

/* Year Highlighted on Phase Hover */
.progress-year-segment.highlight-year {
  background: var(--phase-highlight-bg, #1D5BFE) !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
}

.progress-year-segment.highlight-year .year-label {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  letter-spacing: 0.1em !important;
  transform: scale(1.05);
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Publications List Update */
.publications-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

/* Publication Card Gradient Headers */
.pub-gradient-header {
  height: 90px;
  position: relative;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
}

.pub-gradient-header.header-revista {
  background: linear-gradient(135deg, rgba(29, 91, 254, 0.9) 0%, rgba(29, 91, 254, 0.4) 100%);
}

.pub-gradient-header.header-libro {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(16, 185, 129, 0.4) 100%);
}

.pub-gradient-header.header-ponencia {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.9) 0%, rgba(20, 184, 166, 0.4) 100%);
}

/* Resource Image Size limit */
.resources-grid .resource-card .resource-image {
  height: 180px;
  overflow: hidden;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.resources-grid .resource-card .resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Language flag images */
.lang-flag-img {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Hero Section adjustments */
.hero-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-desc {
  font-size: 19px !important;
  line-height: 1.75 !important;
}

/* Detail view overlap correction */
#view-actividad-detalle {
  padding-top: 120px;
}

/* ----------------------------------------------------
   UPDATED CUSTOM STYLES (Real team, animations, submenu, custom cursor)
   ---------------------------------------------------- */

/* Reduced padding-top for El Proyecto to sit higher */
#proyecto {
  padding-top: 40px !important;
}

/* Expanded full width project description layout */
.project-desc-layout {
  display: block !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
body.dark-mode .project-desc-layout {
  background: rgba(15, 23, 42, 0.4);
}

.project-meta-grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px;
  margin-top: 40px;
}
@media (max-width: 768px) {
  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Submenu active states styled with the logo colors (blue, green, teal) */
.submenu-link[href*="#proyecto"].active {
  background: var(--color-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(29, 91, 254, 0.2);
}
.submenu-link[href*="#proyecto"]:hover {
  color: var(--color-blue) !important;
  background: rgba(29, 91, 254, 0.08) !important;
}

.submenu-link[href*="#objetivos"].active {
  background: var(--color-green) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(90, 206, 139, 0.2);
}
.submenu-link[href*="#objetivos"]:hover {
  color: var(--color-green) !important;
  background: rgba(90, 206, 139, 0.08) !important;
}

.submenu-link[href*="#equipo"].active {
  background: var(--color-teal) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 15px rgba(124, 228, 224, 0.25);
}
.submenu-link[href*="#equipo"]:hover {
  color: var(--color-teal) !important;
  background: rgba(124, 228, 224, 0.08) !important;
}

/* Language flag images - custom rounder and larger size */
.lang-flag-img {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  vertical-align: middle;
  margin-right: 8px !important;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
  transition: transform 0.2s ease;
}

.lang-dropdown-btn:hover .lang-flag-img {
  transform: scale(1.1);
}

.lang-dropdown-btn {
  padding: 6px 16px !important;
}

/* Collaborator logos (Images) in footer */
.colab-logo img {
  height: 44px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
  filter: grayscale(100%) brightness(200%);
  opacity: 0.65;
  transition: all 0.3s ease;
}

.colab-logo:hover img {
  filter: grayscale(0%) brightness(100%);
  opacity: 1;
  transform: scale(1.03);
}

/* Member Role Badge in details modal */
.member-role-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 6px;
  display: inline-block;
}
.member-role-badge.badge-ip {
  background: rgba(29, 91, 254, 0.08);
  color: var(--color-blue);
}
.member-role-badge.badge-member {
  background: rgba(124, 228, 224, 0.1);
  color: #0fb1ab;
}
body.dark-mode .member-role-badge.badge-member {
  color: var(--color-teal);
}

/* Custom interactive elements contacts hover */
.member-contact-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.email-btn:hover { background: var(--color-blue) !important; color: #fff !important; }
.orcid-btn:hover { background: var(--color-green) !important; color: #fff !important; }
.rg-btn:hover { background: var(--color-teal) !important; color: #0f172a !important; }

/* Custom Interactive Glow Cursor follower */
.custom-cursor {
  width: 8px;
  height: 8px;
  background: var(--color-blue);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2147483647 !important;
  transform: translate(-50%, -50%);
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.2s ease, 
              opacity 0.2s ease;
  transform-origin: center center;
}

.custom-cursor-follower {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--color-teal);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2147483646 !important;
  transform: translate(-50%, -50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.25s ease, 
              border-color 0.25s ease, 
              opacity 0.25s ease;
  transform-origin: center center;
}

/* Hover state on interactive buttons, links, icons: expanding big follower ring */
body.custom-cursor-hover .custom-cursor:not(.hover-post):not(.hover-nav-button) {
  width: 6px !important;
  height: 6px !important;
  background: var(--color-blue) !important;
  opacity: 1 !important;
}

body.custom-cursor-hover .custom-cursor-follower {
  width: 52px !important;
  height: 52px !important;
  background: rgba(29, 91, 254, 0.12) !important;
  border-color: var(--color-blue) !important;
  border-width: 1.5px !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

body.dark-mode.custom-cursor-hover .custom-cursor-follower {
  background: rgba(29, 91, 254, 0.22) !important;
  border-color: #60a5fa !important;
}

/* Scroll reveal fade-in/out scroll reveal system */
.scroll-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.scroll-reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* floating loop animations */
@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

.icon-animated {
  animation: floating 6s ease-in-out infinite;
}

.stat-item:nth-child(2) .icon-animated { animation-delay: 1.5s; }
.stat-item:nth-child(3) .icon-animated { animation-delay: 3s; }
.stat-item:nth-child(4) .icon-animated { animation-delay: 4.5s; }

/* =============================================
   TEAM CARDS — Dynamic Asymmetric Design
   ============================================= */

/* Both images share exact same size/position for glitch-free crossfade */
.team-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.team-card:hover .team-photo img {
  transform: scale(1.08); /* Zoom on hover */
}

/* Original photo shown by default with subtle tint */
.team-photo .photo-original {
  z-index: 1;
  opacity: 1;
  filter: grayscale(85%) opacity(0.85);
  transition: all 0.5s ease;
}

.team-card:hover .photo-original {
  filter: grayscale(0) opacity(1);
}

/* Colored photo hidden completely */
.team-photo .photo-color-overlay {
  display: none;
}

/* Gradient overlay at bottom for info readability */
.team-photo .photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(15, 20, 60, 0.88) 0%,
    rgba(15, 20, 60, 0.4) 45%,
    rgba(15, 20, 60, 0.0) 70%
  );
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.team-card:hover .photo-overlay {
  opacity: 0.7;
}

/* Info panel sits ON the photo, bottom-anchored */
.team-photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.team-photo-info .team-role-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 3px 9px;
  width: fit-content;
}

.team-photo-info .team-photo-name {
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 750;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* Name button: full width, at the card bottom */
.team-name-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
  text-align: left;
  gap: 8px;
}

.team-name-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
}

.team-name-btn .btn-arrow {
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.team-name-btn:hover .btn-arrow {
  transform: translateX(3px);
  opacity: 1;
}

@media (pointer: coarse) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}

/* ====================================================
   ANIMATED CONCENTRIC ARCS BACKGROUND
   Arcs in pairs & trios for visual richness
   ==================================================== */
.animated-arcs-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

/* All arcs: base style */
.arc {
  fill: none;
  stroke-linecap: round;
  /* No will-change on individual circles — avoids GPU layer thrashing */
}

/* PRIMARY arcs (larger, more visible) */
.arc-p {
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 2.5px;
}
body.dark-mode .arc-p {
  stroke: rgba(255, 255, 255, 0.06);
}

/* SECONDARY arcs (slightly subtler, close pair/trio companions) */
.arc-s {
  stroke: rgba(0, 0, 0, 0.05);
  stroke-width: 1.5px;
}
body.dark-mode .arc-s {
  stroke: rgba(255, 255, 255, 0.04);
}

.arc-color-blue { stroke: rgba(29, 91, 254, 0.15); }
body.dark-mode .arc-color-blue { stroke: rgba(29, 91, 254, 0.25); }

.arc-color-teal { stroke: rgba(20, 184, 166, 0.15); }
body.dark-mode .arc-color-teal { stroke: rgba(124, 228, 224, 0.25); }

.arc-dot {
  fill: var(--color-blue);
  opacity: 0.6;
}
body.dark-mode .arc-dot {
  fill: var(--color-teal);
  opacity: 0.8;
}

body.scrolled-past-hero .animated-arcs-bg .arc {
  animation-play-state: paused !important;
}

.text-blur-bg {
  position: relative;
  z-index: 1;
}
.text-blur-bg::before {
  content: "";
  position: absolute;
  inset: -12px -20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
  border-radius: 16px;
  opacity: 0.8;
}
body.dark-mode .text-blur-bg::before {
  background: rgba(15, 23, 42, 0.5);
}

/* === PAIR 1 (inner, r ≈ 160 & 178) === */
.arc-1 {
  stroke-dasharray: 628 376;
  animation: spin-arc 20s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-1b {
  stroke-dasharray: 560 559;
  animation: spin-arc 20s 3s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}

/* === TRIO 1 (mid-inner, r ≈ 300, 320, 340) === */
.arc-2 {
  stroke-dasharray: 1200 683;
  animation: spin-arc 28s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-2b {
  stroke-dasharray: 1000 1007;
  animation: spin-arc 28s 5s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-2c {
  stroke-dasharray: 900 1200;
  animation: spin-arc 28s 9s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}

/* === PAIR 2 (mid, r ≈ 490, 510) === */
.arc-3 {
  stroke-dasharray: 1950 1128;
  animation: spin-arc 36s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-3b {
  stroke-dasharray: 1600 2011;
  animation: spin-arc 36s 6s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}

/* === TRIO 2 (outer-mid, r ≈ 680, 700, 720) === */
.arc-4 {
  stroke-dasharray: 2800 1571;
  animation: spin-arc 46s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-4b {
  stroke-dasharray: 2200 2199;
  animation: spin-arc 46s 8s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-4c {
  stroke-dasharray: 1800 2700;
  animation: spin-arc 46s 14s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}

/* === PAIR 3 (outermost, r ≈ 940, 960) === */
.arc-5 {
  stroke-dasharray: 3800 2199;
  animation: spin-arc 58s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.arc-5b {
  stroke-dasharray: 3000 3770;
  animation: spin-arc 58s 10s linear infinite reverse;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes spin-arc {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -6283; }
}
/* Per-color tint via CSS filter applied to the hover image */
.team-card.color-variation-blue .photo-color-overlay {
  filter: contrast(1.1) brightness(0.9) saturate(1.8) hue-rotate(190deg);
}
.team-card.color-variation-green .photo-color-overlay {
  filter: contrast(1.1) brightness(0.9) saturate(1.8) hue-rotate(100deg);
}
.team-card.color-variation-teal .photo-color-overlay {
  filter: contrast(1.1) brightness(0.9) saturate(1.8) hue-rotate(160deg);
}

/* Header Logo Text visibility */
.header-logo-text {
  font-family: var(--font-primary);
  font-weight: 850;
  font-size: 16.5px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 10px;
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap !important;
}

header.scrolled .header-logo-text {
  opacity: 1;
  transform: translateX(0);
}

/* Non-home pages (Proyecto, Impacto y Difusión, etc.): logo icon AND logo text ALWAYS visible from scroll 0 */
body[data-page="proyecto"] #header-logo-container,
body[data-page="impacto"] #header-logo-container,
body[data-page="actividad-detalle"] #header-logo-container,
body:not([data-page="inicio"]) #header-logo-container {
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
}

body[data-page="proyecto"] .header-logo-text,
body[data-page="impacto"] .header-logo-text,
body[data-page="actividad-detalle"] .header-logo-text,
body:not([data-page="inicio"]) .header-logo-text {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Header logo spans coloring */
.header-logo-text .co { color: var(--color-blue); }
.header-logo-text .pli { color: var(--color-green); }
.header-logo-text .tele { color: var(--color-teal); }
.header-logo-text .dash { color: #cbd5e1; margin: 0 1px; }
body.dark-mode .header-logo-text .dash { color: #475569; }
.header-logo-text .ia { color: var(--color-teal); }

/* Premium Outlined & Gradient Flipped Action Buttons */
.btn-premium {
  background: transparent;
  border: 2px solid var(--color-blue);
  color: var(--color-blue);
  padding: 10px 22px;
  font-family: var(--font-primary);
  font-size: 12.5px;
  font-weight: 750;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(29, 91, 254, 0.04);
  text-decoration: none;
}

.btn-premium.blue {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.btn-premium.blue:hover {
  background: var(--color-blue);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(29, 91, 254, 0.25);
  transform: translateY(-2px);
}

.btn-premium.green {
  border-color: var(--color-green);
  color: var(--color-green);
}

.btn-premium.green:hover {
  background: var(--color-green);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(90, 206, 139, 0.25);
  transform: translateY(-2px);
}

.btn-premium.teal {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.btn-premium.teal:hover {
  background: var(--color-teal);
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(124, 228, 224, 0.3);
  transform: translateY(-2px);
}

/* Translucent Glassmorphism Scrolled Header (Lens effect) */
header.scrolled {
  height: 66px;
  top: 6px;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode header.scrolled {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Page Submenu Wrapper - Floating Capsule Joined to Scrolled Header */
.page-submenu-wrapper {
  position: sticky;
  top: 71px;
  z-index: 98;
  width: 78%;
  max-width: 1200px;
  margin: 120px auto 0 auto;
  background: transparent;
  padding: 10px 0;
  transition: all 0.3s ease;
}

body.dark-mode .page-submenu-wrapper {
  background: transparent;
}

/* Title Stacking Layout Fix */
.section-title-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 50px;
  width: 100%;
}

.section-pretitle {
  display: block;
  margin-bottom: 8px;
}

.section-subtitle {
  display: block;
  margin-top: 14px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Wide Fullscreen Overlay Dialog */
dialog.modal-large,
#details-modal.modal-large,
dialog#details-modal.modal-large {
  width: min(1680px, 94vw) !important;
  max-width: 1680px !important;
  height: auto;
  max-height: 92vh !important;
  border-radius: 28px;
  border: 1px solid var(--color-border-light) !important;
  padding: 40px 48px 36px !important;
  box-shadow: 0 32px 90px -15px rgba(0, 0, 0, 0.28);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* Hide search and filters in Producción Científica for now */
#publicaciones .filter-bar-centered,
#publicaciones .search-wrapper,
#publicaciones .pub-filters {
  display: none !important;
}

dialog.modal-large.modal-pub-popup,
#details-modal.modal-pub-popup,
dialog#details-modal.modal-pub-popup {
  width: min(1280px, 95vw) !important;
  max-width: 1280px !important;
  height: auto !important;
  max-height: 90vh !important;
  padding: 32px 42px 30px !important;
  background: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  box-shadow: 0 24px 80px -15px rgba(139, 92, 246, 0.22), 0 10px 30px rgba(0, 0, 0, 0.06);
  border-radius: 24px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

dialog.modal-large.modal-rec-popup,
#details-modal.modal-rec-popup,
dialog#details-modal.modal-rec-popup {
  width: min(1680px, 94vw) !important;
  max-width: 1680px !important;
  padding: 40px 48px 36px !important;
  background: #f0fdf4 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 32px 90px -15px rgba(16, 185, 129, 0.25);
}

body.dark-mode dialog.modal-large,
body.dark-mode #details-modal.modal-large {
  background: #1a1e36;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc;
}

body.dark-mode dialog.modal-large.modal-pub-popup,
body.dark-mode #details-modal.modal-pub-popup {
  background: #191c33 !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

body.dark-mode dialog.modal-large.modal-rec-popup,
body.dark-mode #details-modal.modal-rec-popup {
  background: #0d231b !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Ensure placeholder and inner body flex & scroll properly */
dialog.modal-large .modal-content-placeholder,
#details-modal.modal-large .modal-content-placeholder,
#details-modal.modal-rec-popup .modal-content-placeholder {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
}

#details-modal.modal-pub-popup .modal-content-placeholder {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
}

dialog.modal-large .modal-header,
#details-modal.modal-pub-popup .modal-header,
#details-modal.modal-rec-popup .modal-header {
  margin-bottom: 12px;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

dialog.modal-large .modal-body,
#details-modal.modal-large .modal-body,
#details-modal.modal-pub-popup .modal-body,
#details-modal.modal-rec-popup .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

/* Sleek custom scrollbar for modal-body */
dialog.modal-large .modal-body::-webkit-scrollbar,
#details-modal .modal-body::-webkit-scrollbar {
  width: 6px;
}
dialog.modal-large .modal-body::-webkit-scrollbar-track,
#details-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
}
dialog.modal-large .modal-body::-webkit-scrollbar-thumb,
#details-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 8px;
}
dialog.modal-large .modal-body::-webkit-scrollbar-thumb:hover,
#details-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* ─────────────────────────────────────────────────────────────
   PUBLICATION MODAL REDESIGN: 2-COLUMN SPLIT LAYOUT
   ───────────────────────────────────────────────────────────── */
.pub-modal-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.pub-modal-title-wrapper {
  flex: 1;
}

.pub-modal-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.pub-modal-hero-title {
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-light, #0f172a);
  margin: 0;
}

body.dark-mode .pub-modal-hero-title {
  color: #f8fafc;
}

.pub-modal-split-layout {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 14px;
}

.pub-modal-split-layout.pub-modal-no-sidebar {
  grid-template-columns: 1fr !important;
}

.pub-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-modal-poster-card-redesigned {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  max-height: 520px;
}

body.dark-mode .pub-modal-poster-card-redesigned {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.pub-modal-poster-card-redesigned:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.pub-modal-poster-card-redesigned img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.pub-modal-poster-zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.pub-modal-poster-card-redesigned:hover .pub-modal-poster-zoom-hint {
  opacity: 1;
}

/* Prominent "Ver Publicación" Button */
.pub-modal-btn-view-prominent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.pub-modal-btn-view-prominent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
  filter: brightness(1.05);
}

/* Main Content Column */
.pub-modal-main-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Date and Meta Row inside Main Content */
.pub-modal-date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2px;
}

.pub-modal-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
}

body.dark-mode .pub-modal-date-badge {
  background: rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
}

.pub-modal-date-badge svg {
  color: inherit;
}

.pub-modal-doi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted-light, #64748b);
}

.pub-modal-doi-badge a {
  color: #2563eb;
  text-decoration: underline;
}

.pub-modal-apa-card {
  background: rgba(124, 58, 237, 0.04);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-left: 3.5px solid #7c3aed;
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  position: relative;
}

body.dark-mode .pub-modal-apa-card {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.28);
}

.pub-modal-apa-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #7c3aed;
  margin-bottom: 4px;
  display: block;
}

.pub-modal-apa-text {
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  color: var(--color-text-light, #0f172a);
  margin: 0;
}

body.dark-mode .pub-modal-apa-text {
  color: #f1f5f9;
}

.pub-modal-abstract-card {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 14px 18px;
  max-height: 240px;
  overflow-y: auto;
}

body.dark-mode .pub-modal-abstract-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.pub-modal-abstract-card::-webkit-scrollbar {
  width: 5px;
}
.pub-modal-abstract-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

.pub-modal-abstract-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted-light, #64748b);
  margin-bottom: 4px;
  display: block;
}

.pub-modal-abstract-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text-muted-light, #475569);
  margin: 0;
}

body.dark-mode .pub-modal-abstract-text {
  color: #cbd5e1;
}

/* Full-width Collaborators / Authors section in publication modal */
.pub-modal-fullwidth-collabs {
  width: 100%;
  margin-top: 24px;
}

.pub-modal-fullwidth-collabs .post-collaborators-showcase {
  margin-top: 16px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  margin-bottom: 4px !important;
}

body.dark-mode .pub-modal-fullwidth-collabs .post-collaborators-showcase {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.pub-modal-fullwidth-collabs .post-collaborators-showcase h4 {
  font-size: 13px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  margin-bottom: 14px !important;
  color: var(--color-text-muted-light, #64748b) !important;
  text-align: left !important;
}

.pub-modal-fullwidth-collabs .collaborators-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  gap: 20px 26px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.pub-modal-fullwidth-collabs .collab-member-card {
  flex: 0 1 145px !important;
  width: 145px !important;
  max-width: 160px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.pub-modal-fullwidth-collabs .collab-avatar-wrapper {
  width: 110px !important;
  height: 110px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
}

.pub-modal-fullwidth-collabs .collab-member-card:hover .collab-avatar-wrapper {
  transform: scale(1.06) !important;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.25) !important;
}

.pub-modal-fullwidth-collabs .collab-member-name {
  font-size: 13.5px !important;
  margin-top: 8px !important;
  line-height: 1.3 !important;
  font-weight: 650 !important;
  color: var(--color-text-light, #0f172a) !important;
}

body.dark-mode .pub-modal-fullwidth-collabs .collab-member-name {
  color: #f1f5f9 !important;
}

@media (max-width: 820px) {
  dialog.modal-large.modal-pub-popup,
  #details-modal.modal-pub-popup,
  dialog#details-modal.modal-pub-popup {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding: 24px 18px 20px !important;
    max-height: 92vh !important;
    border-radius: 18px !important;
  }

  .pub-modal-split-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pub-modal-sidebar {
    width: 100%;
  }

  .pub-modal-poster-card-redesigned {
    max-height: 200px;
  }
}

/* ─────────────────────────────────────────────────────────────
   MEMBER ALMOST FULL-SCREEN SPLIT POPUP DIALOG WITH ANIMATIONS
   ───────────────────────────────────────────────────────────── */
@keyframes memberModalIn {
  0% {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes memberModalOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
}

#details-modal.modal-member-popup,
dialog#details-modal.modal-member-popup,
dialog.modal-large.modal-member-popup,
dialog.modal-member-popup {
  position: fixed !important;
  width: min(1680px, 94vw) !important;
  max-width: 1680px !important;
  height: min(92vh, 920px) !important;
  max-height: 920px !important;
  min-height: 560px !important;
  border-radius: 32px !important;
  margin: auto !important;
  padding: 0 !important;
  border: none !important;
  background: #ffffff;
  z-index: 999999 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 32px 90px -15px rgba(0, 0, 0, 0.45) !important;
  cursor: auto !important;
  animation: memberModalIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#details-modal.modal-member-popup.is-closing,
dialog#details-modal.modal-member-popup.is-closing,
dialog.modal-large.modal-member-popup.is-closing,
dialog.modal-member-popup.is-closing {
  animation: memberModalOut 0.24s cubic-bezier(0.4, 0, 1, 1) forwards !important;
  pointer-events: none;
}

body.dark-mode #details-modal.modal-member-popup,
body.dark-mode dialog#details-modal.modal-member-popup,
body.dark-mode dialog.modal-large.modal-member-popup,
body.dark-mode dialog.modal-member-popup {
  background: #15192c;
  color: #f8fafc;
  box-shadow: 0 32px 90px -15px rgba(0, 0, 0, 0.7) !important;
}

#details-modal.modal-member-popup .modal-content-placeholder,
dialog.modal-large.modal-member-popup .modal-content-placeholder,
dialog.modal-member-popup .modal-content-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex: 1 1 100%;
  overflow: hidden;
  padding: 0;
}

.member-modal-wrapper {
  display: grid;
  grid-template-columns: minmax(380px, 32%) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  position: relative;
}

@media (min-width: 1900px) {
  #details-modal.modal-member-popup,
  dialog#details-modal.modal-member-popup,
  dialog.modal-large.modal-member-popup,
  dialog.modal-member-popup,
  dialog.modal-large,
  dialog.modal-large.modal-rec-popup {
    width: min(1820px, 94vw) !important;
    max-width: 1820px !important;
    height: min(92vh, 960px) !important;
    max-height: 960px !important;
  }

  dialog.modal-large.modal-pub-popup,
  #details-modal.modal-pub-popup,
  dialog#details-modal.modal-pub-popup {
    width: min(1200px, 94vw) !important;
    max-width: 1200px !important;
    height: auto !important;
    max-height: 90vh !important;
  }
}

/* Photo on Right Alternating Layout */
.member-modal-wrapper.photo-on-right {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 35%);
}

.member-modal-wrapper.photo-on-right .member-modal-photo-column {
  order: 2;
}

.member-modal-wrapper.photo-on-right .member-modal-content-column {
  order: 1;
}

.member-modal-photo-column {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
}

body.dark-mode .member-modal-photo-column {
  background: rgba(0, 0, 0, 0.3);
}

.member-modal-photo-column .modal-member-photo-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.member-modal-photo-column img.member-fullheight-photo {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.member-modal-content-column {
  width: 100%;
  height: 100%;
  max-height: 100% !important;
  min-height: 0 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 44px 50px 48px 50px;
  overflow-y: auto !important;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 91, 254, 0.45) rgba(0, 0, 0, 0.03);
}

/* When photo is on Left (content on Right), add extra right padding so close button never covers text */
.member-modal-wrapper.photo-on-left .member-modal-content-column {
  padding-right: clamp(68px, 6vw, 92px);
}

/* Highly noticeable dynamic scrollbar (auto hidden unless content overflows) */
.member-modal-content-column::-webkit-scrollbar {
  width: 8px;
}

.member-modal-content-column::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  margin: 16px 0;
}

.member-modal-content-column::-webkit-scrollbar-thumb {
  background: rgba(29, 91, 254, 0.4);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.member-modal-content-column::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 91, 254, 0.7);
  background-clip: content-box;
}

body.dark-mode .member-modal-content-column {
  scrollbar-color: rgba(96, 165, 250, 0.45) rgba(255, 255, 255, 0.03);
}

body.dark-mode .member-modal-content-column::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .member-modal-content-column::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.4);
  background-clip: content-box;
}

body.dark-mode .member-modal-content-column::-webkit-scrollbar-thumb:hover {
  background: rgba(96, 165, 250, 0.7);
  background-clip: content-box;
}

.member-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.member-modal-title-group {
  flex: 1 1 auto;
  min-width: 0;
}

.member-modal-name {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 850;
  margin: 8px 0 6px 0;
  color: var(--color-text-light);
  font-family: var(--font-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

body.dark-mode .member-modal-name {
  color: var(--color-text-dark);
}

.member-modal-subtitle {
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 600;
  color: var(--color-blue);
  margin: 0;
  line-height: 1.4;
}

body.dark-mode .member-modal-subtitle {
  color: #60a5fa;
}

.member-modal-body-scroll {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.member-modal-body-scroll .modal-bio-text {
  font-size: clamp(15px, 1.2vw, 16.5px);
  line-height: 1.75;
  text-align: left !important;
  color: var(--color-text-muted-light);
  margin-top: 0;
  margin-bottom: 18px !important;
  white-space: pre-line;
}

.member-modal-body-scroll .modal-bio-text:last-of-type {
  margin-bottom: 24px !important;
}

body.dark-mode .member-modal-body-scroll .modal-bio-text {
  color: var(--color-text-muted-dark);
}

/* BIG, HIGHLY NOTICEABLE CLOSE BUTTON */
.member-modal-close-btn {
  position: absolute !important;
  top: 24px !important;
  right: 28px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 2px solid rgba(15, 23, 42, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 1000000 !important;
  color: #0f172a !important;
  padding: 0 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16) !important;
}

.member-modal-close-btn svg {
  width: 30px !important;
  height: 30px !important;
  stroke-width: 2.8 !important;
  transition: transform 0.25s ease !important;
}

.member-modal-close-btn:hover {
  background: #ef4444 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  transform: scale(1.15) rotate(90deg) !important;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.45) !important;
}

body.dark-mode .member-modal-close-btn {
  background: rgba(30, 36, 60, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

body.dark-mode .member-modal-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Ensure interactive elements keep default pointer */
.member-modal-wrapper a,
.member-modal-wrapper button,
.member-modal-wrapper .member-contact-link,
.member-modal-wrapper .member-post-box {
  cursor: pointer !important;
}

@media (max-width: 900px) {
  dialog.modal-large.modal-member-popup {
    width: 95vw !important;
    height: 92vh !important;
    border-radius: 24px !important;
  }
  .member-modal-wrapper,
  .member-modal-wrapper.photo-on-right {
    grid-template-columns: 1fr;
    grid-template-rows: 280px 1fr;
    overflow-y: auto;
  }
  .member-modal-photo-column,
  .member-modal-wrapper.photo-on-right .member-modal-photo-column {
    order: 1 !important;
    height: 280px;
    min-height: 280px;
  }
  .member-modal-content-column,
  .member-modal-wrapper.photo-on-right .member-modal-content-column {
    order: 2 !important;
    padding: 28px 20px 52px 20px !important;
    height: auto;
    overflow-y: visible;
  }
  .member-modal-close-btn {
    top: 14px !important;
    right: 14px !important;
    width: 44px !important;
    height: 44px !important;
  }
  .member-modal-close-btn svg {
    width: 22px !important;
    height: 22px !important;
  }
}

.modal-member-photo-wrapper img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.modal-member-contacts-row {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 44px !important;
  padding-bottom: 8px;
}

.member-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.025);
  color: #b5c0cd;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: none !important;
}

.member-contact-link svg {
  width: 24px !important;
  height: 24px !important;
}

body.dark-mode .member-contact-link {
  background: rgba(255, 255, 255, 0.035);
  color: #788899;
  border: none !important;
}

.member-contact-link:hover {
  transform: translateY(-3px);
  border: none !important;
  color: #ffffff !important;
}

.member-contact-link:hover svg {
  color: #ffffff !important;
}
.member-contact-link:hover svg path {
  fill: #ffffff !important;
}
.member-contact-link:hover svg text {
  fill: #ffffff !important;
}

/* 1. EMAIL BUTTON */
.member-contact-link.email-btn:hover {
  background: var(--color-blue);
  box-shadow: 0 4px 14px rgba(29, 91, 254, 0.35);
}
.member-contact-link.email-btn:hover svg {
  stroke: #ffffff !important;
  fill: none !important;
}
.member-contact-link.email-btn:hover svg path,
.member-contact-link.email-btn:hover svg polyline {
  fill: none !important;
  stroke: #ffffff !important;
}

/* 2. ORCID BUTTON */
.member-contact-link.orcid-btn:hover {
  background: #a6ce39;
  box-shadow: 0 4px 14px rgba(166, 206, 57, 0.35);
}

/* 3. RESEARCHGATE BUTTON */
.member-contact-link.rg-btn:hover {
  background: #00cc99;
  box-shadow: 0 4px 14px rgba(0, 204, 153, 0.35);
}

/* 4. GOOGLE SCHOLAR BUTTON */
.member-contact-link.scholar-btn:hover {
  background: #4285f4;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.35);
}

/* 5. DIALNET BUTTON */
.member-contact-link.dialnet-btn:hover {
  background: #8b1d2c;
  box-shadow: 0 4px 14px rgba(139, 29, 44, 0.35);
}

/* 6. MENDELEY BUTTON */
.member-contact-link.mendeley-btn:hover {
  background: #a81c24;
  box-shadow: 0 4px 14px rgba(168, 28, 36, 0.35);
}

/* 7. LINKEDIN BUTTON */
.member-contact-link.linkedin-btn:hover {
  background: #0077b5;
  box-shadow: 0 4px 14px rgba(0, 119, 181, 0.35);
}

/* 8. BLUESKY BUTTON */
.member-contact-link.bluesky-btn:hover {
  background: #0285ff;
  box-shadow: 0 4px 14px rgba(2, 133, 255, 0.35);
}

/* 9. INSTAGRAM BUTTON */
.member-contact-link.instagram-btn:hover {
  background: #e4405f;
  box-shadow: 0 4px 14px rgba(228, 64, 95, 0.35);
}

/* 10. FACEBOOK BUTTON */
.member-contact-link.facebook-btn:hover {
  background: #1877f2;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

/* 11. PERSONAL WEBSITE BUTTON */
.member-contact-link.website-btn:hover {
  background: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.member-contact-link.website-btn:hover svg {
  stroke: #ffffff !important;
  fill: none !important;
}
.member-contact-link.website-btn:hover svg path,
.member-contact-link.website-btn:hover svg circle,
.member-contact-link.website-btn:hover svg line {
  stroke: #ffffff !important;
  fill: none !important;
}

/* Image Skeleton Loader & Smooth Fade-In System */
.img-loader-wrapper {
  position: relative;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .img-loader-wrapper {
  background: rgba(255, 255, 255, 0.04);
}

.img-skeleton-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  color: var(--color-blue);
  opacity: 0.6;
  animation: imgSpin 1s linear infinite;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@keyframes imgSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.img-loader-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: imgShimmer 1.8s infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes imgShimmer {
  100% { left: 100%; }
}

.img-loader-wrapper.is-loaded::before,
.img-loader-wrapper.is-loaded .img-skeleton-spinner {
  opacity: 0 !important;
  display: none !important;
}

/* Image smooth fade-in without partial progressive line rendering glitches */
.fade-in-img {
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity;
}

.fade-in-img.is-loaded,
.img-loader-wrapper.is-loaded .fade-in-img {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Description Text & Meta box upgrades in Proyecto page */
#proyecto .activity-desc, #proyecto p {
  font-size: 16.5px;
  line-height: 1.7;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .project-meta-grid {
    grid-template-columns: 1fr;
  }
}

.meta-box {
  background: var(--color-bg-card-light);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

body.dark-mode .meta-box {
  background: var(--color-bg-card-dark);
  border-color: rgba(255,255,255,0.05);
}

.meta-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(29, 91, 254, 0.05);
  border-color: rgba(29, 91, 254, 0.15);
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

.meta-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text-light);
  line-height: 1.3;
}

body.dark-mode .meta-value {
  color: var(--color-text-dark);
}

/* Publications Redesigned Grid & Reference Cards */
.publications-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

@media (max-width: 1024px) {
  .publications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .publications-grid {
    grid-template-columns: 1fr;
  }
}

.pub-card {
  background: var(--color-bg-card-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

body.dark-mode .pub-card {
  background: var(--color-bg-card-dark);
  border-color: rgba(255, 255, 255, 0.05);
}

.pub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(29, 91, 254, 0.08);
  border-color: rgba(29, 91, 254, 0.2);
}

.pub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.pub-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pub-badge.badge-blue {
  background: rgba(29, 91, 254, 0.06);
  color: var(--color-blue);
}

.pub-badge.badge-green {
  background: rgba(90, 206, 139, 0.08);
  color: var(--color-green);
}

.pub-badge.badge-teal {
  background: rgba(124, 228, 224, 0.12);
  color: var(--color-teal);
}

.pub-year-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted-light);
  background: rgba(0,0,0,0.03);
  padding: 4px 10px;
  border-radius: 8px;
}

body.dark-mode .pub-year-badge {
  color: var(--color-text-muted-dark);
  background: rgba(255,255,255,0.03);
}

.pub-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text-light);
  line-height: 1.4;
  margin: 0 0 12px 0;
}

body.dark-mode .pub-title {
  color: var(--color-text-dark);
}

.pub-citation {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text-muted-light);
  margin-bottom: 20px;
  font-style: italic;
}

body.dark-mode .pub-citation {
  color: var(--color-text-muted-dark);
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pub-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.pub-tag.bg-blue {
  background: rgba(29, 91, 254, 0.04);
  color: var(--color-blue);
}

.pub-tag.bg-green {
  background: rgba(90, 206, 139, 0.05);
  color: var(--color-green);
}

.pub-tag.bg-teal {
  background: rgba(124, 228, 224, 0.08);
  color: var(--color-teal);
}

.pub-actions {
  margin-top: auto;
}

/* News Card Custom Overlays using #292A44 */
.news-card-image {
  position: relative;
  overflow: hidden;
}

.news-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(41, 42, 68, 0.85); /* #292A44 with transparency */
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.news-card-image::before {
  content: '+';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  color: #7ce4e0;
  font-size: 36px;
  font-weight: 350;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-card:hover .news-card-image::after {
  opacity: 1;
}

.news-card:hover .news-card-image::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Resources Grid & Card margins styling */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 1024px) {
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

.resource-card {
  background: var(--color-bg-card-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

body.dark-mode .resource-card {
  background: var(--color-bg-card-dark);
  border-color: rgba(255, 255, 255, 0.05);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.08);
}
.resource-card:hover .btn-secondary {
  background: rgba(14, 165, 233, 0.9);
  color: #fff;
  border-color: #0ea5e9;
}

.resource-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-card:hover .resource-image img {
  transform: scale(1.05);
}

.resource-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.resource-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.resource-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-light);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

body.dark-mode .resource-title {
  color: var(--color-text-dark);
}

.resource-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-muted-light);
  margin: 0 0 24px 0;
  flex-grow: 1;
}

body.dark-mode .resource-desc {
  color: var(--color-text-muted-dark);
}

.resource-info .btn-secondary {
  margin-top: auto;
  width: 100%;
  background: transparent;
  color: var(--color-blue);
  border: 2px solid var(--color-blue);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.resource-info .btn-secondary:hover {
  background: var(--color-blue);
  color: white;
  box-shadow: 0 4px 15px rgba(29, 91, 254, 0.25);
  transform: translateY(-2px);
}

/* Footer Custom Dark Indigo Branding (#292A44) */
footer {
  background: #292A44 !important;
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 4% 40px;
}

.collaborators-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.collaborators-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
}

.colab-logo {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 40px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.colab-logo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.colab-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.colab-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 4px;
}

.colab-org {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.colab-dept {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Custom Directional Scroll Reveal System */
.scroll-reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.scroll-reveal.reveal-from-bottom {
  transform: translateY(30px) scale(0.98);
}

.scroll-reveal.reveal-from-top {
  transform: translateY(-30px) scale(0.98);
}

.scroll-reveal.reveal-out-up {
  opacity: 0;
  transform: translateY(-30px) scale(0.98);
}

.scroll-reveal.reveal-out-down {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
}

.scroll-reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0) scale(1) !important;
}

/* Hover Underline Effects for Titles */
.news-card-title, .pub-title, .resource-title {
  position: relative;
  display: inline-block;
}

.news-card-title::after, .pub-title::after, .resource-title::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--color-blue);
  transform-origin: bottom center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-card-title::after, 
.pub-card:hover .pub-title::after, 
.resource-card:hover .resource-title::after {
  transform: scaleX(1);
}

/* Underline adjusts dynamically to text length */
.section-title {
  display: inline-block;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60% !important; /* Dynamically scales to 60% of title width */
  height: 3px;
  margin: 14px auto 0;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: all 0.4s ease;
}

.section-title:hover::after {
  width: 85% !important;
  background: var(--color-teal);
}


/* ===================================================
   PAGE-SPECIFIC HEADER: Always glassmorphic on non-home pages
   =================================================== */
body[data-page="proyecto"] header,
body[data-page="impacto"] header,
body[data-page="actividad-detalle"] header {
  background: hsla(220, 15%, 97%, 0.92) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode[data-page="proyecto"] header,
body.dark-mode[data-page="impacto"] header,
body.dark-mode[data-page="actividad-detalle"] header {
  background: hsla(222, 24%, 8%, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
}

/* ===================================================
   TITLE STACKING: Force pretitle above title always
   =================================================== */
.section-pretitle {
  display: block !important;
  width: 100%;
}

.section-title-wrapper .section-title {
  width: 100%;
}

/* ===================================================
   IMPACTO SUBMENU — Per-section highlight colors
   =================================================== */

/* Noticias → azul */
.submenu-link[href*="noticias"].active {
  background: #1D5BFE !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(29, 91, 254, 0.28);
}
.submenu-link[href*="noticias"]:hover:not(.active) {
  color: #1D5BFE !important;
  background: rgba(29, 91, 254, 0.08) !important;
  box-shadow: none;
}

/* Transferencia → verde esmeralda */
.submenu-link[href*="transferencia"].active {
  background: #22C55E !important;
  color: #0f2c18 !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.28);
}
.submenu-link[href*="transferencia"]:hover:not(.active) {
  color: #16a34a !important;
  background: rgba(34, 197, 94, 0.08) !important;
  box-shadow: none;
}

/* Publicaciones → violeta */
.submenu-link[href*="publicaciones"].active {
  background: #8B5CF6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.28);
}
.submenu-link[href*="publicaciones"]:hover:not(.active) {
  color: #7c3aed !important;
  background: rgba(139, 92, 246, 0.08) !important;
  box-shadow: none;
}

/* Recursos → teal */
.submenu-link[href*="recursos"].active {
  background: #14B8A6 !important;
  color: #032926 !important;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.28);
}
.submenu-link[href*="recursos"]:hover:not(.active) {
  color: #0d9488 !important;
  background: rgba(20, 184, 166, 0.08) !important;
  box-shadow: none;
}

/* ===================================================
   PAGE-SPECIFIC HEADER: More translucent on non-home pages
   =================================================== */
body[data-page="proyecto"] header,
body[data-page="impacto"] header,
body[data-page="actividad-detalle"] header {
  background: hsla(220, 15%, 97%, 0.76) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode[data-page="proyecto"] header,
body.dark-mode[data-page="impacto"] header,
body.dark-mode[data-page="actividad-detalle"] header {
  background: hsla(222, 24%, 8%, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
}

/* ===================================================
   OBJECTIVES CARD ICON — Ensure 90px icons have enough space
   =================================================== */
.objective-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 96px;
}

/* ===================================================
   NAV CARD ICON — Larger icons have enough room
   =================================================== */
.nav-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  flex-shrink: 0;
}

/* ===================================================
   NEWS CARD TITLE — Dark body in cards on hover too
   =================================================== */
.news-cards-grid .news-card:nth-child(1) {
  /* First card: no additional height constraint, natural with taller image */
}

/* ===================================================
   FORCE PRETITLE BLOCK DISPLAY — Title stacking
   =================================================== */
.section-pretitle {
  display: block !important;
  width: 100%;
}

/* ===================================================
   MEDIA QUERY — Mobile news grid back to 1 column
   =================================================== */
@media (max-width: 768px) {
  .news-cards-grid {
    grid-template-columns: 1fr !important;
  }
  .news-cards-grid .news-card:nth-child(1) .news-card-image {
    aspect-ratio: 16 / 9;
  }
}

/* ===================================================
   SUBMENU BUTTONS — Blur ONLY on each button, not the bar
   =================================================== */

/* Each button gets its own glass background */
.submenu-link {
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(255,255,255,0.4);
}

body.dark-mode .submenu-link {
  background: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(255,255,255,0.08);
}

/* Active state: always white text */
.submenu-link.active {
  color: #ffffff !important;
}

body.dark-mode .submenu-link.active {
  color: #ffffff !important;
}


/* Impacto y Difusión Submenu Colors */
.submenu-link[href="#/impacto#actividades"].active {
  background: var(--color-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(var(--color-blue-rgb), 0.25) !important;
}
.submenu-link[href="#/impacto#transferencia"].active {
  background: var(--color-teal) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(var(--color-teal-rgb), 0.25) !important;
}
.submenu-link[href="#/impacto#publicaciones"].active {
  background: #8b5cf6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25) !important;
}
.submenu-link[href="#/impacto#recursos"].active {
  background: var(--color-green) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(var(--color-green-rgb), 0.25) !important;
}

/* Proyecto submenu active colors — always white text */
.submenu-link[href*="#proyecto"].active { color: #ffffff !important; }
.submenu-link[href*="#objetivos"].active { color: #ffffff !important; }
.submenu-link[href*="#equipo"].active { color: #ffffff !important; }

/* Impacto submenu — white text in all active states */
.submenu-link[href*="noticias"].active { color: #ffffff !important; }
.submenu-link[href*="transferencia"].active { color: #ffffff !important; }
.submenu-link[href*="publicaciones"].active { color: #ffffff !important; }
.submenu-link[href*="recursos"].active { color: #ffffff !important; }

/* ===================================================
   SMOOTH SCROLL — Momentum-style with CSS
   =================================================== */
html {
  scroll-behavior: smooth;
}

/* Improve scroll feel for SPA views */
.spa-view {
  scroll-behavior: smooth;
}

/* ===================================================
   TEAM CARD grid — ensure photo fills the card
   =================================================== */
.team-card {
  border-radius: 20px;
  overflow: hidden;
}

.team-photo {
  border-radius: 0;
  height: 100%;
  min-height: 280px;
}

/* ===================================================
   USER REQUESTED OVERRIDES
   =================================================== */

/* Straight body-to-footer transition */
footer {
  border-radius: 0 !important;
  margin-top: 0 !important;
  padding-top: 60px !important;
  position: relative;
  z-index: 10;
}
.footer-bottom {
  flex-direction: column !important;
  justify-content: center !important;
  text-align: center !important;
}
.legal-links {
  justify-content: center !important;
}

/* Nav card idle text white, hover text dark */
.nav-card-content p {
  color: #ffffff !important;
}
.section-nav-card:hover .nav-card-content p {
  color: #475569 !important;
}
body.dark-mode .section-nav-card:hover .nav-card-content p {
  color: #94a3b8 !important;
}

/* Activity (Transferencia) hover intense */
.activity-card:hover {
  background: var(--color-blue) !important;
  border-color: transparent !important;
}
.activity-card:hover h3, 
.activity-card:hover .activity-desc, 
.activity-card:hover .activity-badge,
.activity-card:hover .activity-footer-item {
  color: #ffffff !important;
}
.activity-card:hover svg {
  fill: #ffffff !important;
}

/* Pub (Producción Científica) hover intense */
.pub-card:hover {
  background: #8B5CF6 !important;
  border-color: transparent !important;
}
.pub-card:hover .pub-title, 
.pub-card:hover .pub-citation, 
.pub-card:hover p, 
.pub-card:hover .pub-year-badge {
  color: #ffffff !important;
}
.pub-card-row:hover {
  background: #8B5CF6 !important;
  border-color: transparent !important;
}
.pub-card-row:hover * {
  color: #ffffff !important;
}

/* Resource (Recursos) hover intense */
.resource-card:hover {
  background: #22C55E !important;
  border-color: transparent !important;
}
.resource-card:hover .resource-title, 
.resource-card:hover .resource-desc {
  color: #ffffff !important;
}
.resource-card:hover .btn-secondary {
  background: #ffffff !important;
  color: #22C55E !important;
  border-color: #ffffff !important;
}

/* Button Turquoise global fix */
.btn-secondary {
  color: var(--color-teal) !important;
  border-color: var(--color-teal) !important;
}
.resource-info .btn-secondary {
  color: var(--color-teal) !important;
  border-color: var(--color-teal) !important;
}



img[src*="poster_workshop1.png"] {
  object-position: top !important;
}



/* ========================================= */
/* GRID LAYOUT FIX FOR SINGLE ROWS           */
/* ========================================= */
.resources-grid, .activities-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  justify-content: start;
}
/* By using auto-fill instead of auto-fit, items won't stretch infinitely to fill the row */

/* ========================================= */
/* HOVER OVERLAYS & ISOTYPES                 */
/* ========================================= */
.activity-card {
  position: relative;
  overflow: hidden;
  cursor: none !important; /* Use custom cursor on hover */
}

/* Image styling */
.activity-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}
.activity-image-wrapper img, .activity-image-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.activity-card:hover .activity-image-wrapper img,
.activity-card:hover .activity-image-wrapper video {
  transform: scale(1.08);
}

/* Hover overlay BG */
.hover-overlay-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Base Colors for hover overlays (dark variants) */
.activity-card[data-type="formacion"]:hover .hover-overlay-bg,
.activity-card[data-type="colaboracion"]:hover .hover-overlay-bg {
  background: rgba(30, 58, 138, 0.6); /* Dark Blue */
}
.activity-card.trans-card:hover .hover-overlay-bg {
  background: rgba(15, 118, 110, 0.6); /* Dark Teal */
}
.resource-card:hover .hover-overlay-bg {
  background: rgba(20, 83, 45, 0.6); /* Dark Green */
}
.news-card:hover .hover-overlay-bg {
  background: rgba(139, 92, 246, 0.6); /* Default purple for news, will override dynamically if needed */
}

/* Isotype Cross */
.hover-icon-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 3;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.activity-card:hover .hover-icon-wrapper,
.resource-card:hover .hover-icon-wrapper,
.news-card:hover .hover-icon-wrapper {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hover-text-top {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hover-icon-cross {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 300;
}
/* The dots around the cross */
.hover-icon-cross::before {
  content: '';
  position: absolute;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px dashed currentColor;
  opacity: 0.5;
  animation: rotate 10s linear infinite;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* ========================================= */
/* IDLE DESIGNS                              */
/* ========================================= */

/* Actividades (Tags bottom) & Transferencia (Tags top) */
.card-overlay-tags {
  position: absolute;
  left: 0; right: 0;
  padding: 20px;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-overlay-tags.bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}
.card-overlay-tags.top {
  top: 0;
  bottom: auto;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}
.card-overlay-tags h3 {
  color: #fff !important;
  margin: 0;
  font-size: 18px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.card-overlay-tags .activity-category {
  position: static;
  background: rgba(255,255,255,0.2) !important;
  backdrop-filter: blur(4px);
  color: #fff !important;
}

/* Hide card body for actividades since everything is overlaid */
.activity-card-body {
  display: none; 
}

/* Últimas Noticias Mosaic */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 4px; /* Very tight gap */
  padding: 0;
}
.news-card {
  border-radius: 0;
  box-shadow: none;
  position: relative;
  height: 280px;
  cursor: none !important;
}
.news-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover img {
  transform: scale(1.05);
}
.news-title-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 15px;
  color: #fff;
  background: rgba(139, 92, 246, 0.5); /* 50% opacity section color */
  z-index: 1;
}
.news-title-overlay h3 { margin: 0; font-size: 16px; color: #fff; }

/* Detail Pages Media Classes */
.detail-main-media {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}
.detail-intercalated-media {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  margin: 30px auto;
  display: block;
}

/* ========================================= */
/* CUSTOM CURSOR HOVER CARD HELPERS          */
/* ========================================= */
body:not(.modal-open) a:hover,
body:not(.modal-open) button:not(.modal-close):hover,
body:not(.modal-open) [role="button"]:not(.modal-close):hover {
  cursor: none !important;
}

.modal-close,
.modal-close:hover,
.modal-close:focus,
dialog .modal-close,
dialog .modal-close:hover,
dialog button,
dialog a,
dialog [role="button"],
dialog .member-contact-link,
dialog .member-post-box {
  cursor: pointer !important;
}



/* ========================================= */
/* RECURSOS CARD STYLING                     */
/* ========================================= */
.resource-info .resource-tag,
.resource-info .resource-title {
  color: var(--color-green);
  transition: color 0.3s ease;
}
.resource-card:hover .resource-info .resource-tag,
.resource-card:hover .resource-info .resource-title {
  color: #fff;
  z-index: 5;
  position: relative;
}
/* By default the cards might have a white background, we need the background to turn green so the white text is readable */
.resource-card {
  transition: background 0.3s ease;
}
.resource-card:hover {
  background: var(--color-green);
}
/* The hover line is probably an ::after on the card or image */
.resource-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 0; height: 4px;
  background: #fff; /* White line on hover instead of blue */
  transition: width 0.3s ease;
  z-index: 5;
}
.resource-card:hover::after {
  width: 100%;
}


/* Isotype Colors (Text and Cross) */
.activity-card[data-type="formacion"]:hover .hover-icon-cross,
.activity-card[data-type="colaboracion"]:hover .hover-icon-cross,
.activity-card[data-type="formacion"]:hover .hover-text-top,
.activity-card[data-type="colaboracion"]:hover .hover-text-top {
  color: var(--color-blue-light);
}

.activity-card.trans-card:hover .hover-icon-cross,
.activity-card.trans-card:hover .hover-text-top {
  color: var(--color-teal-light);
}

.resource-card:hover .hover-icon-cross,
.resource-card:hover .hover-text-top {
  color: var(--color-green-light);
}

.news-card:hover .hover-icon-cross,
.news-card:hover .hover-text-top {
  /* Override inline later or default purple */
  color: #c4b5fd; /* Light purple */
}


.hover-icon-isotype {
  position: absolute;
  top: 50%; left: 50%;
  width: 50px; height: 50px;
  margin-top: -25px; margin-left: -25px;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.activity-card:hover .hover-overlay-bg,
.resource-card:hover .hover-overlay-bg,
.news-card:hover .hover-overlay-bg {
  opacity: 1 !important;
}

.resource-card:hover::after,
.resource-card:hover .resource-title::after {
  background: #ffffff !important;
}


/* ------------------------------------------------ */
/* ASYMMETRY AND NEW HOVER STYLES FOR ACTIVITIES/TRANS */
/* ------------------------------------------------ */

/* ─── Editorial Asymmetric 4-Card Layout for Actividades del Proyecto ─── */
#activities-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-auto-rows: 280px !important;
  gap: 24px !important;
  width: 100% !important;
  margin-bottom: 40px !important;
}

#activities-grid .activity-card {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

#activities-grid .activity-card .activity-image-wrapper {
  height: 100% !important;
  aspect-ratio: unset !important;
}

/* 1st element: Large (left featured card) */
#activities-grid .activity-card:nth-child(1) {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
}

/* 2nd element: Wide top right card */
#activities-grid .activity-card:nth-child(2) {
  grid-column: span 2 !important;
  grid-row: span 1 !important;
}

/* 3rd element: Standard bottom right left card */
#activities-grid .activity-card:nth-child(3) {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}

/* 4th element: Standard bottom right right card */
#activities-grid .activity-card:nth-child(4) {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}

@media (max-width: 900px) {
  #activities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 220px !important;
  }
  #activities-grid .activity-card:nth-child(1) { grid-column: span 2 !important; grid-row: span 1 !important; }
  #activities-grid .activity-card:nth-child(2) { grid-column: span 2 !important; grid-row: span 1 !important; }
  #activities-grid .activity-card:nth-child(3) { grid-column: span 1 !important; grid-row: span 1 !important; }
  #activities-grid .activity-card:nth-child(4) { grid-column: span 1 !important; grid-row: span 1 !important; }
}

@media (max-width: 600px) {
  #activities-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 240px !important;
  }
  #activities-grid .activity-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

.transferencia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .transferencia-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}


/* Hover top row for Actividades */
.hover-top-row {
  position: absolute;
  top: -40px; /* Hidden initially above */
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: white;
}
.activity-card:hover .hover-top-row {
  top: 20px; /* Drops in on hover */
  opacity: 1;
}

.hover-pill {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Ensure the dark overlays show */
.activity-image-wrapper {
  overflow: hidden; /* Ensure overlay doesn't spill */
}

/* Isotype SVG fixes */
.hover-icon-isotype {
  position: absolute;
  top: 50%; left: 50%;
  width: 50px; height: 50px;
  margin-top: -25px; margin-left: -25px;
  animation: spin 6s linear infinite;
}


/* ------------------------------------------------ */
/* ASYMMETRY AND NEW DESIGN FOR ULTIMAS NOTICIAS */
/* ------------------------------------------------ */

/* Asymmetric grid for News 5 elements in 16:9 equivalent layout */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 20px;
}
.news-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: none !important; /* Force custom cursor */
}

/* 1st element: Large */
.news-card.idx-0 { grid-column: span 2; grid-row: span 2; }
/* 2nd element: Medium wide */
.news-card.idx-1 { grid-column: span 2; grid-row: span 1; }
/* 3rd element: Normal */
.news-card.idx-2 { grid-column: span 1; grid-row: span 1; }
/* 4th element: Normal */
.news-card.idx-3 { grid-column: span 1; grid-row: span 1; }
/* 5th element: Wide */
.news-card.idx-4 { grid-column: span 4; grid-row: span 1; }

@media (max-width: 900px) {
  .news-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .news-card.idx-0 { grid-column: span 2; }
  .news-card.idx-1 { grid-column: span 2; }
  .news-card.idx-2 { grid-column: span 1; }
  .news-card.idx-3 { grid-column: span 1; }
  .news-card.idx-4 { grid-column: span 2; }
}

@media (max-width: 600px) {
  .news-cards-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .news-card { grid-column: span 1 !important; grid-row: span 1 !important; }
}

.news-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s ease;
}
.news-card:hover img {
  transform: scale(1.05);
}

/* The dark overlay that covers the entire image on hover */
.news-full-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.5s ease;
}
.news-card:hover .news-full-overlay {
  opacity: 1 !important;
}

/* The title styling */
.news-content-wrapper {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  transition: all 0.5s ease;
}
.news-title-dynamic {
  font-size: 20px;
  color: #fff;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* subtle shadow for readability when idle */
  transition: all 0.5s ease;
}
.news-card.idx-0 .news-title-dynamic {
  font-size: 26px; /* Larger text for the biggest box */
}

/* On hover, typography grows! */
.news-card:hover .news-content-wrapper {
  bottom: 40px;
}
.news-card:hover .news-title-dynamic {
  font-size: 28px !important;
  text-shadow: none; /* Overlay handles contrast now */
}
.news-card.idx-0:hover .news-title-dynamic {
  font-size: 36px !important;
}


/* ------------------------------------------------ */
/* TITLE SCALING, CURSOR FIXES AND NEWS LAYOUT */
/* ------------------------------------------------ */

/* 1. Prevent title wrap on hover using scale instead of font-size */
.hover-scale-title {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center top;
}
.activity-card:hover .hover-scale-title,
.resource-card:hover .hover-scale-title {
  transform: scale(1.05);
}

.news-title-dynamic {
  font-size: 20px;
  transition: transform 0.5s ease;
  transform-origin: left bottom;
}
.news-card.idx-0 .news-title-dynamic {
  font-size: 26px;
}
/* Override the previous font-size scaling for news */
.news-card:hover .news-title-dynamic {
  font-size: 20px !important; 
  transform: scale(1.15);
}
.news-card.idx-0:hover .news-title-dynamic {
  font-size: 26px !important;
  transform: scale(1.15);
}

/* 2. Hide cursor completely inside hover elements */
.activity-card:hover, .resource-card:hover, .news-card:hover {
  cursor: none !important;
}

/* ─── Últimas noticias — CSS Grid layout matching Actividades del Proyecto ─── */
.news-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-auto-rows: 280px !important;
  gap: 24px !important;
  width: 100% !important;
  margin: 0 auto 40px !important;
}

/* Card 1: large featured hero (2 cols × 2 rows) */
.news-cards-grid .news-card:nth-child(1) {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
}
/* Card 2: wide top-right */
.news-cards-grid .news-card:nth-child(2) {
  grid-column: span 2 !important;
  grid-row: span 1 !important;
}
/* Card 3 & 4: standard bottom-right */
.news-cards-grid .news-card:nth-child(3),
.news-cards-grid .news-card:nth-child(4) {
  grid-column: span 1 !important;
  grid-row: span 1 !important;
}

.news-card {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  break-inside: unset !important;
}

.news-card .news-image-wrapper {
  height: 100% !important;
  aspect-ratio: unset !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .news-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 220px !important;
  }
  .news-cards-grid .news-card:nth-child(1) { grid-column: span 2 !important; grid-row: span 1 !important; }
  .news-cards-grid .news-card:nth-child(2) { grid-column: span 2 !important; }
  .news-cards-grid .news-card:nth-child(3),
  .news-cards-grid .news-card:nth-child(4) { grid-column: span 1 !important; }
}

@media (max-width: 600px) {
  .news-cards-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 240px !important;
  }
  .news-cards-grid .news-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}


#view-impacto .page-submenu {
  transition: all 0.4s ease;
}



.section-nav-card h3 {
  font-size: 1.1rem;
}
.section-nav-card p {
  font-size: 0.85rem;
  line-height: 1.3;
  margin-top: 8px;
  color: var(--color-text-muted);
}
.nav-card-arrow {
  color: #fff;
}

/* Hover Colors for Arrows and Text */
.card-actividades:hover .nav-card-arrow, .card-actividades:hover h3 { color: #1D5BFE !important; }
.card-transferencia:hover .nav-card-arrow, .card-transferencia:hover h3 { color: #14b8a6 !important; }
.card-publicaciones:hover .nav-card-arrow, .card-publicaciones:hover h3 { color: #8b5cf6 !important; }
.card-recursos:hover .nav-card-arrow, .card-recursos:hover h3 { color: #10b981 !important; }

/* Modal overlay styling for resources */
.rec-modal-content {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
body.dark-mode .rec-modal-content {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

/* ==========================================================================
   COPLITELE-IA REDESIGN SYSTEM OVERRIDES
   ========================================================================== */

/* 1. SOLID ACCENT LINES FOR SECTION TITLES */
#actividades .section-title::after { background: var(--color-blue) !important; }
#transferencia .section-title::after { background: #14b8a6 !important; }
#publicaciones .section-title::after { background: #8b5cf6 !important; }
#recursos .section-title::after { background: var(--color-green) !important; }

/* 2. COMPACT AND CENTERED SECTION NAVIGATION GRID & CARDS */
.section-nav-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 24px !important;
  margin: 30px auto 0 auto !important;
  width: 100% !important;
  max-width: 1200px !important;
}

.section-nav-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 12px !important;
  padding: 24px 20px !important;
  flex: 1 1 230px !important;
  max-width: 260px !important;
  min-height: 220px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: var(--shadow-light) !important;
  border: 1px solid var(--color-border-light) !important;
}

body.dark-mode .section-nav-card {
  border-color: var(--color-border-dark) !important;
  box-shadow: var(--shadow-dark) !important;
}

.nav-card-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 4px !important;
}

.nav-card-icon lord-icon {
  width: 70px !important;
  height: 70px !important;
}

.nav-card-content {
  text-align: center !important;
}

.nav-card-content h3 {
  font-size: 17px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

.nav-card-content p {
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.nav-card-arrow {
  font-size: 20px !important;
  margin-top: 4px !important;
  transition: transform 0.3s ease !important;
}

.section-nav-card:hover .nav-card-arrow {
  transform: translateX(4px) !important;
}

/* Card Idle Colors (White text/arrow on colored backgrounds) */
.card-actividades { background: var(--color-blue) !important; border-color: transparent !important; }
.card-actividades .nav-card-arrow, .card-actividades h3, .card-actividades p { color: #ffffff !important; }

.card-transferencia { background: #14b8a6 !important; border-color: transparent !important; }
.card-transferencia .nav-card-arrow, .card-transferencia h3, .card-transferencia p { color: #ffffff !important; }

.card-publicaciones { background: #8b5cf6 !important; border-color: transparent !important; }
.card-publicaciones .nav-card-arrow, .card-publicaciones h3, .card-publicaciones p { color: #ffffff !important; }

.card-recursos { background: var(--color-green) !important; border-color: transparent !important; }
.card-recursos .nav-card-arrow, .card-recursos h3, .card-recursos p { color: #ffffff !important; }

/* Card Hover Colors (Colored text/arrow on white backgrounds) */
.card-actividades:hover {
  background: #ffffff !important;
  box-shadow: 0 15px 35px rgba(29, 91, 254, 0.25) !important;
}
.card-actividades:hover .nav-card-arrow,
.card-actividades:hover h3,
.card-actividades:hover p {
  color: var(--color-blue) !important;
}

.card-transferencia:hover {
  background: #ffffff !important;
  box-shadow: 0 15px 35px rgba(20, 184, 166, 0.25) !important;
}
.card-transferencia:hover .nav-card-arrow,
.card-transferencia:hover h3,
.card-transferencia:hover p {
  color: #14b8a6 !important;
}

.card-publicaciones:hover {
  background: #ffffff !important;
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.25) !important;
}
.card-publicaciones:hover .nav-card-arrow,
.card-publicaciones:hover h3,
.card-publicaciones:hover p {
  color: #8b5cf6 !important;
}

.card-recursos:hover {
  background: #ffffff !important;
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.25) !important;
}
.card-recursos:hover .nav-card-arrow,
.card-recursos:hover h3,
.card-recursos:hover p {
  color: var(--color-green) !important;
}

/* Dark mode hover adjustments */
body.dark-mode .section-nav-card:hover {
  background: #1e293b !important;
}

/* 3. IMPACTO PAGE SUBMENU DESIGN CHANGES */
.page-submenu-wrapper {
  position: sticky !important;
  top: 72px !important; /* Stays right under header */
  z-index: 98 !important;
  width: 100% !important;
  margin: 10px auto 30px auto !important; /* Low margin between header/submenu */
  padding: 6px 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.page-submenu {
  display: flex !important;
  justify-content: center !important;
  gap: 20px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* More spacious submenu buttons */
.submenu-link {
  font-family: var(--font-primary) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  padding: 10px 24px !important;
  border-radius: 99px !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
}

/* Blue: Actividades */
.submenu-link.link-actividades {
  color: #1D5BFE !important;
  background: rgba(29, 91, 254, 0.08) !important;
}
.submenu-link.link-actividades:hover,
.submenu-link.link-actividades.active {
  color: #ffffff !important;
  background: #1D5BFE !important;
  box-shadow: 0 4px 12px rgba(29, 91, 254, 0.25) !important;
}

/* Idle State for all Submenu Links (Proyecto and Impacto y Difusión): Glass blur white with dark text */
.submenu-link:not(.active) {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .submenu-link:not(.active) {
  color: #ffffff !important;
  background: rgba(30, 41, 59, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Highlight / Active / Hover States (Preserved section color palettes) */
.submenu-link.link-actividades:hover,
.submenu-link.link-actividades.active {
  color: #ffffff !important;
  background: var(--color-blue) !important;
  box-shadow: 0 4px 12px rgba(29, 91, 254, 0.25) !important;
  border-color: transparent !important;
}

.submenu-link.link-transferencia:hover,
.submenu-link.link-transferencia.active {
  color: #ffffff !important;
  background: #14b8a6 !important;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25) !important;
  border-color: transparent !important;
}

.submenu-link.link-publicaciones:hover,
.submenu-link.link-publicaciones.active {
  color: #ffffff !important;
  background: #8b5cf6 !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25) !important;
  border-color: transparent !important;
}

.submenu-link.link-recursos:hover,
.submenu-link.link-recursos.active {
  color: #ffffff !important;
  background: #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
  border-color: transparent !important;
}


/* 4. HOVER OVERLAYS WITH SPINNING ISOTYPE & PLUS SIGN */
.hover-isotype-wrapper {
  position: relative !important;
  width: 60px !important;
  height: 60px !important;
  margin: 0 auto 12px auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hover-isotype-wrapper svg {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

.hover-isotype-wrapper svg.spinning-arcs {
  animation: spinIsotype 3s linear infinite !important;
  transform-origin: center center !important;
}

@keyframes spinIsotype {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Card hover acento colors */
.act-hover-content.light-blue-text {
  color: #93c5fd !important;
}
.act-hover-content.light-turquoise-text {
  color: #99f6e4 !important;
}

/* Actividades (Blue) & Transferencia (Turquoise) hover styles */
.act-card {
  position: relative !important;
  border-radius: 20px !important;
  min-height: 250px !important;
  overflow: hidden !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.act-card[data-cursor-color="blue"]:hover {
  background: #0d2873 !important;
  border-color: transparent !important;
  box-shadow: 0 15px 35px rgba(29, 91, 254, 0.2) !important;
}

.act-card[data-cursor-color="turquoise"]:hover {
  background: #095048 !important;
  border-color: transparent !important;
  box-shadow: 0 15px 35px rgba(20, 184, 166, 0.2) !important;
}

.act-isotype-row {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 10px !important;
}

/* Recursos Card (Green) & Hover */
.rec-card {
  position: relative !important;
  background: var(--color-bg-card) !important;
  border: 1px solid var(--color-border-light) !important;
  border-radius: 20px !important;
  padding: 30px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  min-height: 230px !important;
  color: var(--color-text-light) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
  cursor: none !important;
}

body.dark-mode .rec-card {
  background: var(--color-bg-card-dark) !important;
  border-color: var(--color-border-dark) !important;
  color: var(--color-text-dark) !important;
}

.rec-idle-content {
  transition: opacity 0.3s ease !important;
}

.rec-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.rec-hover-content {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 30px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.4s ease !important;
  transform: translateY(20px) !important;
  color: #a7f3d0 !important; /* Light green */
  background: rgba(16, 185, 129, 0.96) !important;
}

.rec-type-label {
  margin-top: 10px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
}

.rec-card:hover {
  border-color: transparent !important;
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.2) !important;
}

.rec-card:hover .rec-idle-content {
  opacity: 0 !important;
  visibility: hidden !important;
}

.rec-card:hover .rec-hover-content {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}


/* 5. CUSTOM CURSOR & HOVER STATES */
#custom-cursor.hover-post {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-family: var(--font-primary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  background-image: none !important;
  border: none !important;
  box-sizing: border-box !important;
}

#custom-cursor.hover-post[data-color="blue"] { background-color: #1D5BFE !important; box-shadow: 0 4px 12px rgba(29, 91, 254, 0.3) !important; }
#custom-cursor.hover-post[data-color="turquoise"] { background-color: #14b8a6 !important; box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3) !important; }
#custom-cursor.hover-post[data-color="purple"] { background-color: #8b5cf6 !important; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important; }
#custom-cursor.hover-post[data-color="green"] { background-color: #10b981 !important; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important; }

/* General buttons and links cursor — logo isotype (no gray ring) */
@keyframes rotateCursor {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide follower when cursor is in post card badge */
.custom-cursor.hover-post ~ .custom-cursor-follower {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scale(0) !important;
}


/* 6. GREEN-TINTED BACKGROUND FOR RECURSOS POPUP */
dialog.green-tint-modal {
  background: #f0fdf4 !important; /* Light green tint in light mode */
  border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode dialog.green-tint-modal {
  background: #092119 !important; /* Dark green tint in dark mode */
  border-color: rgba(16, 185, 129, 0.2) !important;
}

dialog.green-tint-modal .modal-close {
  color: #10b981 !important;
}

dialog.green-tint-modal .modal-close:hover {
  background: rgba(16, 185, 129, 0.1) !important;
}

/* ==========================================================================
   COPLITELE-IA REDESIGN SYSTEM v2 — MASTER OVERRIDES
   ========================================================================== */

/* ─── 1. SECTION TITLE COLORS: always black, underline stays colored ─── */
#actividades .section-title,
#transferencia .section-title,
#publicaciones .section-title,
#recursos .section-title {
  color: #0f172a !important;
}
body.dark-mode #actividades .section-title,
body.dark-mode #transferencia .section-title,
body.dark-mode #publicaciones .section-title,
body.dark-mode #recursos .section-title {
  color: #f1f5f9 !important;
}

/* .black-text within section titles forces true black */
.section-title .black-text { color: #0f172a !important; }
body.dark-mode .section-title .black-text { color: #f1f5f9 !important; }

/* ─── 2. NAV GRID — fix top clip on Impacto ─── */
#view-impacto > .section-container {
  overflow: visible !important;
  padding-top: 24px !important;
}
.section-nav-grid {
  overflow: visible !important;
  padding-top: 12px !important;
}

/* ─── 3. TRANSFERENCIA ANIMATED SVG ICON ─── */
.trans-svg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  color: #ffffff;
  transition: color 0.3s ease;
}
.trans-svg-icon svg {
  animation: transIconPulse 2.4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes transIconPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.card-transferencia:hover .trans-svg-icon {
  color: #14b8a6 !important;
}

/* ─── 4. SECTION INNER PANEL (white card per section) ─── */
.impacto-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.section-inner-panel {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 48px 48px 52px 48px;
  margin: 40px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.02);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
body.dark-mode .section-inner-panel {
  background: rgba(15, 23, 42, 0.45);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .section-inner-panel {
    padding: 32px 18px 36px 18px !important;
    border-radius: 22px !important;
    margin: 24px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .section-inner-panel {
    padding: 24px 14px 28px 14px !important;
    border-radius: 18px !important;
    margin: 18px 0 !important;
  }
}

/* ─── 5. TITLE SPACING — tighter underline gap + filters margin ─── */
.impacto-title-wrapper {
  margin-bottom: 16px !important;
}
.impacto-title-wrapper .section-title {
  padding-bottom: 4px !important;
}
.impacto-title-wrapper .section-title::after {
  margin-top: 8px !important;
}
.impacto-filters {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 10px !important;
  margin-bottom: 28px !important;
}

/* ─── 6. SUBMENU & SECTION ANCHOR SCROLL CLEARANCE ─── */
#proyecto,
#objetivos,
#equipo,
#actividades,
#transferencia,
#publicaciones,
#recursos {
  scroll-margin-top: 160px !important;
}

/* Per-section padding-top fine-tuned so titles clear the sticky submenu */
/* Descripción (#proyecto) – needs more, it overlaps */
#view-proyecto #proyecto {
  padding-top: 100px !important;
}

/* Objetivos, Equipo – already good */
#view-proyecto #objetivos,
#view-proyecto #equipo {
  padding-top: 80px !important;
}

/* Transferencia, Producción Científica, Recursos – too much, reduce */
#view-impacto #transferencia,
#view-impacto #publicaciones,
#view-impacto #recursos {
  padding-top: 15px !important;
}

/* Actividades – first section of Impacto, tightly nested under submenu */
#view-impacto #actividades {
  padding-top: 0 !important;
}

#view-impacto, #view-proyecto {
  padding-top: 120px !important;
  overflow: visible !important;
}

#view-impacto .page-submenu-wrapper {
  margin-top: 14px !important;
  margin-bottom: 8px !important;
  position: sticky !important;
  top: 86px !important;
  z-index: 900 !important;
}

#view-impacto #actividades .section-inner-panel {
  margin-top: 8px !important;
}

#view-proyecto .page-submenu-wrapper {
  margin-top: 10px !important;
  margin-bottom: 24px !important;
  position: sticky !important;
  top: 86px !important;
  z-index: 900 !important;
}

/* ─── 8. CUSTOM CURSOR REDESIGN ─── */
/* Default cursor: small dot */
.custom-cursor {
  background: rgba(100, 100, 100, 0.7) !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
}

/* Post cards → "Ver" circle, colored by section */
.custom-cursor.hover-post {
  width: 70px !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  border: none !important;
  transition: width 0.2s, height 0.2s, background-color 0.2s !important;
}
.custom-cursor.hover-post[data-color="blue"]      { background-color: #1D5BFE !important; box-shadow: 0 4px 18px rgba(29,91,254,0.5) !important; }
.custom-cursor.hover-post[data-color="turquoise"] { background-color: #14b8a6 !important; box-shadow: 0 4px 18px rgba(20,184,166,0.5) !important; }
.custom-cursor.hover-post[data-color="purple"]    { background-color: #8b5cf6 !important; box-shadow: 0 4px 18px rgba(139,92,246,0.5) !important; }
.custom-cursor.hover-post[data-color="green"]     { background-color: #10b981 !important; box-shadow: 0 4px 18px rgba(16,185,129,0.5) !important; }

/* Dialog and Interactive cursors */
dialog,
dialog * {
  cursor: auto;
}

dialog a,
dialog button,
dialog [role="button"],
dialog .modal-close,
dialog .member-contact-link,
dialog .member-post-box {
  cursor: pointer !important;
}

body.modal-open .custom-cursor,
body.modal-open .custom-cursor-follower {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ─── 9. CARD DESIGNS — ACTIVIDADES (Blue, image + title bottom) ─── */
.act-card-actividades {
  position: relative !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  cursor: none !important;
  min-height: 280px !important;
}
.act-card-actividades .activity-image-wrapper {
  height: 280px !important;
  position: relative !important;
}
/* Bottom gradient (idle) */
.act-idle-gradient {
  position: absolute !important;
  left: 0 !important; right: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
.act-idle-bottom {
  bottom: 0 !important;
  height: 70% !important;
  background: linear-gradient(to top, rgba(10,20,60,0.92) 0%, rgba(10,20,60,0.3) 60%, transparent 100%) !important;
}
.act-idle-top {
  top: 0 !important;
  height: 70% !important;
  background: linear-gradient(to bottom, rgba(5,50,50,0.92) 0%, rgba(5,50,50,0.25) 60%, transparent 100%) !important;
}
/* Title at bottom overlay */
.act-idle-title {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important; right: 0 !important;
  padding: 20px 22px !important;
  z-index: 2 !important;
}
.act-idle-title h3 {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
}
/* Title at top (Transferencia) */
.act-idle-title-top {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important; right: 0 !important;
  padding: 20px 22px !important;
  z-index: 2 !important;
}
.act-idle-title-top h3 {
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}
/* Date badge bottom-right */
.act-idle-date {
  position: absolute !important;
  bottom: 16px !important;
  right: 18px !important;
  z-index: 2 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  color: rgba(255,255,255,0.75) !important;
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  padding: 3px 8px !important;
  border-radius: 20px !important;
}

/* ─── 10. HOVER OVERLAY — shared for Actividades & Transferencia ─── */
.act-hover-overlay {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1), visibility 0.35s ease !important;
}
.act-hover-overlay.act-hover-blue      { background: rgba(29, 91, 254, 0.93) !important; }
.act-hover-overlay.act-hover-turquoise { background: rgba(20, 184, 166, 0.93) !important; }

.act-card-actividades:hover .act-hover-overlay,
.act-card-transferencia:hover .act-hover-overlay {
  opacity: 1 !important;
  visibility: visible !important;
}

.act-hover-overlay.act-hover-turquoise,
.act-hover-overlay.act-hover-turquoise *,
.act-hover-overlay.act-hover-turquoise span,
.act-hover-overlay.act-hover-turquoise p,
.act-hover-overlay.act-hover-turquoise div {
  color: #ffffff !important;
}

.act-hover-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  text-align: center !important;
  padding: 20px !important;
}
.act-hover-isotype .hover-isotype-wrapper {
  width: 72px !important;
  height: 72px !important;
}
.act-hover-tag {
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  color: #ffffff !important;
  background: rgba(255,255,255,0.15) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
}
.act-hover-desc {
  font-size: 13px !important;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  max-width: 240px !important;
}

/* ─── 11. ISOTYPE SVG — bigger, properly centered ─── */
.hover-isotype-wrapper {
  width: 72px !important;
  height: 72px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hover-isotype-wrapper svg.spinning-arcs {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  animation: spinIsotype 3s linear infinite !important;
  transform-origin: 50% 50% !important;
}
.hover-isotype-wrapper svg.static-plus {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
}

/* ─── 12. NEWS CARD hover isotype ─── */
.news-hover-isotype {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(0.8) !important;
  z-index: 3 !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease, transform 0.4s ease !important;
  pointer-events: none !important;
}
.news-card:hover .news-hover-isotype {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
}
.news-hover-isotype .hover-isotype-wrapper {
  color: rgba(255,255,255,0.9) !important;
}
/* Ensure news-full-overlay shows on hover */
.news-card:hover .news-full-overlay {
  opacity: 1 !important;
}
/* Always visible title */
.news-content-wrapper {
  position: absolute !important;
  bottom: 18px !important;
  left: 18px !important; right: 18px !important;
  z-index: 2 !important;
}
.news-title-dynamic {
  font-size: 17px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  margin: 0 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
  line-height: 1.35 !important;
}

/* ─── 13. SECTION NAV CARD — exclude from post cursor ─── */
.section-nav-card {
  cursor: none !important;
}

/* ─── 14. DETAIL INNER PANEL (glassmorphism white card) ─── */
.detail-inner-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 20px !important;
  padding: 36px 40px !important;
  margin-top: 8px !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07) !important;
  color: #1a1a2e !important;
}
.detail-inner-panel h1,
.detail-inner-panel .activity-detail-lorem {
  color: #1a1a2e !important;
}
.detail-inner-panel p,
.detail-inner-panel div {
  color: #1a1a2e !important;
}
.activity-detail-lorem {
  width: 100% !important;
  clear: both !important;
  display: block !important;
}
.activity-detail-lorem p {
  margin-bottom: 1.25em !important;
  line-height: 1.75 !important;
  width: 100% !important;
  clear: both !important;
}

/* ─── 15. POST BODY IMAGES, GALLERIES & VIDEOS ─── */
.activity-detail-lorem img,
.activity-detail-lorem figure,
.activity-detail-lorem .wp-block-image,
.activity-detail-lorem .wp-inline-gallery-item,
.post-body-img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 18px !important;
  margin: 28px 0 !important;
  clear: both !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
  box-sizing: border-box !important;
}

/* Post Video Containers with Drop Shadow */
.activity-detail-lorem .wp-inline-video,
.activity-detail-lorem .wp-block-video,
.activity-detail-lorem figure.wp-block-video,
.activity-detail-post-content .wp-inline-video,
.activity-detail-post-content .wp-block-video {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 32px auto !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #000000 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-sizing: border-box !important;
}

.activity-detail-lorem .wp-inline-video:hover,
.activity-detail-lorem .wp-block-video:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28), 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.activity-detail-lorem .wp-inline-video video,
.activity-detail-lorem .wp-block-video video,
.activity-detail-lorem video {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 540px !important;
  border-radius: 20px !important;
  object-fit: contain !important;
  background: #000000 !important;
  box-sizing: border-box !important;
}

/* Portrait / Vertical Video Layout (Automatic width constraint & centered) */
.activity-detail-lorem .wp-inline-video.is-portrait-video,
.activity-detail-lorem .wp-block-video.is-portrait-video,
.activity-detail-lorem figure.wp-block-video.is-portrait-video,
.activity-detail-lorem .is-portrait-video,
.is-portrait-video {
  max-width: 420px !important;
  width: 100% !important;
  margin: 36px auto !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28), 0 6px 18px rgba(0, 0, 0, 0.16) !important;
}

.activity-detail-lorem .wp-inline-video.is-portrait-video video,
.activity-detail-lorem .wp-block-video.is-portrait-video video,
.is-portrait-video video {
  max-height: 640px !important;
  border-radius: 22px !important;
  object-fit: cover !important;
}

.activity-detail-lorem .wp-inline-gallery {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  margin: 28px 0 !important;
  width: 100% !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.activity-detail-lorem .wp-inline-gallery img {
  width: 100% !important;
  height: auto !important;
  max-height: 480px !important;
  object-fit: cover !important;
  border-radius: 18px !important;
  display: block !important;
}

/* ─── COLLABORATION WITH SHOWCASE (Placed directly BEFORE Participating Researchers) ─── */
.post-collaboration-with-showcase {
  width: 100% !important;
  clear: both !important;
  display: block !important;
  margin-top: 32px !important;
  margin-bottom: 20px !important;
  padding: 16px 20px !important;
  background: rgba(29, 91, 254, 0.04) !important;
  border: 1.5px solid rgba(29, 91, 254, 0.14) !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
}

body.dark-mode .post-collaboration-with-showcase {
  background: rgba(29, 91, 254, 0.08) !important;
  border-color: rgba(29, 91, 254, 0.28) !important;
}

.collab-with-heading {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  margin-bottom: 6px !important;
  color: var(--color-blue, #1d5bfe) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.75px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.collab-with-content {
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: var(--color-text-light, #1e293b) !important;
  font-weight: 500 !important;
}

.collab-with-content a {
  color: var(--color-blue, #1d5bfe) !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  transition: color 0.2s ease, opacity 0.2s ease !important;
}

.collab-with-content a:hover {
  color: #1447d1 !important;
  opacity: 0.85 !important;
}

body.dark-mode .collab-with-content {
  color: #f1f5f9 !important;
}

body.dark-mode .collab-with-content a {
  color: #60a5fa !important;
}

.post-collaborators-showcase {
  width: 100% !important;
  clear: both !important;
  display: block !important;
  margin-top: 28px !important;
  padding-top: 24px !important;
  border-top: 1px solid var(--color-border-light) !important;
}

/* ─── 16. PDF PREVIEW WRAPPER (compact, expandable) ─── */
.pdf-preview-wrapper {
  position: relative !important;
  margin: 28px 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}
.pdf-preview-inner {
  position: relative !important;
}
.pdf-overlay-btn {
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
  z-index: 5 !important;
}
.pdf-open-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(30, 58, 138, 0.92) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  backdrop-filter: blur(8px) !important;
  transition: background 0.2s !important;
}
.pdf-open-btn:hover {
  background: rgba(30, 58, 138, 1) !important;
}

/* ─── 17.1 RECURSOS PDF ONLINE VIEWER ─── */
.rec-pdf-viewer-card {
  margin: 10px 0 14px;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

body.dark-mode .rec-pdf-viewer-card {
  background: #111e19;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn-rec-newtab {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-rec-newtab:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

body.dark-mode .btn-rec-newtab {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

body.dark-mode .btn-rec-newtab:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-rec-newtab svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.rec-pdf-frame-wrapper {
  position: relative;
  width: 100%;
  height: clamp(220px, 32vh, 340px);
  background: #334155;
  -webkit-overflow-scrolling: touch;
}

.rec-pdf-embed-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.rec-download-bar {
  margin-top: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-rec-download {
  background: #10b981 !important;
  border: 1px solid #059669 !important;
  padding: 10px 24px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  border-radius: 99px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.btn-rec-download:hover {
  background: #059669 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45) !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .rec-pdf-frame-wrapper {
    height: clamp(200px, 28vh, 280px);
  }
}

/* ─── 18. IMAGE LIGHTBOX OVERLAY & TOP-LAYER DIALOG ─── */
.img-lightbox-overlay,
dialog.img-lightbox-dialog,
dialog#image-lightbox-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 24px !important;
  border: none !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: zoom-out !important;
  z-index: 999999 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.img-lightbox-overlay {
  background: rgba(0, 0, 0, 0) !important;
}

.img-lightbox-overlay.visible {
  background: rgba(0, 0, 0, 0.88) !important;
  opacity: 1 !important;
}

dialog.img-lightbox-dialog::backdrop,
dialog#image-lightbox-modal::backdrop {
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  opacity: 0;
  transition: opacity 0.25s ease !important;
}

dialog.img-lightbox-dialog.visible,
dialog#image-lightbox-modal.visible {
  opacity: 1 !important;
}

dialog.img-lightbox-dialog.visible::backdrop,
dialog#image-lightbox-modal.visible::backdrop {
  opacity: 1 !important;
}

dialog.img-lightbox-dialog.is-closing,
dialog#image-lightbox-modal.is-closing {
  opacity: 0 !important;
}

dialog.img-lightbox-dialog.is-closing::backdrop,
dialog#image-lightbox-modal.is-closing::backdrop {
  opacity: 0 !important;
}

.img-lightbox-inner {
  position: relative !important;
  max-width: min(92vw, 1300px) !important;
  max-height: 90vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: zoomLightboxIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomLightboxIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.img-lightbox-inner img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 88vh !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6) !important;
  display: block !important;
  cursor: zoom-out !important;
  background: transparent !important;
}

.img-lb-close {
  position: absolute !important;
  top: -48px !important;
  right: 0 !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 16px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  backdrop-filter: blur(4px) !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.img-lb-close:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.08) !important;
}

/* ─── 19. NEWS CARD — same design as Actividades/Transferencia/Recursos ─── */
.news-card-redesign {
  position: relative !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  aspect-ratio: 4/3 !important;
  cursor: none !important;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease !important;
}
.news-card-redesign:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25) !important;
}
.news-card-redesign .news-image-wrapper {
  position: absolute !important;
  inset: 0 !important;
}
.news-card-redesign .news-image-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.4s ease !important;
}
.news-card-redesign:hover .news-image-wrapper img {
  transform: scale(1.04) !important;
}
/* Suppress abrupt title scale on hover globally */
.activity-card:hover h3,
.news-card-redesign:hover h3,
.transfer-card:hover h3 {
  transform: none !important;
  font-size: inherit !important;
}

/* ─── 20. SUBMENU ANCHOR SCROLL MARGIN (more breathing room) ─── */
#actividades,
#transferencia,
#publicaciones,
#recursos {
  scroll-margin-top: 185px !important;
}

/* ─── 21. HOVER ISOTYPE — fix transparent bg, no white fill ─── */
.hover-isotype-wrapper {
  position: relative !important;
  width: 56px !important;
  height: 56px !important;
  background: transparent !important;
}
.hover-isotype-wrapper svg {
  background: transparent !important;
}

/* ─── 22. FOOTER MICIU LOGO color mode ─── */
.collaborators-wrapper img {
  filter: none !important;
  opacity: 1 !important;
  background: #ffffff !important;
  padding: 6px !important;
  border-radius: 8px !important;
}
@media (prefers-color-scheme: dark) {
  .collaborators-wrapper img {
    filter: none !important;
    opacity: 1 !important;
    background: #ffffff !important;
  }
}

/* ─── 23. NEWS CARD HOVER ACTIVATION ─── */
.news-card-redesign {
  position: relative !important;
}
.news-card-redesign:hover .act-hover-overlay {
  opacity: 1 !important;
}
.news-card-redesign:hover .news-image-wrapper img {
  transform: scale(1.04) !important;
}

/* ─── 24. DETAIL PAGE WHITE PANEL on dark/light bg ─── */
#view-actividad-detalle {
  background: transparent !important;
}
#view-actividad-detalle .section-container {
  background: transparent !important;
}

[id="actividades"],
[id="transferencia"],
[id="publicaciones"],
[id="recursos"] {
  scroll-margin-top: 185px !important;
}

/* ─── 26. LAYOUT CENTERING AND GRID ALIGNMENT OVERRIDES ─── */
html, body, #app, main, .spa-view {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.section-container, 
.footer-container, 
main, 
.hero-body-container, 
.decorative-progress-bar-container, 
.project-phases-row {
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  box-sizing: border-box !important;
}

.decorative-progress-bar-container {
  width: 100% !important;
  max-width: 1200px !important;
}

.project-phases-row {
  width: 100% !important;
  max-width: 1200px !important;
}

/* Team Grid should NOT be justified center because it uses column-count masonry layout */
.resources-grid, .activities-grid, .objectives-grid, .news-cards-grid, .publications-grid {
  justify-content: center !important;
  justify-items: center !important;
}

/* ─── 27. CUSTOM CURSOR OVERRIDES (White Isotype, Transparent BG) ─── */
.custom-cursor.hover-post {
  width: 110px !important;
  height: 110px !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: none !important;
}

/* Force cursor background transparent for all posts */
.custom-cursor.hover-post[data-color] {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

@keyframes spin-cursor-isotype {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning-arcs-cursor {
  animation: spin-cursor-isotype 12s linear infinite !important;
  transform-origin: 50% 50% !important;
}

/* ─── 28. TRANSFERENCIA HOVER CARD TRANSITIONS & COLORS ─── */
.act-card-transferencia {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
  background: var(--color-bg-card-light) !important;
  border: 1px solid var(--color-border-light) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
body.dark-mode .act-card-transferencia {
  background: var(--color-bg-card-dark) !important;
  border-color: var(--color-border-dark) !important;
}
.act-card-transferencia:hover {
  background: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
}
body.dark-mode .act-card-transferencia:hover {
  background: var(--color-bg-card-dark) !important;
  border-color: transparent !important;
}
.trans-card-title-dynamic,
.act-card-transferencia:hover .trans-card-title-dynamic {
  font-size: 18px !important;
  line-height: 1.35 !important;
  transform: none !important;
  color: #0f172a !important;
  transition: color 0.3s ease !important;
}
.act-card-transferencia:hover .trans-card-title-dynamic {
  color: #0d9488 !important;
}
body.dark-mode .act-card-transferencia:hover .trans-card-title-dynamic {
  color: #2dd4bf !important;
}
body.dark-mode .trans-card-title-dynamic {
  color: #f1f5f9 !important;
}

@media (max-width: 768px) {
  .act-card-transferencia {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .act-card-transferencia .activity-image-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .act-card-transferencia .activity-image-wrapper img,
  .act-card-transferencia .activity-image-wrapper video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .act-card-transferencia .trans-card-text-container {
    padding: 16px 10px 12px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  .act-card-transferencia .trans-card-title-dynamic {
    font-size: 16px !important;
    line-height: 1.35 !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
}

/* Force footer typography text to be always visible and sized nicely */
footer .header-logo-text {
  opacity: 1 !important;
  transform: none !important;
  display: inline-block !important;
}


/* ─── 29. CARDS TEXT SIZE ENLARGEMENT ─── */
.activity-card h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
}
.activity-card .act-hover-tag {
  font-size: 13px !important;
  font-weight: 800 !important;
}

/* Disable color-scheme filter on footer collaborators image */
.collaborators-wrapper img {
  filter: none !important;
  opacity: 1 !important;
}
@media (prefers-color-scheme: dark) {
  .collaborators-wrapper img {
    filter: none !important;
    opacity: 1 !important;
  }
}

/* ─── 30. UNIVERSAL RESET AND VIEWPORT CENTERING ─── */
html {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  -webkit-text-size-adjust: 100% !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
  position: relative !important;
  box-sizing: border-box !important;
  touch-action: pan-y pinch-zoom !important;
}

*, *::before, *::after {
  box-sizing: inherit !important;
}

main {
  width: 100% !important;
  margin: 0 auto !important;
}

.spa-view {
  display: none;
  opacity: 0;
  width: 100% !important;
}

.spa-view.active {
  display: block !important;
  opacity: 1 !important;
}


/* ─── 31. CURSOR HOVER FOR 4 NAV BUTTONS (Solid Circle + White Text) ─── */
.custom-cursor.hover-nav-button {
  width: 70px !important;
  height: 70px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
  transition: background-color 0.2s, transform 0.2s !important;
  cursor: none !important;
}

.custom-cursor.hover-nav-button[data-color="blue"] {
  background-color: #1D5BFE !important;
}
.custom-cursor.hover-nav-button[data-color="turquoise"] {
  background-color: #14b8a6 !important;
}
.custom-cursor.hover-nav-button[data-color="purple"] {
  background-color: #8b5cf6 !important;
}
.custom-cursor.hover-nav-button[data-color="green"] {
  background-color: #10b981 !important;
}
.custom-cursor.hover-nav-button[data-color="teal-dark"] {
  background-color: #00997d !important;
}

/* ─── 33. FULL-WIDTH DIFFUSION BANNER IN IMPACTO Y DIFUSIÓN ─── */
.impacto-new-diffusion-banner {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  min-height: 110px !important;
  box-sizing: border-box !important;
  background-color: #00887d !important;
  border: none !important;
  outline: none !important;
  border-radius: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 16px 56px !important;
  position: relative !important;
  text-decoration: none !important;
  color: #ffffff !important;
  box-shadow: 0 10px 28px rgba(0, 136, 125, 0.22) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.dark-mode .impacto-new-diffusion-banner {
  background-color: #00887d !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
}

.impacto-new-diffusion-banner:hover {
  background-color: #ffffff !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  color: #00887d !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px rgba(0, 136, 125, 0.26) !important;
}

body.dark-mode .impacto-new-diffusion-banner:hover {
  background-color: #ffffff !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  color: #00887d !important;
}

.impacto-new-diffusion-banner .banner-icon-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 6px !important;
  color: #ffffff !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease !important;
}

.impacto-new-diffusion-banner:hover .banner-icon-wrapper {
  color: #00887d !important;
  transform: scale(1.08) rotate(3deg) !important;
}

.impacto-new-diffusion-banner .banner-plus-animated-icon {
  width: 44px !important;
  height: 44px !important;
  display: block !important;
}

@keyframes spinRingSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulsePlus {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes sparkleGlow {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.impacto-new-diffusion-banner .spin-ring {
  transform-origin: 26px 26px;
  animation: spinRingSlow 14s linear infinite;
}

.impacto-new-diffusion-banner .pulse-plus {
  transform-origin: 26px 26px;
  animation: pulsePlus 2.5s ease-in-out infinite;
}

.impacto-new-diffusion-banner .sparkle-1 {
  transform-origin: 40px 13px;
  animation: sparkleGlow 2.2s ease-in-out infinite;
}

.impacto-new-diffusion-banner .sparkle-2 {
  transform-origin: 12px 39px;
  animation: sparkleGlow 2.2s ease-in-out infinite 1.1s;
}

.impacto-new-diffusion-banner .banner-text-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
}

.impacto-new-diffusion-banner .banner-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #ffffff !important;
  margin: 0 !important;
  transition: color 0.3s ease !important;
  letter-spacing: -0.01em !important;
}

.impacto-new-diffusion-banner:hover .banner-title {
  color: #00887d !important;
}

.impacto-new-diffusion-banner .banner-desc {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 !important;
  transition: color 0.3s ease !important;
  max-width: 820px !important;
}

.impacto-new-diffusion-banner:hover .banner-desc {
  color: #374151 !important;
}

body.dark-mode .impacto-new-diffusion-banner:hover .banner-desc {
  color: #4b5563 !important;
}

.impacto-new-diffusion-banner .banner-arrow {
  position: absolute !important;
  right: 28px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 26px !important;
  color: #ffffff !important;
  transition: transform 0.3s ease, color 0.3s ease !important;
  pointer-events: none !important;
}

.impacto-new-diffusion-banner:hover .banner-arrow {
  color: #00887d !important;
  transform: translateY(-50%) translateX(6px) !important;
}

@media (max-width: 768px) {
  .impacto-new-diffusion-banner {
    padding: 16px 20px !important;
    min-height: 100px !important;
    border-radius: 16px !important;
  }
  .impacto-new-diffusion-banner .banner-arrow {
    display: none !important;
  }
  .impacto-new-diffusion-banner .banner-title {
    font-size: 16px !important;
  }
  .impacto-new-diffusion-banner .banner-desc {
    font-size: 12px !important;
  }
}

/* ─── 32. REDESIGNED PREMIUM RESOURCES CARD LAYOUT (No Image, Left border, Dashboard style) ─── */
.rec-card-redesign {
  position: relative !important;
  background: var(--color-bg-card-light) !important;
  border: 1px solid var(--color-border-light) !important;
  border-left: 6px solid #10b981 !important;
  border-radius: 16px !important;
  padding: 26px 24px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  min-height: 210px !important;
  width: 100% !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.015) !important;
  cursor: none !important;
}

body.dark-mode .rec-card-redesign {
  background: var(--color-bg-card-dark) !important;
  border-color: var(--color-border-dark) !important;
}

.rec-card-redesign:hover {
  background: #10b981 !important;
  border-left-color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25) !important;
  transform: translateY(-4px) !important;
}

.rec-card-redesign:hover .rec-card-tag-pill {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.rec-card-redesign:hover .rec-card-file-icon {
  color: #ffffff !important;
  opacity: 0.9 !important;
}

.rec-card-redesign:hover .rec-card-title {
  color: #ffffff !important;
}

.rec-card-redesign:hover .rec-card-desc {
  color: rgba(255, 255, 255, 0.92) !important;
}

body.dark-mode .rec-card-redesign:hover .rec-card-title {
  color: #ffffff !important;
}

body.dark-mode .rec-card-redesign:hover .rec-card-desc {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* ─── 33. OUTLINE TURQUOISE BUTTON (FOR DETAIL PAGE VOLVER) ─── */
.btn-outline-turquoise {
  background: transparent !important;
  color: #0d9488 !important;
  border: 1.5px solid #0d9488 !important;
  border-radius: 100px !important;
  padding: 8px 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.3s ease !important;
}
.btn-outline-turquoise:hover {
  background: #0d9488 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2) !important;
}
body.dark-mode .btn-outline-turquoise {
  color: #2dd4bf !important;
  border-color: #2dd4bf !important;
}
body.dark-mode .btn-outline-turquoise:hover {
  background: #2dd4bf !important;
  color: #0f172a !important;
}

/* ─── 34. LOCK TRANSFERENCIA CARD BOTTOM BOX LAYOUT ─── */
.trans-card-text-container {
  padding: 20px 12px 16px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-grow: 1 !important;
}

/* ─── 36. PROJECT PHASES ROW & CARDS (COMPACT & COLORIZED FASES) ─── */
#objetivos.page-section {
  padding-top: 80px !important;
  padding-bottom: 24px !important;
}

#objetivos .section-title-wrapper {
  margin-bottom: 16px !important;
}

#objetivos .decorative-progress-bar-container {
  margin-bottom: 20px !important;
}

.project-phases-row {
  display: flex !important;
  gap: 12px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .project-phases-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }
  .phase-card {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 110px !important;
    padding: 18px 20px !important;
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: center !important;
    border-radius: 14px !important;
  }
  .phase-badge {
    margin-bottom: 6px !important;
  }
  .phase-title {
    font-size: 16.5px !important;
    margin-bottom: 4px !important;
  }
  .phase-subtitle {
    font-size: 13.5px !important;
    line-height: 1.4 !important;
  }
  .phase-hover-text {
    padding: 16px 20px !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    text-align: left !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
}

.phase-card {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background: var(--color-bg-card-light) !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 16px 10px !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 180px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode .phase-card {
  background: var(--color-bg-card-dark) !important;
  border: none !important;
}

.phase-card:hover,
.phase-card.is-hovered {
  transform: translateY(-4px) !important;
  border: none !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
}

.phase-badge {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  margin-bottom: 8px !important;
  display: inline-block !important;
}

/* Individual Phase Badge Colors (Fase 1 -> Fase 5) */
.phase-card.phase-1 .phase-badge,
.phase-card:nth-child(1) .phase-badge {
  color: #1D5BFE !important;
  background: rgba(29, 91, 254, 0.12) !important;
}

.phase-card.phase-2 .phase-badge,
.phase-card:nth-child(2) .phase-badge {
  color: #14b8a6 !important;
  background: rgba(20, 184, 166, 0.12) !important;
}

.phase-card.phase-3 .phase-badge,
.phase-card:nth-child(3) .phase-badge {
  color: #0d9488 !important;
  background: rgba(13, 148, 136, 0.12) !important;
}

.phase-card.phase-4 .phase-badge,
.phase-card:nth-child(4) .phase-badge {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

.phase-card.phase-5 .phase-badge,
.phase-card:nth-child(5) .phase-badge {
  color: #059669 !important;
  background: rgba(5, 150, 105, 0.12) !important;
}

.phase-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--color-text-light) !important;
  margin: 0 0 4px 0 !important;
  line-height: 1.25 !important;
}

body.dark-mode .phase-title {
  color: var(--color-text-dark) !important;
}

.phase-subtitle {
  font-size: 13px !important;
  color: var(--color-text-muted-light) !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.phase-hover-text {
  position: absolute !important;
  inset: 0 !important;
  background: var(--color-blue) !important;
  color: #ffffff !important;
  padding: 12px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(100%) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 10 !important;
  pointer-events: none !important;
  overflow-y: auto !important;
}

.phase-card:hover .phase-hover-text,
.phase-card.is-hovered .phase-hover-text,
.phase-card:focus-within .phase-hover-text {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.phase-card.phase-1:hover .phase-hover-text,
.phase-card:nth-child(1):hover .phase-hover-text,
.phase-card.phase-1.is-hovered .phase-hover-text {
  background: #1D5BFE !important;
}
.phase-card.phase-1:hover,
.phase-card.phase-1.is-hovered {
  box-shadow: 0 10px 28px rgba(29, 91, 254, 0.25) !important;
}

.phase-card.phase-2:hover .phase-hover-text,
.phase-card:nth-child(2):hover .phase-hover-text,
.phase-card.phase-2.is-hovered .phase-hover-text {
  background: #14b8a6 !important;
}
.phase-card.phase-2:hover,
.phase-card.phase-2.is-hovered {
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.25) !important;
}

.phase-card.phase-3:hover .phase-hover-text,
.phase-card:nth-child(3):hover .phase-hover-text,
.phase-card.phase-3.is-hovered .phase-hover-text {
  background: #0d9488 !important;
}
.phase-card.phase-3:hover,
.phase-card.phase-3.is-hovered {
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.25) !important;
}

.phase-card.phase-4:hover .phase-hover-text,
.phase-card:nth-child(4):hover .phase-hover-text,
.phase-card.phase-4.is-hovered .phase-hover-text {
  background: #10b981 !important;
}
.phase-card.phase-4:hover,
.phase-card.phase-4.is-hovered {
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25) !important;
}

.phase-card.phase-5:hover .phase-hover-text,
.phase-card:nth-child(5):hover .phase-hover-text,
.phase-card.phase-5.is-hovered .phase-hover-text {
  background: #059669 !important;
}
.phase-card.phase-5:hover,
.phase-card.phase-5.is-hovered {
  border-color: #059669 !important;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.25) !important;
}

/* Explicit News Card hover overlay color by section type */
.news-card[data-type="actividades"]:hover .act-hover-overlay,
.news-card[data-type="actividad"]:hover .act-hover-overlay,
.news-card[data-cursor-color="blue"]:hover .act-hover-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  background: rgba(29, 91, 254, 0.96) !important;
}

.news-card[data-type="transferencia"]:hover .act-hover-overlay,
.news-card[data-cursor-color="turquoise"]:hover .act-hover-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  background: rgba(13, 148, 136, 0.96) !important;
}

/* ─── 37. RESPONSIVE GRID OVERFLOW PREVENTION & STRICT CENTERING ─── */
@media (max-width: 1100px) {
  .news-cards-grid, #activities-grid, .activities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: auto !important;
  }
  .news-cards-grid > *, #activities-grid > *, .activities-grid > * {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    height: auto !important;
    min-height: 240px !important;
  }
  .team-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    column-count: auto !important;
  }
}

@media (max-width: 650px) {
  .news-cards-grid, #activities-grid, .activities-grid, .transferencia-grid {
    grid-template-columns: 1fr !important;
  }
  .team-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px 10px !important;
    column-count: auto !important;
  }
}

.section-container, 
.hero-body-container, 
.footer-container,
.hero-intro-container,
.page-submenu-container {
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  width: 92% !important;
  max-width: 1200px !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.project-desc-layout {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* ─── 16. POST COLLABORATORS SHOWCASE GRID ─── */
.post-collaborators-showcase {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  width: 100%;
  box-sizing: border-box;
}

.collaborators-title {
  font-size: 19px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 28px !important;
  text-align: center !important;
  letter-spacing: -0.2px;
}

.collaborators-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 28px 20px !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 920px !important;
}

.collab-member-card {
  flex: 0 1 140px !important;
  width: 140px !important;
  max-width: 155px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.collab-member-card:hover {
  transform: translateY(-5px) !important;
}

@media (max-width: 640px) {
  .collaborators-grid {
    gap: 20px 12px !important;
  }
  .collab-member-card {
    flex: 0 1 130px !important;
    width: 130px !important;
  }
}

.collab-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: none !important;
  outline: none !important;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.collab-member-card:hover .collab-avatar-wrapper {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.collab-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collab-member-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 12px;
  line-height: 1.35;
  font-family: var(--font-primary, sans-serif);
  text-align: center;
}

/* ─── 17. MEMBER MODAL ASSOCIATED POST BOXES WITH CATEGORY HOVER COLORS ─── */
.member-associated-posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.member-post-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.member-post-type-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.member-post-title-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #1e293b;
  transition: color 0.25s ease;
}

/* 1. PUBLICACIÓN -> Lila (#8b5cf6) */
.box-type-publicacion {
  border-left: 4.5px solid #8b5cf6 !important;
}
.box-type-publicacion .member-post-type-badge {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.box-type-publicacion:hover {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3) !important;
  transform: translateY(-2px);
}
.box-type-publicacion:hover .member-post-type-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.box-type-publicacion:hover .member-post-title-text {
  color: #ffffff !important;
}

/* 2. ACTIVIDAD -> Azul (#1d5bfe) */
.box-type-actividad {
  border-left: 4.5px solid #1d5bfe !important;
}
.box-type-actividad .member-post-type-badge {
  background: rgba(29, 91, 254, 0.12);
  color: #1d5bfe;
}
.box-type-actividad:hover {
  background: #1d5bfe !important;
  border-color: #1d5bfe !important;
  box-shadow: 0 8px 20px rgba(29, 91, 254, 0.3) !important;
  transform: translateY(-2px);
}
.box-type-actividad:hover .member-post-type-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.box-type-actividad:hover .member-post-title-text {
  color: #ffffff !important;
}

/* 3. TRANSFERENCIA -> Turquesa (#14b8a6) */
.box-type-transferencia {
  border-left: 4.5px solid #14b8a6 !important;
}
.box-type-transferencia .member-post-type-badge {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
}
.box-type-transferencia:hover {
  background: #14b8a6 !important;
  border-color: #14b8a6 !important;
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3) !important;
  transform: translateY(-2px);
}
.box-type-transferencia:hover .member-post-type-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.box-type-transferencia:hover .member-post-title-text {
  color: #ffffff !important;
}

/* 4. RECURSO -> Verde (#10b981) */
.box-type-recurso {
  border-left: 4.5px solid #10b981 !important;
}
.box-type-recurso .member-post-type-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.box-type-recurso:hover {
  background: #10b981 !important;
  border-color: #10b981 !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
  transform: translateY(-2px);
}
.box-type-recurso:hover .member-post-type-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.box-type-recurso:hover .member-post-title-text {
  color: #ffffff !important;
}

/* ─── 18. WORDPRESS GALLERY SHORTCODE & GUTENBERG BLOCK STYLES ─── */
.gallery,
.wp-block-gallery,
.custom-wp-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin: 28px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.gallery-columns-1,
.wp-block-gallery.columns-1 {
  grid-template-columns: 1fr !important;
}

.gallery-columns-2,
.wp-block-gallery.columns-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
}

.gallery-item,
.wp-block-gallery .wp-block-image {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
  background: #ffffff !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.gallery-item:hover,
.wp-block-gallery .wp-block-image:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14) !important;
}

.gallery-icon img,
.gallery-item img,
.wp-block-gallery img {
  width: 100% !important;
  height: auto !important;
  max-height: 520px !important;
  object-fit: cover !important;
  display: block !important;
  border: none !important;
  border-radius: 16px !important;
}

.gallery-caption,
.wp-element-caption {
  font-size: 13px !important;
  color: #64748b !important;
  text-align: center !important;
  padding: 8px 12px !important;
  font-weight: 550 !important;
}

/* ─── 19. UNIVERSAL POST HOVER WHITE TEXT ENFORCEMENT ─── */
.activity-card:hover .act-hover-overlay,
.activity-card:hover .act-hover-overlay *,
.activity-card:hover .act-hover-tag,
.activity-card:hover .act-hover-date,
.activity-card:hover .act-card-author,
.activity-card:hover .collab-member-name,
.news-card:hover .act-hover-overlay,
.news-card:hover .act-hover-overlay *,
.news-card:hover .act-hover-tag,
.news-card:hover .act-hover-date,
.news-card:hover .news-card-author,
.news-card:hover .collab-member-name,
.rec-card:hover *,
.rec-card-redesign:hover *,
.rec-card-redesign:hover .rec-card-author,
.rec-card-redesign:hover .collab-member-name {
  color: #ffffff !important;
}

.green-tint-modal .activity-detail-lorem a.btn-primary,
.green-tint-modal a.btn-primary {
  background: var(--color-green) !important;
  border-color: var(--color-green) !important;
  color: #ffffff !important;
}

.green-tint-modal a:empty,
#details-modal.green-tint-modal a:empty {
  display: none !important;
}

/* ─── 20. COOKIE CONSENT BANNER ─── */
#coplitele-cookie-banner {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  right: 24px !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px !important;
  padding: 20px 24px !important;
  z-index: 999999 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s !important;
  visibility: visible !important;
  box-sizing: border-box !important;
}

#coplitele-cookie-banner.cookie-banner-hidden {
  opacity: 0 !important;
  transform: translateY(40px) scale(0.97) !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.cookie-banner-container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
}

.cookie-banner-content {
  flex: 1 1 500px !important;
}

.cookie-banner-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.cookie-icon {
  font-size: 20px !important;
  line-height: 1 !important;
}

.cookie-banner-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  font-family: var(--font-primary) !important;
}

.cookie-banner-text {
  margin: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

.cookie-banner-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.cookie-btn {
  font-family: var(--font-primary) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.cookie-btn-accept {
  background: var(--color-blue, #1d5bfe) !important;
  color: #ffffff !important;
  border: 1px solid var(--color-blue, #1d5bfe) !important;
  box-shadow: 0 4px 14px rgba(29, 91, 254, 0.35) !important;
}

.cookie-btn-accept:hover {
  background: #1447d1 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(29, 91, 254, 0.45) !important;
}

.cookie-btn-essential {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cookie-btn-essential:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.cookie-btn-info {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid transparent !important;
}

.cookie-btn-info:hover {
  color: #60a5fa !important;
  text-decoration: underline !important;
}

@media (max-width: 768px) {
  #coplitele-cookie-banner {
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    padding: 16px !important;
  }
  .cookie-banner-actions {
    width: 100% !important;
    flex-direction: column !important;
  }
  .cookie-btn {
    width: 100% !important;
    text-align: center !important;
  }
}
