:root {
    --primary-blue: #002D5A; /* Deep Blue from LADUM logo */
    --accent-blue: #004B87; /* Unimagdalena Blue */
    --emerald: #8DC63F; /* Exact Lime Green from LADUM logo */
    --ochre: #FAA51A; /* Adjusted Ochre for better synergy with lime */
    --secondary-orange: #FF8C00; /* Vibrant orange for highlights and alerts */
    --light-bg: #F0F4F8; /* Soft blueish gray for subtle depth */
    --dark-text: #0A192F; /* Very deep blue for text */
    --gray-text: #506680; /* Muted steel gray */
    --white: #ffffff;
    --glass-white: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.15), 0 10px 10px -5px rgba(0,0,0,0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    
    /* Axes Visual IDs */
    --axis-demografico: #4DEEE1; /* Bright Cyan/Social */
    --axis-economico: #3D5AFE; /* Professional Blue/Finances */
    --axis-ambiental: #00E676; /* Vibrant Green/Nature */
    --axis-transversal: #FFEA00; /* Energetic Yellow/Global */

    /* Type Badges */
    --badge-boletin: #FF4081; /* Pinkish-Red */
    --badge-dashboard: #F50057; /* Magenta */
    --badge-informe: #304FFE; /* Deep Blue */
    --badge-investigacion: #76FF03; /* Lime */

    /* Typography scale */
    --fs-h1-hero: clamp(3.2rem, 8vw, 4.5rem);
    --fs-h2-section: 2.5rem;
    --fs-h3-card: 1.4rem;
    --fs-body: 1rem;
    --fs-small: 0.85rem;
    
    /* Layout */
    --section-padding: 80px 10%;
    --container-max-width: 1240px;

    /* Background Themes */
    --ladum-page-bg: #F8FAFC; /* color de página del sitio público; el fondo de nodos vive en data-background.css */
    --bg-color: var(--ladum-page-bg);
    --text-color: var(--dark-text);
    --card-bg: var(--white);
    --card-bg-glass: rgba(255, 255, 255, 0.95);
    
    /* Transparent Sections */
    --section-bg-white: rgba(255, 255, 255, 0.65);
    --section-bg-blue: rgba(0, 45, 90, 0.75);
    --section-text-blue-title: #ffffff;
    --section-text-blue-body: #E2E8F0;

}

html {
    scroll-behavior: smooth;
    background-color: var(--primary-blue);
    overflow-x: hidden;
    width: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

h1, h2, h3, .brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.5s ease;
}

/* Theme Switcher Styles */
.theme-switcher-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
    align-items: center;
}

.theme-switcher-container .theme-btn.main-toggle {
    background: var(--primary-blue);
    color: var(--emerald);
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.theme-switcher-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.theme-switcher-options.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--dark-text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.theme-btn:hover {
    transform: scale(1.1);
    background: var(--emerald);
    color: var(--white);
}

.theme-btn:nth-child(2) {
    background: #0B1120;
    color: var(--emerald);
    border: 1px solid var(--emerald);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; /* Retained from original */
    justify-content: center; /* Retained from original */
    align-items: center; /* Retained from original */
}

.nav-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav.scrolled {
    background: var(--primary-blue);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

nav .brand-container {
    display: flex;
    align-items: center;
}

/* Logo: el PNG ya tiene fondo transparente. Sin mix-blend-mode: con
   «lighten» el logo blanco desaparecía en algunos equipos cuando el
   compositor lo mezclaba contra una capa clara. */
.brand-container img, .ft-logo {
    transition: filter 0.3s ease;
    filter: contrast(1.1);
}

nav .links {
    display: flex;
    gap: 2.5rem;
    align-items: center; /* Ensures dropdown and links are on the same line */
}

nav .links .admin-entry {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.06);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

nav.scrolled .links .admin-entry {
    color: var(--primary-blue);
    border-color: rgba(0,45,90,.2);
    background: rgba(0,45,90,.045);
}

nav .links .admin-entry:hover,
nav.scrolled .links .admin-entry:hover {
    color: white;
    border-color: var(--emerald);
    background: var(--primary-blue);
    transform: translateY(-2px);
}

nav .links .admin-entry::after { display: none; }
nav .links .admin-entry span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.nav-item-dropdown {
    display: flex;
    align-items: center;
}

nav .links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease; /* Improved transition for links */
    position: relative;
    opacity: 0.8;
    display: flex;
    align-items: center;
}

nav .links a:hover,
nav .links a.active {
    color: var(--emerald);
    opacity: 1;
}

nav .links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--emerald);
    transition: all 0.3s ease; /* Improved transition for links */
}

nav .links a:hover::after,
nav .links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at 70% 30%, var(--accent-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 180px 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
}

.hero .hero-content {
    z-index: 2;
    width: 100%;
    max-width: var(--container-max-width);
    padding: 0 20px;
}

.hero h1.hero-title-main {
    font-size: 3.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero h1.hero-title-accent {
    font-size: 4.2rem;
    color: var(--emerald);
    margin-top: 0;
    line-height: 1.1;
}

.hero p.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.7);
    margin-top: 2rem;
    margin-bottom: 3rem;
    max-width: 800px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    z-index: 1;
}

/* Sections & Layout */
section {
    padding: 20px 0;
    position: relative;
    width: 100%;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Transparent Sections & Color Dividers */
section {
    background-color: transparent !important;
    position: relative;
    padding: 20px 0;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--emerald), var(--primary-blue), var(--emerald), transparent);
    border-radius: 4px;
    z-index: 10;
    opacity: 0;
}

section.active::before,
section:has(.reveal.active)::before {
    animation: transitionLineFlash 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes transitionLineFlash {
    0% { width: 0; opacity: 1; }
    50% { width: 400px; opacity: 1; }
    100% { width: 600px; opacity: 0; }
}

/* Base Homogenization for Sections */
section.bg-white, section.bg-light, #nosotros, #actualidad, #servicios, #herramientas, #equipo, #identidad { 
    background-color: transparent !important;
    background-image: none !important;
}

/* Float section containers like UI Boxes */
#nosotros .essence-container,
#actualidad > .container,
#servicios > .container,
#herramientas > .container,
#equipo > .container {
    padding: 50px 30px;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

#nosotros .essence-container:hover,
#actualidad > .container:hover,
#servicios > .container:hover,
#herramientas > .container:hover,
#equipo > .container:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* White Inner Containers */
#nosotros .essence-container,
#servicios > .container,
#equipo > .container {
    background-color: var(--section-bg-white) !important;
}

/* Blue Inner Containers */
#actualidad > .container,
#herramientas > .container {
    background-color: var(--section-bg-blue) !important;
    color: var(--section-text-blue-body);
}

/* Ensure Text Contrast in Blue Containers */
#actualidad > .container .section-title,
#actualidad > .container .section-subtitle-small,
#herramientas > .container .section-title {
    color: var(--section-text-blue-title) !important;
}

#actualidad > .container > p,
#actualidad > .container > div > p:not(.news-card p):not(.notice-card p),
#herramientas > .container > p {
    color: var(--section-text-blue-body) !important;
}

#identidad { background: transparent !important; z-index: 20; }

.section-overlap {
    margin-top: -120px;
    z-index: 10;
    padding-top: 0;
}

.identity-summary-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: var(--fs-h2-section);
    font-weight: 900;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 15px;
}

/* Page Headers (Subpages) */
.page-header {
    background: var(--primary-blue);
    padding: 150px 10% 80px;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 900;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--emerald);
    border-radius: 2px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--primary-blue);
    transition: var(--transition-smooth);
    z-index: 5;
}

.service-card:hover::after {
    width: 100%;
}

.service-card .card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

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

.service-card .card-icon {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 140px;
    transform: translateX(-50%);
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
    color: var(--emerald); /* Green by default */
    font-size: 2rem;
    z-index: 10;
    transition: var(--transition-smooth);
}

.service-card:hover .card-icon {
    background: var(--light-bg);
    color: var(--emerald);
    transform: translateX(-50%) translateY(-5px);
    border-color: var(--primary-blue); /* Fill "tails" (borders) with blue-ish vibe */
}

.service-card .card-content {
    padding: 60px 2rem 2.5rem;
    padding: 60px 2.5rem 2.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
    font-size: 1.6rem;
    line-height: 1.3;
}

.service-card p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

.service-card.skeleton {
    min-height: 260px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
    position: relative;
}

.service-card.skeleton::after,
.service-card.skeleton::before {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    height: 14px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

.service-card.skeleton::after { top: 40%; }
.service-card.skeleton::before { top: 50%; width: 60%; }

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.service-modal[style*="display: block"],
.service-modal[style*="display: flex"] {
    display: flex !important;
}

.service-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 25, 55, 0.72);
    backdrop-filter: blur(8px);
}

.service-modal__content {
    position: relative;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    margin: auto;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: 1fr;
}

.service-modal__cover {
    min-height: 260px;
    background-size: cover;
    background-position: center;
}

.service-modal__cover--placeholder {
    background: linear-gradient(135deg, #002d5a, #014a80);
}

.service-modal__body {
    padding: 24px;
    display: grid;
    gap: 12px;
    overflow-wrap: anywhere;
}

.service-modal__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.service-modal__price {
    color: var(--emerald);
    font-weight: 800;
    margin: 0;
}

.service-modal__summary {
    margin: 0;
    color: var(--gray-text);
}

.service-modal__specs {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--dark-text);
}

.service-modal__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.service-modal__close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: none;
    background: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .service-modal__content {
        margin: 40px 12px;
    }
}

/* Repository Section */
.repository-container {
    max-width: 1400px;
    margin: 0 auto;
}

.repo-axis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 22px;
    align-items: stretch;
    margin-top: 22px;
}

.axis-card {
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.axis-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.axis-card__image {
    height: 260px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.axis-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.00), rgba(0,0,0,0.20));
}

.axis-card__icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -28px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 12px 28px rgba(0,0,0,0.14);
    display: grid;
    place-items: center;
    border: 4px solid rgba(255,255,255,0.7);
    z-index: 3;
}

.axis-card__icon span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 1.1rem;
}

.axis-card__body {
    padding: 44px 22px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.axis-card__title {
    margin: 0;
    color: var(--primary-blue);
    font-weight: 900;
    font-size: 1.35rem;
}

.axis-card__desc {
    margin: 0;
    color: var(--gray-text);
    line-height: 1.55;
    font-size: 0.95rem;
}

.axis-card__cta {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: center;
}

.axis-card__cta .btn-primary-premium {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.axis-icon-demografico span { background: var(--axis-demografico); }
.axis-icon-economico span { background: var(--axis-economico); }
.axis-icon-ambiental span { background: var(--axis-ambiental); }
.axis-icon-transversal span { background: var(--axis-transversal); color: #0b2a3a; }

.repo-breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--gray-text);
    font-weight: 800;
    letter-spacing: 0.2px;
}

.repo-breadcrumbs a {
    color: var(--primary-blue);
    text-decoration: none;
}

.repo-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Repositorio ↔ Equipo: filtro activo por integrante y autores enlazados */
.repo-member-banner {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.repo-member-banner__chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #eef4fb;
    border: 1px solid #dbe6f4;
    color: var(--primary-blue);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 600;
}

.repo-member-banner__meta {
    color: var(--gray-text);
    font-weight: 500;
}

.repo-member-banner__meta::before {
    content: '·';
    margin: 0 4px 0 2px;
}

.repo-member-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.repo-member-banner__link:hover,
.repo-member-banner__link:focus-visible {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.repo-team {
    margin-top: 16px;
    background: white;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
}

.repo-team__title {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.repo-team__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.repo-team__member {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 12px 8px 8px;
    border-radius: 12px;
    border: 1px solid #e3e8ef;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.repo-team__member:hover,
.repo-team__member:focus-visible {
    border-color: rgba(0,75,135,0.4);
    background: #f8fafc;
}

.repo-team__member > i {
    color: var(--gray-text);
    font-size: 0.75rem;
}

.repo-team__photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: var(--light-bg);
    border: 2px solid white;
    box-shadow: 0 0 0 1px #e3e8ef;
}

.repo-team__photo--initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary-blue);
}

.repo-team__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.repo-team__name {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 0.92rem;
}

.repo-team__sub {
    font-size: 0.78rem;
    color: var(--gray-text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pub-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
    background: white;
    padding: 12px 14px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
}

.pub-toolbar input[type="search"] {
    flex: 1;
    min-width: 220px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    outline: none;
}

.pub-toolbar select {
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
    outline: none;
    cursor: pointer;
}

.pub-list {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.pub-item {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 14px;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    transition: var(--transition-smooth);
    color: inherit;
}

.pub-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pub-thumb {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.08);
}

.pub-meta {
    min-width: 0;
}

.pub-meta .pub-title {
    margin: 0;
    font-weight: 900;
    color: var(--primary-blue);
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pub-meta .pub-sub {
    margin-top: 6px;
    color: var(--gray-text);
    font-size: 0.85rem;
    font-weight: 700;
}

.tag-row {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0b2a3a;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
}

.pub-action {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-text);
    font-weight: 900;
    white-space: nowrap;
}

.repo-viewer {
    margin-top: 16px;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.08);
}

.repo-viewer__head {
    padding: 16px 16px 14px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.repo-viewer__head h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: 900;
}

.repo-viewer__frame {
    width: 100%;
    height: min(75vh, 820px);
    border: none;
    display: block;
    background: #0b2a3a;
}

@media (max-width: 1100px) {
    .repo-axis-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
    .axis-card { min-height: 520px; }
}

@media (max-width: 640px) {
    .repo-axis-grid { grid-template-columns: 1fr; }
    .pub-item { grid-template-columns: 70px 1fr; }
    .pub-thumb { width: 70px; height: 70px; border-radius: 12px; }
    .pub-action { display: none; }
}

.reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.report-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}

.report-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.report-card.axis-demografico { border-top: 5px solid var(--axis-demografico); }
.report-card.axis-economico { border-top: 5px solid var(--axis-economico); }
.report-card.axis-ambiental { border-top: 5px solid var(--axis-ambiental); }
.report-card.axis-transversal { border-top: 5px solid var(--axis-transversal); }

.report-card .cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.report-card .type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    z-index: 5;
    letter-spacing: 0.5px;
}

.badge-boletin { background: var(--badge-boletin) !important; color: white !important; }
.badge-reporte-dashboard { background: var(--badge-dashboard) !important; color: white !important; }
.badge-informe-tecnico { background: var(--badge-informe) !important; color: white !important; }
.badge-investigacion { background: var(--badge-investigacion) !important; color: var(--dark-text) !important; } /* Lime green needs dark text */

.report-card .info {
    padding: 1.5rem;
    flex-grow: 1;
}

.report-card .date {
    color: var(--emerald);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.report-card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    color: var(--primary-blue);
}

.report-card .actions {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

/* Repository and Utility Styles */
.btn-primary-premium {
    background: var(--emerald);
    color: var(--dark-text);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(0, 150, 136, 0.2);
    display: inline-block;
}

.btn-primary-premium:hover {
    background: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 75, 135, 0.3);
}

.btn-outline-premium {
    background: transparent;
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-outline-premium:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    transform: translateY(-3px);
}

/* Values Section */
.value-card {
    background: var(--card-bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.8rem 1.6rem;
    border-radius: 16px;
    text-align: left;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 5px solid var(--emerald); /* Accent bar */
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(141, 198, 63, 0.03) 0%, transparent 100%);
    z-index: 0;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    background: var(--white);
    border-left-width: 8px; /* Dynamic thickening */
}

.value-card i {
    display: flex; 
    font-size: 1.3rem;
    color: var(--primary-blue);
    background: var(--light-bg);
    min-width: 44px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    z-index: 1;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.value-card:hover i {
    background: var(--emerald);
    color: var(--white);
    transform: scale(1.1);
}

.value-card h3 {
    margin: 0 0 0.8rem 0;
    color: var(--primary-blue);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    z-index: 1;
    position: relative;
}

.value-card .card-text {
    z-index: 1;
    position: relative;
}

.value-card p {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.6;
    font-weight: 400;
}

/* Essence & Identity Sections */
.essence-container {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 60px 0;
}

.essence-container p {
    font-size: 1.2rem;
    color: var(--gray-text);
    line-height: 1.8;
    position: relative;
    padding: 0 40px;
}

.essence-container p::before,
.essence-container p::after {
    content: '"';
    font-family: 'Montserrat', serif;
    font-size: 4rem;
    color: var(--emerald);
    opacity: 0.2;
    position: absolute;
}

.essence-container p::before { top: -20px; left: 0; }
.essence-container p::after { bottom: -60px; right: 0; }

.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 50px;
}

.identity-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border-bottom: 5px solid var(--emerald);
    transition: var(--transition-smooth);
}

.identity-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.identity-card h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.identity-card h3 i {
    color: var(--emerald);
    font-size: 1.4rem;
}

.identity-card p {
    color: var(--gray-text);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.objectives-list {
    list-style: none;
    text-align: left;
}

.objectives-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--dark-text);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.objectives-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--emerald);
}

/* Team Section */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 60px;
}

.team-grid .team-card {
    width: calc(33.333% - 2rem);
    min-width: 280px;
    box-sizing: border-box;
}

.team-card {
    text-align: center;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-img-placeholder {
    width: 180px;
    height: 180px;
    background: var(--light-bg);
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gray-text);
    border: 6px solid var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.team-card h3 {
    color: var(--primary-blue);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.team-card span {
    color: var(--emerald);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.team-card p {
    font-size: 0.9rem;
    color: var(--gray-text);
}

/* ==========================================================================
   Footer (mismo marcado en todas las páginas públicas)
   --------------------------------------------------------------------------
   Cuatro columnas en escritorio: marca · Explora · Contacto · Redes.
   Azul institucional, texto blanco, verde solo en títulos e iconos. Dos
   constelaciones de nodos en las esquinas, por pseudo-elemento, muy tenues.
   ========================================================================== */

.main-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: clamp(56px, 6vw, 84px) 0 28px;
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}

.main-footer::before,
.main-footer::after {
    content: '';
    position: absolute;
    z-index: 0;
    width: 320px;
    height: 320px;
    pointer-events: none;
    opacity: 0.55;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%234FC3F7' stroke-opacity='.22' stroke-width='.6'%3E%3Cpath d='M12 18 40 42 72 30M40 42 56 76 88 84M72 30 90 58'/%3E%3Cg fill='%234FC3F7' fill-opacity='.35' stroke='none'%3E%3Ccircle cx='12' cy='18' r='2.2'/%3E%3Ccircle cx='40' cy='42' r='3'/%3E%3Ccircle cx='72' cy='30' r='1.8'/%3E%3Ccircle cx='56' cy='76' r='2.2'/%3E%3Ccircle cx='88' cy='84' r='1.6'/%3E%3Ccircle cx='90' cy='58' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.main-footer::before { top: -40px; left: -60px; }
.main-footer::after { right: -50px; bottom: -70px; transform: rotate(180deg); }

.ft-wrap {
    position: relative;
    z-index: 1;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.ft-grid {
    display: grid;
    /* Contacto necesita más ancho: lleva correos institucionales largos. */
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.7fr) minmax(0, 1.3fr) minmax(0, 0.8fr);
    gap: 40px clamp(24px, 3vw, 48px);
    padding-bottom: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* `nav` a secas está estilizado como barra fija (arriba en este archivo); aquí es una columna. */
.main-footer nav.ft-col {
    position: static;
    width: auto;
    display: block;
    padding: 0;
    background: none;
    box-shadow: none;
    z-index: auto;
}

.ft-logo {
    display: block;
    height: 64px;
    width: auto;
    margin-bottom: 22px;
}

.ft-brand__text {
    margin: 0;
    max-width: 34ch;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.ft-brand__text strong { color: #fff; font-weight: 600; }

.ft-title {
    position: relative;
    margin: 0 0 20px;
    padding-left: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--emerald);
}

.ft-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    border-radius: 2px;
    background: var(--emerald);
}

.ft-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ft-list a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.25s ease, transform 0.25s ease;
}

.ft-list a:hover,
.ft-list a:focus-visible { color: #fff; transform: translateX(2px); }

.ft-list i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--emerald);
    flex: 0 0 auto;
}

.ft-social i { font-size: 1.05rem; }
.ft-contact a { align-items: flex-start; }
.ft-contact span, .ft-contact a { overflow-wrap: anywhere; }

/* Franja inferior: copyright · lema · legales · crédito de desarrollo */
.ft-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    justify-content: space-between;
    align-items: start;
    gap: 18px 26px;
    padding-top: 26px;
    font-size: 0.84rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
}

.ft-bottom p { margin: 0; }

.ft-tagline {
    position: relative;
    padding-left: 18px;
    white-space: nowrap;
    font-style: italic;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.78);
}

.ft-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
}

/* Columna de marca: línea verde y frase */
.ft-rule {
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 2px;
    margin: 22px 0 16px;
    background: var(--emerald);
}
.ft-brand__claim {
    margin: 0;
    max-width: 32ch;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

/* Legales y crédito */
.ft-legal {
    list-style: none;
    margin: 0;
    padding: 0 0 0 18px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}
.ft-legal::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
}
.ft-legal li { white-space: nowrap; }
.ft-legal li + li::before {
    content: '|';
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.28);
}
.ft-legal a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.2s ease;
}
.ft-legal a:hover, .ft-legal a:focus-visible { color: var(--emerald); }

.ft-credit {
    position: relative;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-self: end;
    text-align: right;
}
.ft-credit::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
}
.ft-credit__label { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }
.ft-credit__row { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ft-credit__name { font-weight: 700; font-size: 0.92rem; color: rgba(255, 255, 255, 0.95); }
.ft-credit__icon {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.86rem;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.ft-credit__icon:hover, .ft-credit__icon:focus-visible {
    color: var(--emerald);
    border-color: rgba(141, 198, 63, 0.55);
    background: rgba(141, 198, 63, 0.12);
}
.ft-credit:hover .ft-credit__name { color: var(--emerald); }

/* Acceso al panel: discreto, en su propia línea */
.ft-panel { padding-top: 18px; text-align: right; }

@media (max-width: 1023px) {
    .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ft-brand { grid-column: 1 / -1; }
    .ft-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ft-credit { justify-self: start; text-align: left; padding-left: 0; }
    .ft-credit::before { display: none; }
    .ft-credit__row { justify-content: flex-start; }
}

@media (max-width: 640px) {
    .ft-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
    .ft-tagline { white-space: normal; }
    .ft-logo { height: 54px; }
    .ft-bottom { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ft-tagline, .ft-legal { padding-left: 0; }
    .ft-tagline::before, .ft-legal::before { display: none; }
    .ft-legal { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ft-legal li + li::before { display: none; }
    .ft-panel { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .ft-list a { transition: none; }
    .ft-list a:hover { transform: none; }
}

.institutional-seal {
    display: flex;
    align-items: center;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1, .hero p, .hero-btns {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero p { animation-delay: 0.2s; }
.hero-btns { animation-delay: 0.4s; }

/* Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    background: var(--primary-blue);
    border-radius: 12px 0 0 12px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    border-right: none;
}

.floating-sidebar a {
    color: var(--white);
    padding: 16px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    text-decoration: none;
}

.floating-sidebar a:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.floating-sidebar a:hover {
    background: var(--emerald);
    color: var(--dark-text);
    padding-right: 22px;
}

.floating-sidebar a::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 120%;
    background: var(--primary-blue);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.floating-sidebar a:hover::before {
    opacity: 1;
    right: 110%;
}

/* Repository System (Tabs) */
.repo-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 25px;
    border: 1px solid rgba(0, 45, 90, 0.1);
    background: rgba(0, 45, 90, 0.05); /* Soft dark background */
    color: var(--primary-blue); /* Visible text */
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: var(--emerald);
    color: var(--dark-text);
    border-color: var(--emerald);
}

/* News & Actualidad */
.actualidad-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1240px;
    margin: 0 auto;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.04);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.news-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.news-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-blue);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: bold;
}

.news-content {
    padding: 1.5rem;
}

.news-content h4 {
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    font-size: 1.15rem;
    line-height: 1.3;
}

.news-content p {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.news-link {
    color: var(--emerald);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-card--clickable {
    cursor: pointer;
}

/* News Modal */
.news-modal {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: none;
}

.news-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.news-modal__content {
    position: relative;
    max-width: 980px;
    margin: 60px auto;
    max-height: calc(100vh - 120px);
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    display: grid;
    gap: 0;
}

.news-modal__close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: none;
    background: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.news-modal__header {
    padding: 18px 20px 0 20px;
}

.news-modal__header h3 {
    margin: 0;
    color: var(--primary-blue);
}

.news-modal__date {
    margin: 6px 0 0 0;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.news-modal__gallery {
    position: relative;
    padding: 16px 20px 10px 20px;
    display: grid;
    gap: 12px;
}

.news-modal__main {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 72vh;
}

.news-modal__main img {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    display: block;
}

.news-modal__thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.news-modal__thumb {
    border: 1px solid rgba(0,0,0,0.08);
    background: white;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 10;
}

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

.news-modal__thumb.is-active {
    outline: 3px solid rgba(141, 198, 63, 0.5);
    border-color: rgba(141, 198, 63, 0.65);
}

.news-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}

.news-modal__nav:hover {
    background: rgba(0,0,0,0.7);
}

.news-modal__nav--prev { left: 24px; }
.news-modal__nav--next { right: 24px; }

.news-modal__body {
    padding: 6px 20px 22px 20px;
    display: grid;
    gap: 12px;
    overflow-wrap: anywhere;
}

.news-modal__body p {
    margin: 0;
    color: var(--gray-text);
}

.news-modal__links {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.news-modal__links a {
    color: var(--emerald);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .news-modal__content {
        margin: 40px 12px;
    }
    .news-modal__thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .news-modal__nav--prev { left: 16px; }
    .news-modal__nav--next { right: 16px; }
}

/* News Detail Page */
.news-detail-hero {
    position: relative;
    overflow: hidden;
}

.news-detail-hero__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1) contrast(1.05);
    transform: scale(1.05);
}

.news-detail-hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 26, 51, 0.92), rgba(0, 26, 51, 0.55));
}

.news-detail__state {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    color: var(--gray-text);
}

.news-detail {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.news-detail__topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.news-detail__title {
    margin: 0;
    color: var(--primary-blue);
    line-height: 1.2;
}

.news-detail__meta {
    margin-top: 10px;
    color: var(--gray-text);
    font-weight: 700;
    font-size: 0.9rem;
}

.news-detail__summary {
    margin: 14px 0 0 0;
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.05rem;
}

.news-detail__carousel {
    position: relative;
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.news-detail__main {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 72vh;
}

.news-detail__main img {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    display: block;
}

.news-detail__thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.news-detail__thumb {
    border: 1px solid rgba(0,0,0,0.08);
    background: white;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 10;
}

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

.news-detail__thumb.is-active {
    outline: 3px solid rgba(141, 198, 63, 0.5);
    border-color: rgba(141, 198, 63, 0.65);
}

.news-detail__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}

.news-detail__nav:hover { background: rgba(0,0,0,0.7); }
.news-detail__nav--prev { left: 18px; }
.news-detail__nav--next { right: 18px; }

.news-detail__body {
    margin-top: 14px;
    color: var(--gray-text);
    line-height: 1.7;
    font-size: 1rem;
    overflow-wrap: anywhere;
    text-align: justify;
}

.news-detail__body p,
.news-detail__body li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* Formato del cuerpo (assets/js/news-markdown.js): detalle, modal y vista previa del panel */
.news-detail__body p { margin: 0 0 14px; }
.news-detail__body > :last-child { margin-bottom: 0; }
.news-detail__body h3,
.news-modal__text h3 {
    margin: 22px 0 8px;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--primary-blue);
}
.news-detail__body > h3:first-child,
.news-modal__text > h3:first-child { margin-top: 0; }
.news-detail__body ul, .news-detail__body ol,
.news-modal__text ul, .news-modal__text ol { margin: 10px 0; padding-left: 22px; }
.news-detail__body li, .news-modal__text li { margin: 4px 0; }
.news-detail__body a, .news-modal__text a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.news-modal__text p { text-align: justify; hyphens: auto; }
.news-modal__body .news-modal__text > * + * { margin-top: 12px; }
.news-detail__body .nd-align-left,    .news-modal__text .nd-align-left    { text-align: left; }
.news-detail__body .nd-align-center,  .news-modal__text .nd-align-center  { text-align: center; }
.news-detail__body .nd-align-right,   .news-modal__text .nd-align-right   { text-align: right; }
.news-detail__body .nd-align-justify, .news-modal__text .nd-align-justify { text-align: justify; }

/* Admin (CMS) helpers */
.cms-admin .btn-outline-premium {
    background: rgba(255,255,255,0.95);
    color: var(--primary-blue);
    border-color: rgba(0, 26, 51, 0.18);
}

.cms-admin .btn-outline-premium:hover {
    background: rgba(0, 26, 51, 0.04);
    border-color: rgba(0, 26, 51, 0.35);
    transform: translateY(-2px);
}

.cms-admin code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 8px;
}

.news-detail__links-wrap {
    margin-top: 18px;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 16px;
}

.news-detail__links-title {
    margin: 0 0 10px 0;
    color: var(--primary-blue);
}

.news-detail__links {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.news-detail__links a {
    color: var(--emerald);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 900px) {
    .news-detail__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .news-detail__nav { top: 28%; }
}

@media (max-width: 640px) {
    .news-detail { padding: 16px; }
    .news-detail__thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sidebar: Events & Notices */
.sidebar-actualidad {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.section-subtitle-small {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--emerald);
    width: fit-content;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.event-item {
    display: flex;
    align-items: center; /* Centrado vertical de la caja de fecha y el texto */
    gap: 1rem;
    background: var(--white);
    padding: 0.5rem 0.8rem; /* Aún más delgado */
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    border-left: 4px solid var(--emerald); 
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.event-item:hover {
    transform: translateX(8px);
    box-shadow: 0 12px 25px rgba(141, 198, 63, 0.15);
}

.event-item.is-important {
    background: var(--white);
    border-left-width: 6px; /* Slightly thicker for importance */
    box-shadow: 0 4px 15px rgba(141, 198, 63, 0.1);
}

.event-item.is-important::after {
    content: 'DESTACADO';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.6rem;
    font-weight: 900;
    color: var(--emerald);
    letter-spacing: 1px;
    opacity: 0.8;
}

.event-date-box {
    background: var(--emerald);
    color: var(--dark-text);
    min-width: 45px; /* Ligeramente más angosto para ahorrar espacio lateral */
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    flex-shrink: 0; /* No se deforma */
    box-shadow: 0 4px 10px rgba(141, 198, 63, 0.2);
    transition: var(--transition-smooth);
}

.event-date-box span {
    font-size: 0.65rem;
    text-transform: uppercase;
    display: block;
    line-height: 1;
}

.event-date-box b {
    font-size: 1rem;
    display: block;
    margin-top: -2px;
}

.event-info h5 {
    font-size: 0.85rem; /* Título más pequeño para el diseño slim */
    margin: 0;
    color: var(--primary-blue);
    line-height: 1.2;
}

.event-info span {
    font-size: 0.75rem;
    color: var(--gray-text);
}

.notice-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #00152d 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.notice-card::before {
    content: '\f0a1'; /* Bullhorn */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 6rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.notice-card h5 {
    color: var(--emerald);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notice-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tools / Herramientas */
.tools-section {
    background: var(--white);
    padding: 80px 10%;
    text-align: center;
}

.tools-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 40px;
    opacity: 0.8;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
}

.tool-item:hover {
    transform: translateY(-5px);
    opacity: 1;
    color: var(--emerald);
}

.tool-item i {
    font-size: 3rem;
    color: var(--primary-blue);
    transition: var(--transition-smooth);
}

.tool-item:hover i {
    color: var(--emerald);
}

.tool-item span {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Order Adjustments */
#identidad { z-index: 20; }
#nosotros { background: var(--light-bg); } /* Esencia now lower, different bg */
#actualidad { background: var(--white); }
#servicios { background: var(--light-bg); }

@media (max-width: 768px) {
    .tools-grid { gap: 2rem; }
    .tool-item i { font-size: 2.2rem; }
}

.cms-stepper {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.step-circle.active {
    background: var(--primary-blue);
    color: var(--white);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e1e7ec;
    background: #f8fafc;
    font-size: 1rem;
}

/* Cover Preview */
.cover-preview {
    margin-top: 20px;
    text-align: center;
}

#cover-canvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--light-bg);
}

/* Responsiveness */
@media (max-width: 768px) {
    .floating-sidebar {
        bottom: 20px;
        top: auto;
        right: 10px;
        flex-direction: row;
        border-radius: 50px;
        padding: 5px;
        transform: none;
    }
    .floating-sidebar a {
        padding: 10px;
        font-size: 1.2rem;
    }
    .floating-sidebar a:not(:last-child) {
        border-bottom: none;
        border-right: 1px solid rgba(255,255,255,0.1);
    }
}

/* Navigation Dropdown Premium */
.nav-item-dropdown {
    position: relative;
    padding: 10px 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--white);
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 12px 0;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block !important;
    padding: 10px 25px !important;
    color: var(--primary-blue) !important;
    font-size: 0.85rem !important;
    text-transform: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border-bottom: none !important;
    text-align: left !important;
}

.dropdown-menu a::after {
    display: none !important;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--emerald) !important;
    padding-left: 30px !important;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0 !important;
    /* Usa una directiva inicial para forzar la posición de arranque, el CSS en línea o ID local lo respetará gracias al important */
    transform: translateY(60px) scale(0.98) !important;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    /* Transición maestra de entrada */
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Permitir que el Hover sobre escriba la transición de transform para que no sea lento */
.reveal.active:hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* Scroll Animation Delay Helpers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* Herramientas (Tools Grid) Custom Colors */
.tool-item {
    font-size: 3rem;
    color: #ffffff !important;
    background: transparent;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.tool-item img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.9);
    transition: all 0.3s ease;
}
.tool-item span {
    margin-top: 5px;
    color: var(--section-text-blue-body);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.tool-item:hover {
    transform: translateY(-8px);
}
.tool-item:hover img {
    /* Emerald Green filter approx #8DC63F */
    filter: brightness(0) saturate(100%) invert(67%) sepia(50%) saturate(542%) hue-rotate(42deg) brightness(97%) contrast(92%) drop-shadow(0 0 10px rgba(141, 198, 63, 0.4));
}
.tool-item:hover span {
    color: var(--emerald) !important;
}

.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }
.reveal-delay-8 { transition-delay: 0.8s; }
.reveal-delay-9 { transition-delay: 0.9s; }

.team-grid-six .team-card {
    width: calc(33.333% - 2rem);
    min-width: 260px;
}

.team-grid-six .team-card h3 {
    min-height: 68px;
}

.team-photo-frame {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 25px;
    padding: 6px;
    background: linear-gradient(145deg, rgba(141, 198, 63, 0.9), rgba(0, 75, 135, 0.85));
    box-shadow: var(--shadow-md);
}

.team-photo {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    background: var(--light-bg);
}

/* Las tarjetas del inicio enlazan al perfil público (/equipo/<slug>). */
a.team-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

a.team-card:focus-visible {
    outline: 3px solid var(--emerald);
    outline-offset: 4px;
}

.team-photo--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    color: var(--primary-blue);
}

.team-card__cta {
    margin-top: auto;
    padding-top: 18px;
    font-style: normal;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--accent-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.team-card__cta i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.team-card:hover .team-card__cta i {
    transform: translateX(4px);
}

.team-cta {
    text-align: center;
    margin-top: 50px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 1.2rem;
    margin-top: 44px;
    opacity: 1;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.tool-item {
    min-height: 146px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 14px;
    border-radius: 18px;
    gap: 12px;
}

.tool-item img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: none;
}

.tool-item span {
    margin-top: 0;
    color: var(--white);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}

.tool-item:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(141, 198, 63, 0.3);
}

.tool-item:hover img {
    filter: drop-shadow(0 0 10px rgba(141, 198, 63, 0.3));
}

.tool-item--text {
    justify-content: center;
}

.tool-badge {
    min-width: 70px;
    min-height: 70px;
    padding: 0 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tool-badge--python {
    background: linear-gradient(135deg, rgba(55, 118, 171, 0.95), rgba(255, 212, 59, 0.9));
    color: #0f2340;
}

.tool-badge--dash {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(215, 229, 244, 0.14));
}

.tool-badge--r {
    background: linear-gradient(135deg, rgba(92, 123, 153, 0.95), rgba(180, 205, 233, 0.9));
}

.tool-badge--dt {
    background: linear-gradient(135deg, rgba(157, 177, 198, 0.88), rgba(109, 138, 168, 0.88));
}

.tool-badge--sql {
    background: linear-gradient(135deg, rgba(113, 137, 163, 0.96), rgba(74, 95, 121, 0.92));
}

.tool-badge--powerbi {
    background: linear-gradient(135deg, rgba(255, 205, 0, 0.96), rgba(222, 164, 0, 0.92));
    color: #3b2c00;
}

.tool-badge--latex {
    background: linear-gradient(135deg, rgba(1, 96, 114, 0.94), rgba(0, 138, 160, 0.9));
}

.tool-badge--excel {
    background: linear-gradient(135deg, rgba(33, 115, 70, 0.96), rgba(27, 83, 50, 0.94));
}

.tool-badge--stata {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.35rem;
    background: linear-gradient(135deg, rgba(163, 176, 191, 0.96), rgba(123, 137, 153, 0.92));
}

@media (max-width: 992px) {
    .team-grid-six .team-card {
        width: calc(50% - 1.5rem);
    }
}

@media (max-width: 768px) {
    .team-grid-six .team-card {
        width: 100%;
        min-width: 0;
    }

    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 520px;
    }
}

@media (max-width: 520px) {
    .tools-grid {
        grid-template-columns: 1fr;
        max-width: 260px;
    }
}
.tool-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    width: 44px;
    height: 44px;
    display: block;
}

#herramientas .tools-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 980px;
}

#herramientas .tool-item {
    min-height: 124px;
    padding: 16px 12px;
    gap: 10px;
}

#herramientas .tool-item span {
    font-size: 0.86rem;
}

@media (max-width: 992px) {
    #herramientas .tools-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: 820px;
    }
}

@media (max-width: 768px) {
    #herramientas .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 640px;
    }
}

@media (max-width: 520px) {
    #herramientas .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 360px;
    }
}

.event-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 390px));
    justify-content: center;
    gap: 32px;
}

.event-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 45, 90, 0.08);
    border: 1px solid rgba(0, 45, 90, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 45, 90, 0.16);
}

.event-card__media {
    min-height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.event-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4DEEE1;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--white);
    z-index: 2;
}

.event-card__body {
    padding: 40px 24px 28px 24px;
    display: grid;
    gap: 14px;
    text-align: center;
}

.event-card__body h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.45rem;
}

.event-card__body p {
    margin: 0;
    color: var(--gray-text);
}

.event-card__date {
    color: var(--emerald);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.event-card__meta {
    display: grid;
    gap: 8px;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.event-card__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.event-action-secondary {
    color: var(--primary-blue);
    border-color: rgba(0, 45, 90, 0.18);
    background: rgba(0, 45, 90, 0.04);
}

.event-category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 45, 90, 0.88);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-video-badge {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-blue);
    font-size: 0.78rem;
    font-weight: 700;
}

.event-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.event-modal-user {
    color: var(--gray-text);
    font-size: 0.9rem;
    font-weight: 600;
}

.event-modal-meta {
    display: grid;
    gap: 10px;
    color: var(--gray-text);
    font-size: 0.95rem;
}

.event-form-modal .service-modal__content,
.event-form-modal {
    max-width: 960px;
}

.event-registration-form {
    display: grid;
    gap: 18px;
}

.event-form-section {
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
}

.event-form-section h4 {
    margin: 0 0 14px 0;
    color: var(--primary-blue);
    font-size: 1rem;
}

.event-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.event-form-grid input,
.event-form-grid select,
.event-form-section > input[type="file"],
.event-form-section > input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dbe3ec;
    background: var(--white);
    font-size: 0.95rem;
}

.event-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--dark-text);
    margin-bottom: 14px;
}

.event-inline-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
}

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

    .event-card__actions,
    .event-meta-top {
        flex-direction: column;
        align-items: stretch;
    }

    .service-modal__content {
        margin: 20px 12px;
        max-height: calc(100vh - 40px);
    }
    
    /* === MOBILE FIRST OVERRIDES === */

    /* 1. Global Typography Adjustments */
    :root {
        --fs-h1-hero: clamp(2.4rem, 8vw, 3rem);
        --fs-h2-section: 1.8rem;
        --fs-h3-card: 1.25rem;
        --fs-body: 1rem;
        --section-padding: 50px 5%;
    }

    .hero h1.hero-title-main { font-size: 2.5rem; line-height: 1.2; }
    .hero h1.hero-title-accent { font-size: 2.8rem; line-height: 1.2; margin-bottom: 20px; }
    .hero p.hero-subtitle { font-size: 1.1rem; margin-top: 1rem; margin-bottom: 2rem; }
    .page-header h1 { font-size: 2.2rem; }
    .page-header { padding: 100px 5% 50px; }
    .section-title { margin-bottom: 40px; }

    /* 2. Layout Adaptability (Fluid Single Columns) */
    .services-grid, 
    .team-grid-six, 
    .identity-summary-grid,
    .repo-axis-grid,
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    .actualidad-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        flex-direction: column;
    }
    
    #nosotros .essence-container,
    #actualidad > .container,
    #servicios > .container,
    #herramientas > .container,
    #equipo > .container {
        padding: 30px 20px;
    }

    /* 3. Mobile Navigation Layout */
    .mobile-menu-toggle {
        display: inline-flex;
        background: transparent;
        border: none;
        color: var(--white);
        font-size: 1.6rem;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        z-index: 1001; 
    }

    nav .links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--primary-blue);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.5rem;
        padding-top: 80px;
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    nav .links .admin-entry,
    nav.scrolled .links .admin-entry {
        width: auto;
        height: auto;
        padding: 11px 18px;
        border-radius: 999px;
        color: white;
        border-color: rgba(255,255,255,.3);
        background: rgba(255,255,255,.08);
        gap: 9px;
    }

    nav .links .admin-entry span {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    nav .links.mobile-active {
        right: 0;
    }

    /* Override nav layout */
    .nav-container {
        justify-content: space-between;
        padding: 0 15px;
    }

    /* Dropdown inside Mobile */
    .nav-item-dropdown {
        flex-direction: column;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        background: rgba(255,255,255,0.05);
        box-shadow: none;
        transform: none;
        padding: 10px 0;
        text-align: center;
        width: 100%;
        border-radius: 0;
    }
    
    .nav-item-dropdown.active .dropdown-menu {
        display: flex;
        flex-direction: column;
    }

    .nav-item-dropdown.active > a {
        color: var(--emerald);
    }
    
    /* Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,25,50,0.7);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero Buttons */
    .hero-btns {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    .hero-btns a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Touch Interaction & Hover Cleanup (Devices without hover capabilities) */
@media (hover: none) and (pointer: coarse) {
    /* Limit transition durations on touch devices to avoid ghost hover hanging */
    a, button, .theme-btn, .service-card, .team-card, .axis-card {
        transition-duration: 0.15s !important;
    }
    
    /* Replace hovers with active states for immediate tactile feedback */
    a:active, button:active, .theme-btn:active, .service-card:active {
        transform: scale(0.98) !important;
        opacity: 0.9;
        box-shadow: none !important;
    }
    
    /* Ensure Interactive Element Accessibility Minimum Area */
    .links a, .ft-social a, .slider-nav {
        min-height: 48px !important;
        min-width: 48px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hide hamburger toggle on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Encuesta cerrada: la accion sigue visible pero deja de ser un enlace. */
.event-survey-action.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
#event-modal-survey[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ==========================================================================
   Formulario de inscripción a eventos (assets/js/eventos-inscripcion.js)
   Recorrido por bloques, errores junto a cada campo y confirmación final.
   ========================================================================== */

.reg-form { gap: 16px; }
.reg-intro { margin: 0; font-size: .875rem; color: var(--gray-text); }
.reg-req { color: #B42318; font-weight: 700; }
.reg-opt { margin-left: 6px; font-size: .75rem; font-weight: 500; color: #7B8FA6; }
.reg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.reg-section { margin: 0; min-width: 0; }
.reg-legend {
    display: flex; align-items: center; gap: 10px; float: left; width: 100%;
    margin: 0 0 16px; padding: 0;
    font-size: 1rem; font-weight: 700; color: var(--primary-blue);
}
.reg-legend + * { clear: both; }
.reg-step {
    flex-shrink: 0; min-width: 26px; height: 26px; padding: 0 6px; box-sizing: border-box;
    display: inline-grid; place-items: center; border-radius: 999px;
    background: #E4ECF5; color: var(--primary-blue); font-size: .75rem; font-weight: 700;
}

.reg-grid { gap: 16px; }
.reg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reg-field--full { grid-column: 1 / -1; }
.reg-field[hidden] { display: none; }
.reg-label { font-size: .875rem; font-weight: 600; color: var(--dark-text, #0F2C4D); }
.reg-help { margin: 0; font-size: .8rem; line-height: 1.45; color: #6B7F93; }
.reg-error { margin: 0; font-size: .8rem; font-weight: 600; color: #B42318; }

.reg-form input[type="text"], .reg-form input[type="email"], .reg-form input[type="tel"],
.reg-form input[type="number"], .reg-form input[type="file"], .reg-form select {
    width: 100%; box-sizing: border-box; padding: 12px 14px;
    font: inherit; font-size: .95rem; color: var(--dark-text, #0F2C4D);
    background: #fff; border: 1px solid #D5DEE8; border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.reg-form input::placeholder { color: #9AA9B9; }
.reg-form input:focus, .reg-form select:focus {
    outline: none; border-color: #0E3A6B; box-shadow: 0 0 0 3px rgba(14, 58, 107, .15);
}
.reg-field--error input, .reg-field--error select, .reg-field--error .reg-checklist { border-color: #B42318; }
.reg-field--error input:focus, .reg-field--error select:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }

/* WhatsApp: indicativo + número */
.reg-phone { display: grid; grid-template-columns: minmax(0, 176px) minmax(0, 1fr); gap: 8px; }
.reg-form .reg-phone-code { padding-right: 8px; }
/* El error del WhatsApp es del número, no del indicativo. */
.reg-field--error .reg-phone-code { border-color: #D5DEE8; }

/* Casillas */
.reg-check { gap: 4px; }
.reg-check-label { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; line-height: 1.5; color: var(--dark-text, #0F2C4D); cursor: pointer; }
.reg-check-label input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #0E3A6B; }
.reg-check-label--compact { font-size: .85rem; }
.reg-policy { align-self: flex-start; margin-left: 28px; font-size: .85rem; font-weight: 600; color: var(--primary-blue); }
.reg-check .reg-help, .reg-check .reg-error { margin-left: 28px; }
.reg-check + .reg-check { margin-top: 12px; }
.reg-checklist {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px;
    max-height: 240px; overflow-y: auto; padding: 12px; background: #fff; border: 1px solid #D5DEE8; border-radius: 10px;
}

.reg-form-error {
    margin: 0; padding: 12px 14px; border-radius: 10px;
    background: #FEF3F2; border: 1px solid #F5C2BC; color: #912018; font-size: .875rem; font-weight: 600;
}
.reg-submit { justify-self: stretch; width: 100%; justify-content: center; border: 0; }
.reg-submit:disabled { opacity: .65; cursor: progress; transform: none; }

/* Confirmación */
.reg-success { display: grid; justify-items: center; gap: 12px; padding: 16px 8px 8px; text-align: center; outline: none; }
.reg-success-icon { font-size: 2.5rem; color: #4F8F3A; }
.reg-success h4 { margin: 0; font-size: 1.25rem; color: var(--primary-blue); }
.reg-success p { margin: 0; max-width: 480px; color: var(--gray-text); }
/* Código de inscripción en la confirmación: el mismo que llega por correo */
.reg-success .reg-codigo { display: grid; gap: 4px; padding: 12px 22px; border-radius: 10px; background: #F3F9EA; border: 1px solid #DCEBC4; }
.reg-success .reg-codigo span { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #6B7F93; }
.reg-success .reg-codigo strong { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 1.35rem; letter-spacing: .12em; color: var(--primary-blue); }
/* Fecha, hora y lugar del evento en la confirmación */
.reg-success .reg-fecha { font-weight: 600; color: var(--primary-blue); }
.reg-success .reg-fecha i { margin-right: 6px; color: #4F8F3A; }

@media (max-width: 768px) {
    .reg-phone { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); }
    .reg-checklist { grid-template-columns: minmax(0, 1fr); }
}
