/*
Theme Name: VINNEA Theme
Theme URI: https://vinnea.scinergics.com
Author: VINNEA Project
Author URI: https://vinnea.scinergics.com
Description: Tema oficial del proyecto europeo VINNEA — Viticultura INteligente mediante Nuevas herramientas digitales para la Enseñanza y el Apoyo a la toma de decisiones. INTERREG VI-A España-Francia-Andorra (POCTEFA 2021-2027).
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vinnea
*/

/* =============================================================================
   CSS CUSTOM PROPERTIES
============================================================================= */
:root {
    /* Brand colors from logo */
    --color-primary: #3A6952;
    --color-primary-dark: #2d5340;
    --color-primary-light: #4B8256;
    --color-accent: #77AD57;
    --color-accent-light: #79B15A;
    --color-accent-pale: #e8f4e8;

    /* Neutrals */
    --color-text: #3B3B47;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-white: #ffffff;
    --color-bg: #f8faf8;
    --color-bg-light: #f0f5f0;
    --color-border: #d8e8d8;

    /* Dark (footer) */
    --color-dark: #1e3328;
    --color-dark-mid: #2a4236;

    /* Typography */
    --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Inter', 'Segoe UI', system-ui, sans-serif;

    /* Spacing */
    --section-pad: 5rem;
    --container-max: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(58, 105, 82, 0.08);
    --shadow-md: 0 4px 20px rgba(58, 105, 82, 0.12);
    --shadow-lg: 0 8px 40px rgba(58, 105, 82, 0.16);
    --shadow-card: 0 2px 16px rgba(58, 105, 82, 0.1);

    /* Transitions */
    --trans: 0.3s ease;
    --trans-slow: 0.6s ease;
}

/* =============================================================================
   RESET & BASE
============================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--trans);
}

a:hover {
    color: var(--color-accent);
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.2;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   LAYOUT UTILITIES
============================================================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-pad) 0;
}

.section--gray {
    background: var(--color-bg);
}

.section--green-pale {
    background: var(--color-accent-pale);
}

.section--dark {
    background: var(--color-dark);
    color: var(--color-white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* =============================================================================
   SCROLL REVEAL ANIMATIONS
============================================================================= */
.vn-reveal {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.vn-reveal.is-visible {
    opacity: 1;
}

.vn-reveal-left {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.vn-reveal-left.is-visible {
    opacity: 1;
}

.vn-reveal-right {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.vn-reveal-right.is-visible {
    opacity: 1;
}

/* Stagger delay */
.vn-delay-1 {
    transition-delay: 0.1s;
}

.vn-delay-2 {
    transition-delay: 0.2s;
}

.vn-delay-3 {
    transition-delay: 0.3s;
}

.vn-delay-4 {
    transition-delay: 0.4s;
}

.vn-delay-5 {
    transition-delay: 0.5s;
}

/* =============================================================================
   BUTTONS
============================================================================= */
.vn-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--trans);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.vn-btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.vn-btn--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vn-btn--accent {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.vn-btn--accent:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.vn-btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.vn-btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.vn-btn--white {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.vn-btn--white:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.vn-btn--outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.6);
}

.vn-btn--outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-white);
    color: var(--color-white);
}

/* =============================================================================
   HEADER / NAVIGATION
============================================================================= */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--trans), background var(--trans);
}

#site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 1rem;
}

.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav>ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav>ul>li {
    position: relative;
}

.main-nav>ul>li>a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: all var(--trans);
    white-space: nowrap;
}

.main-nav>ul>li>a:hover,
.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a {
    color: var(--color-primary);
    background: var(--color-accent-pale);
}

/* Dropdown */
.main-nav .has-dropdown>a::after {
    content: '▾';
    margin-left: 4px;
    font-size: 0.75rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--trans);
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: all var(--trans);
}

.dropdown-menu li a:hover {
    color: var(--color-primary);
    background: var(--color-accent-pale);
}

.dropdown-menu li:first-child a {
    border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-menu li:last-child a {
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.lang-switcher a {
    padding: 0.3rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    color: var(--color-text-light);
    transition: all var(--trans);
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--trans);
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Offset for fixed header */
.admin-bar #site-header {
    top: 32px;
}

body:not(.admin-bar) #wpadminbar {
    display: none;
}

/* Page offset */
.page-content-offset {
    padding-top: 72px;
}

.admin-bar .page-content-offset {
    padding-top: 104px;
}

/* Project page - no sticky header */
.page-proyecto #site-header {
    position: relative;
}

.page-proyecto .page-content-offset {
    padding-top: 0;
}

/* =============================================================================
   HERO SECTION (Home)
============================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
    padding-top: 72px;
}

.hero-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Vine-leaf organic shapes */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: blobFloat 8s ease-in-out infinite;
}

.hero-blob--1 {
    width: 600px;
    height: 600px;
    background: var(--color-accent);
    top: -200px;
    right: -150px;
    animation-delay: 0s;
}

.hero-blob--2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent-light);
    bottom: -100px;
    left: -100px;
    animation-delay: -3s;
}

.hero-blob--3 {
    width: 300px;
    height: 300px;
    background: var(--color-white);
    top: 40%;
    left: 30%;
    animation-delay: -6s;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-10px, 15px) scale(0.95);
    }
}

/* Vine tendrils SVG */
.hero-vine {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 5rem 0 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--color-white);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 580px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* EU funding badge */
.hero-eu-badge {
    position: absolute;
    bottom: 4rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    max-width: 200px;
}

/* =============================================================================
   HOME — PROJECT DESCRIPTION & OBJECTIVES
============================================================================= */
.objectives-section {
    padding: var(--section-pad) 0;
    background: var(--color-white);
    position: relative;
    overflow: hidden;
}

.objectives-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary-light));
}

.objectives-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.objectives-intro-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.objectives-intro-text p {
    color: var(--color-text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.objectives-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--color-accent-pale);
    border-radius: var(--radius);
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent);
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card span {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Objective cards */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    position: relative;
}

.obj-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: all var(--trans);
    position: relative;
    overflow: hidden;
}

.obj-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: transform var(--trans);
    transform-origin: left;
}

.obj-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.obj-card:hover::before {
    transform: scaleX(1);
}

.obj-card-icon {
    width: 52px;
    height: 52px;
    background: var(--color-accent-pale);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: background var(--trans);
}

.obj-card:hover .obj-card-icon {
    background: var(--color-primary);
}

.obj-card h3 {
    font-size: 1.05rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.obj-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* "Floating" effect - cards slightly above bg */
.objectives-bg {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
}

/* =============================================================================
   HOME — PARTNERS MAP
============================================================================= */
.partners-section {
    padding: var(--section-pad) 0;
    background: var(--color-bg);
}

#vn-partners-map {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    background: #e8f0eb;
}

/* Popup */
.vn-map-popup {
    position: absolute;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    min-width: 180px;
    max-width: 240px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity var(--trans);
    border-top: 3px solid var(--color-accent);
}

.vn-map-popup.is-visible {
    opacity: 1;
}

.vn-map-popup img {
    max-height: 40px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.vn-map-popup strong {
    display: block;
    font-size: 0.88rem;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.vn-map-popup span {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Mobile partners list */
.partners-logos-mobile {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.partners-logos-mobile img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter var(--trans);
}

.partners-logos-mobile img:hover {
    filter: none;
}

/* =============================================================================
   HOME — NEWS CAROUSEL
============================================================================= */
.news-section {
    padding: var(--section-pad) 0;
}

.news-carousel-wrap {
    position: relative;
    overflow: hidden;
}

.news-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
}

.news-card {
    flex: 0 0 calc(33.333% - 1rem);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: all var(--trans);
    display: flex;
    flex-direction: column;
}

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

.news-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg);
}

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

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

.news-card-no-img {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.7;
}

.news-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.news-card h3 {
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-card p {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.6;
    flex: 1;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans);
    color: var(--color-primary);
    font-size: 1.1rem;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    gap: 0.4rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    transition: all var(--trans);
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--color-accent);
    width: 24px;
    border-radius: 4px;
}

/* =============================================================================
   FOOTER
============================================================================= */
#site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .footer-logo {
    height: 100px !important;
    width: auto !important;
    max-width: 500px !important;
    object-fit: contain !important;
    margin-bottom: 1.25rem !important;
    filter: none !important;
    display: block !important;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.5rem;
}

/* Social icons */
.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: all var(--trans);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--trans);
}

.footer-col ul li a:hover {
    color: var(--color-accent);
}

/* EU logos strip */
.footer-eu {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-eu-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-eu-logos img {
    height: 100px !important;
    width: auto !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.85;
    transition: opacity var(--trans);
}

.footer-eu-logos img:hover {
    opacity: 1;
}

/* POCTEFA keeps original colors */
.footer-eu-logos img.footer-poctefa-img,
.footer-eu-logos img[alt="POCTEFA"] {
    filter: none !important;
    opacity: 1 !important;
    height: 200px !important;
    width: auto !important;
}

.footer-eu-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    max-width: 400px;
    line-height: 1.6;
}

/* Footer bottom */
.footer-bottom {
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}

.footer-bottom a:hover {
    color: var(--color-accent);
}

/* =============================================================================
   PAGE HEADERS (inner pages)
============================================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
    padding: calc(var(--header-h, 72px) + 3rem) 0 5rem;
    position: relative;
    overflow: hidden;
    color: var(--color-white);
    min-height: 260px;
    display: flex;
    align-items: center;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--color-white);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0;
    line-height: 1.7;
}

/* =============================================================================
   PROJECT PAGE
============================================================================= */
.project-details {
    padding: 5rem 0;
}

/* Actions timeline (3-5) */
.actions-timeline {
    padding: 5rem 0;
    background: var(--color-bg);
}

.actions-timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

.actions-sequence {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

/* Horizontal connector — pasa por el centro de los iconos */
.actions-sequence::before {
    content: '';
    position: absolute;
    top: 27px;
    /* centro del icono de 56px = 28px, ajuste visual */
    left: calc(16.666% + 28px);
    right: calc(16.666% + 28px);
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-primary) 100%);
    background-size: 200% 100%;
    animation: lineColorSweep 3s ease-in-out infinite alternate;
}

/* Flecha animada sobre la línea */
.actions-sequence::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(16.666% + 28px);
    width: 18px;
    height: 18px;
    border-right: 3px solid var(--color-accent);
    border-top: 3px solid var(--color-accent);
    transform: rotate(45deg);
    animation: arrowSlide 2.4s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes lineColorSweep {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

@keyframes arrowSlide {
    0% {
        left: calc(16.666% + 28px);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        left: calc(83.333% - 46px);
        opacity: 0;
    }
}

.action-step {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}

.action-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-white);
    border: 3px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    transition: all var(--trans);
}

.action-step.active .action-step-number,
.action-step:hover .action-step-number {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    transform: scale(1.1);
}

.action-step h3 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.action-step p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
}

/* Sticky scroll section for actions detail */
.actions-sticky-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    padding: 4rem 0;
}

.actions-sticky-left {
    position: sticky;
    top: 100px;
}

.action-number-big {
    font-size: 6rem;
    font-weight: 800;
    color: var(--color-accent-pale);
    line-height: 1;
    margin-bottom: -1rem;
    transition: color 0.4s ease;
}

.action-sticky-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
}

.action-sticky-label {
    display: inline-block;
    background: var(--color-accent-pale);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.actions-scroll-items {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.action-scroll-item {
    padding: 2.5rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: all var(--trans);
}

.action-scroll-item.is-active {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.action-scroll-item p {
    color: var(--color-text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* =============================================================================
   CONSORTIUM PAGE
============================================================================= */
.consortium-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.partner-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: all var(--trans);
    align-items: start;
}

.partner-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateX(4px);
}

.partner-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    min-height: 100px;
}

.partner-card-logo img {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
}

.partner-card-info h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.partner-card-info .partner-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.partner-meta span {
    font-size: 0.82rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.partner-card-info .partner-desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.partner-card-info .partner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
}

.partner-card-info .partner-link:hover {
    color: var(--color-primary);
}

/* =============================================================================
   DIGITAL TOOLS PAGE
============================================================================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: all var(--trans);
    display: flex;
    flex-direction: column;
}

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

.tool-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.tool-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.tool-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-card h3 {
    font-size: 1.05rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.tool-card p {
    font-size: 0.88rem;
    color: var(--color-text-light);
    flex: 1;
    line-height: 1.6;
}

.tool-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

/* Coming soon state */
.coming-soon-section {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-accent-pale);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--color-border);
}

.coming-soon-section .coming-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.coming-soon-section h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.coming-soon-section p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Single tool page */
.tool-single-hero {
    background: var(--color-bg);
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
}

.tool-single-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    transition: color var(--trans);
}

.tool-back-link:hover {
    color: var(--color-primary);
}

/* Video gallery */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-body {
    padding: 1rem 1.25rem;
}

.video-body h3 {
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.video-body p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Images gallery */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.image-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--trans);
    cursor: pointer;
}

.image-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.image-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.image-card-caption {
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: var(--color-text-light);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-top: none;
}

/* =============================================================================
   RESOURCES PAGE
============================================================================= */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.publication-item {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all var(--trans);
}

.publication-item:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-card);
}

.pub-icon {
    width: 44px;
    height: 44px;
    background: var(--color-accent-pale);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: var(--color-primary);
}

.pub-info h3 {
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.pub-info .pub-authors {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-bottom: 0.3rem;
}

.pub-info .pub-doi a {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-family: monospace;
}

/* Pagination */
.vn-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.vn-pagination a,
.vn-pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all var(--trans);
}

.vn-pagination a:hover {
    background: var(--color-accent-pale);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.vn-pagination span.current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Communication materials */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.material-card {
    background: var(--color-white);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--trans);
}

.material-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-card);
}

.material-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-pale);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.material-info h4 {
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.material-info span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.material-download {
    margin-left: auto;
    color: var(--color-accent);
    font-size: 1.1rem;
    transition: color var(--trans);
    flex-shrink: 0;
}

.material-card:hover .material-download {
    color: var(--color-primary);
}

/* =============================================================================
   NEWS / ACTUALIDAD PAGE
============================================================================= */
.news-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.filter-btn {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--trans);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

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

/* Single news */
.news-single-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.news-single-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.news-single-images img {
    border-radius: var(--radius);
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.news-single-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.news-single-meta span {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* =============================================================================
   CONTACT PAGE
============================================================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-vineyard {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.contact-form-wrap {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--trans);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(119, 173, 87, 0.15);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-captcha {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.form-captcha strong {
    color: var(--color-primary);
    font-size: 1rem;
}

.form-captcha input {
    width: 70px;
    text-align: center;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-checkbox input {
    width: auto;
    margin-top: 3px;
}

.form-checkbox label {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-weight: normal;
}

/* =============================================================================
   LIGHTBOX
============================================================================= */
.vn-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--trans);
}

.vn-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.vn-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vn-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--trans);
}

.vn-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* =============================================================================
   COOKIE BANNER
============================================================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.25rem 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    border-top: 3px solid var(--color-accent);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.6;
}

.cookie-text a {
    color: var(--color-accent);
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* =============================================================================
   PRIVACY PAGE
============================================================================= */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
}

.privacy-content h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-size: 1.3rem;
}

.privacy-content h3 {
    color: var(--color-primary-light);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.privacy-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.privacy-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.privacy-content ul li {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* =============================================================================
   404 PAGE
============================================================================= */
.not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
}

.not-found-number {
    font-size: 8rem;
    font-weight: 800;
    color: var(--color-accent-pale);
    line-height: 1;
    margin-bottom: 1rem;
}

.not-found h1 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.not-found p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* =============================================================================
   RESPONSIVE
============================================================================= */
@media (max-width: 1024px) {
    :root {
        --section-pad: 3.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .objectives-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .actions-sticky-wrap {
        grid-template-columns: 1fr;
    }

    .actions-sticky-left {
        position: static;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .partner-card {
        grid-template-columns: 120px 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 2.5rem;
    }

    /* Header mobile */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 1.5rem;
        transform: translateX(-100%);
        transition: transform var(--trans);
        overflow-y: auto;
        z-index: 9990;
        box-shadow: 4px 0 32px rgba(0, 0, 0, .15);
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav>ul {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }

    .main-nav>ul>li>a {
        font-size: 1rem;
        padding: 0.75rem 0.5rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--color-accent);
        border-radius: 0;
        margin: 0.25rem 0 0.25rem 1rem;
    }

    /* Hero */
    .hero {
        min-height: 90vh;
    }

    .hero-eu-badge {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .vn-btn {
        width: 100%;
        justify-content: center;
    }

    /* Cards */
    .news-card {
        flex: 0 0 calc(85%);
    }

    .objectives-stats {
        grid-template-columns: 1fr 1fr;
    }

    /* Actions timeline */
    .actions-sequence {
        flex-direction: column;
        align-items: center;
    }

    .actions-sequence::before {
        display: none;
    }

    .action-step {
        max-width: 300px;
    }

    /* Partners */
    #vn-partners-map {
        display: none;
    }

    .partners-logos-mobile {
        display: flex;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Tools */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-form-wrap {
        padding: 1.5rem;
    }

    /* Partner */
    .partner-card {
        grid-template-columns: 1fr;
    }

    .partner-card-logo {
        max-width: 200px;
    }

    /* News grid */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* Publications */
    .publication-item {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .objectives-stats {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .materials-grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================================================
   OVERRIDES — v5 CLEAN (single source of truth, no conflicts)
============================================================================= */

/* ── Reveal: fade only, no transform ── */
.vn-reveal,
.vn-reveal-left,
.vn-reveal-right {
    opacity: 0;
    transition: opacity 0.6s ease;
    transform: none;
}

.vn-reveal.is-visible,
.vn-reveal-left.is-visible,
.vn-reveal-right.is-visible {
    opacity: 1;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 88px;
}

.hero-content {
    padding: 4rem 0 3rem;
}

.hero-eu-badge {
    bottom: 4rem;
}

/* ── HEADER — expand at top, shrink on scroll ── */
#site-header {
    height: 88px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
}

#site-header.scrolled {
    height: 64px;
    box-shadow: 0 4px 20px rgba(58, 105, 82, 0.15);
}

.header-inner {
    height: 88px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-header.scrolled .header-inner {
    height: 64px;
}

/* Nav + lang */
.main-nav {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.lang-switcher {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}

/* Content offset */
.page-content-offset {
    height: 88px;
}

.admin-bar #site-header {
    top: 32px;
}

.admin-bar .page-content-offset {
    height: 120px;
}

/* ── ACTIVE MENU ITEM ── */
/* Clean slate */
.main-nav>ul>li>a {
    border-bottom: none;
}

.main-nav>ul>li>a::after {
    content: none;
}

.has-dropdown>a::after {
    content: ' ▾';
}

/* Active state */
.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a,
.main-nav>ul>li.current_page_item>a,
.main-nav>ul>li.current_page_ancestor>a {
    background: #e8f4e4;
    color: #2d5340;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #77AD57;
}

/* ── SEQUENCE — simple, clean ── */
.actions-sequence {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    position: relative;
    background-image: none;
}

.actions-sequence::before {
    content: '';
    position: absolute;
    top: 29px;
    left: calc(16.666% + 30px);
    right: calc(16.666% + 30px);
    height: 2px;
    background: linear-gradient(90deg, #77AD57, #3A6952);
}

.actions-sequence::after {
    display: none;
}

.action-step {
    flex: 1;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: none;
}

.action-step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #77AD57;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 12px rgba(58, 105, 82, .12);
    transition: background 0.3s ease;
}

.action-step:hover .action-step-number {
    background: #e8f4e4;
}

.action-step-text {
    width: 100%;
}

.action-step-text h3 {
    font-size: 1.05rem;
    color: #3A6952;
    margin-bottom: .5rem;
    font-weight: 700;
}

.action-step-text p {
    font-size: .88rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}


/* ── HEADER: tamaño fijo, sin animación ── */
#site-header {
    height: 72px !important;
    transition: box-shadow 0.3s ease !important;
}

#site-header.scrolled {
    box-shadow: 0 4px 20px rgba(58, 105, 82, 0.15) !important;
}

.header-inner {
    height: 72px !important;
    transition: none !important;
}

.page-content-offset {
    height: 72px !important;
}

.hero {
    padding-top: 72px !important;
}

.page-hero {
    padding-top: calc(72px + 2.5rem) !important;
}

.admin-bar #site-header {
    top: 32px !important;
}

.admin-bar .page-content-offset {
    height: 104px !important;
}

@media (max-width: 820px) {
    #site-header {
        height: 64px !important;
    }

    .header-inner {
        height: 64px !important;
    }

    .page-content-offset {
        height: 64px !important;
    }

    .hero {
        padding-top: 64px !important;
    }

    .page-hero {
        padding-top: calc(64px + 2rem) !important;
    }

    .main-nav {
        top: 64px !important;
    }

    .site-logo-img {
        height: 38px !important;
    }
}

/* =============================================================================
   CSS RECUPERADO — bloques perdidos al truncar
============================================================================= */

/* ── Hero mobile logo — solo móvil ── */
.hero-mobile-logo {
    display: none;
}

@media (max-width: 820px) {
    .hero-mobile-logo {
        display: block;
        text-align: center;
        margin-bottom: 1.5rem;
        padding-top: 1rem;
    }

    .hero-mobile-logo img {
        max-width: 220px;
        width: 75%;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .hero-content {
        text-align: center;
    }

    .hero-badge {
        margin: 0 auto 1rem;
        display: inline-flex;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* ── Objectives parallax section ── */
.objectives-parallax-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.objectives-bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

.objectives-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 42, 30, 0.72);
}

/* ── Glass cards (objetivos) ── */
.obj-card--glass {
    background: rgba(255, 255, 255, 0.13) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    color: #fff;
}

.obj-card--glass h3 {
    color: #fff !important;
}

.obj-card--glass p {
    color: rgba(255, 255, 255, 0.82) !important;
}

.obj-card--glass:hover {
    background: rgba(255, 255, 255, 0.20) !important;
    border-color: rgba(119, 173, 87, 0.6) !important;
    transform: translateY(-6px);
}

.obj-card-icon-img {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    padding: 8px;
}

.obj-card-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* ── Single actualidad — carrusel ── */
.single-img-carousel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    margin-bottom: 2.5rem;
}

.single-img-carousel-track {
    display: flex;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.single-img-carousel-slide {
    min-width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.single-img-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-img-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .9);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 1.1rem;
    color: #3A6952;
}

.single-img-carousel-btn.prev {
    left: 1rem;
}

.single-img-carousel-btn.next {
    right: 1rem;
}

.single-img-carousel-dots {
    display: flex;
    justify-content: center;
    gap: .4rem;
    padding: .85rem 0;
    background: rgba(0, 0, 0, .35);
}

.single-img-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    transition: all .3s;
    cursor: pointer;
    border: none;
}

.single-img-carousel-dot.active {
    background: #77AD57;
    width: 24px;
    border-radius: 4px;
}

/* ── Gallery lightbox ── */
.vn-gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.vn-gallery-lightbox.open {
    display: flex;
}

.vn-gallery-lightbox-img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vn-gallery-lightbox-img-wrap img {
    max-width: 88vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.vn-gallery-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vn-gallery-lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vn-gallery-lightbox-btn.prev {
    left: 1.25rem;
}

.vn-gallery-lightbox-btn.next {
    right: 1.25rem;
}

.vn-gallery-lightbox-caption {
    color: rgba(255, 255, 255, .6);
    font-size: .85rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 500px;
    padding: 0 1rem;
}

.vn-gallery-lightbox-counter {
    color: rgba(255, 255, 255, .4);
    font-size: .78rem;
    margin-top: .35rem;
}

.image-card {
    cursor: zoom-in;
}

/* ── Actualidad featured ── */
.actualidad-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 40px rgba(58, 105, 82, .14);
    border: 1px solid #dde8d9;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .3s ease, border-color .3s ease;
    margin-bottom: 1rem;
}

.actualidad-featured:hover {
    box-shadow: 0 16px 56px rgba(58, 105, 82, .2);
    border-color: #77AD57;
}

.actualidad-featured-img {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3328, #3A6952);
}

.actualidad-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.actualidad-featured:hover .actualidad-featured-img img {
    transform: scale(1.04);
}

.actualidad-featured-badge {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: #77AD57;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .85rem;
    border-radius: 100px;
    text-transform: uppercase;
}

.actualidad-featured-body {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.actualidad-featured-body h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #2d5340;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.actualidad-featured-body p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.actualidad-read-more {
    color: #3A6952;
    font-weight: 700;
    border-bottom: 2px solid #77AD57;
    padding-bottom: .2rem;
    align-self: flex-start;
    display: inline-block;
}

.actualidad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card-footer {
    padding: 0 1.5rem 1.25rem;
    margin-top: auto;
}

.news-read-link {
    color: #3A6952;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
}

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

    .actualidad-featured-img {
        min-height: 220px;
    }

    .actualidad-featured-body {
        padding: 1.75rem;
    }

    .single-img-carousel-btn {
        top: auto;
        bottom: 3.5rem;
        transform: none;
    }
}

/* ── Contact vineyard image ── */
.contact-vineyard {
    width: 100%;
    border-radius: 16px;
    margin-top: 1.5rem;
    object-fit: cover;
    max-height: 280px;
    box-shadow: 0 8px 32px rgba(58, 105, 82, .18);
}

/* ── Partner card (consorcio) ── */
.partner-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
    background: #fff;
    border: 1px solid #dde8d9;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(58, 105, 82, .08);
    margin-bottom: 1.25rem;
    transition: box-shadow .3s ease;
}

.partner-card:hover {
    box-shadow: 0 8px 32px rgba(58, 105, 82, .16);
}

.partner-card-logo {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-card-logo img {
    max-width: 100px;
    max-height: 70px;
    object-fit: contain;
}

.partner-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: .4rem;
    color: #2d5340;
}

.partner-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.partner-meta span {
    font-size: .82rem;
    color: #777;
}

.partner-desc {
    font-size: .9rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: .75rem;
}

.partner-link {
    color: #3A6952;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
}

.partner-link:hover {
    text-decoration: underline;
}

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

    .partner-card-logo {
        width: auto;
    }
}

/* =============================================================================
   HEADER COMPLETO — movido de inline a style.css
============================================================================= */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(58, 105, 82, 0.10);
    transition: box-shadow 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 4px 20px rgba(58, 105, 82, 0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 0;
}

.page-content-offset {
    height: 80px;
}

.admin-bar #site-header {
    top: 32px;
}

.admin-bar .page-content-offset {
    height: 112px;
}

.hero {
    padding-top: 80px;
}

.page-hero {
    padding-top: calc(80px + 2.5rem) !important;
}

/* Logo — más grande */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: auto;
}

.site-logo img {
    height: 58px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

/* Nav */
.main-nav {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.main-nav>ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav>ul>li {
    position: relative;
    list-style: none;
}

.main-nav>ul>li>a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #3B3B47;
    border-radius: 8px;
    transition: background 0.25s, color 0.25s;
    white-space: nowrap;
    text-decoration: none;
}

.main-nav>ul>li>a:hover {
    color: #3A6952;
    background: #e8f4e4;
}

/* Página activa */
.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a,
.main-nav>ul>li.current_page_item>a,
.main-nav>ul>li.current_page_ancestor>a {
    color: #2d5340;
    background: #e8f4e4;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #77AD57;
}

/* Dropdown */
.has-dropdown>a::after {
    content: ' ▾';
    font-size: 0.75rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(58, 105, 82, 0.18);
    border: 1px solid #dde8d9;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s;
    z-index: 100;
    padding: 0.4rem;
    list-style: none;
    margin: 0;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    color: #3B3B47;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    color: #3A6952;
    background: #e8f4e4;
}

/* Lang switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.lang-switcher a {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    color: #888;
    transition: all 0.3s;
    text-decoration: none;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: #3A6952;
    color: #fff;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #3B3B47;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay móvil */
body.nav-is-open::before {
    display: none !important;
}

/* ── MÓVIL ── */
@media (max-width: 820px) {
    #site-header {
        height: 64px;
    }

    .header-inner {
        height: 64px;
    }

    .page-content-offset {
        height: 64px;
    }

    .hero {
        padding-top: 64px;
    }

    .page-hero {
        padding-top: calc(64px + 2rem) !important;
    }

    .site-logo {
        display: none;
    }

    .site-logo img {
        height: 40px;
    }

    .nav-toggle {
        display: flex;
        order: -1;
    }

    .lang-switcher {
        order: 1;
    }

    .header-inner {
        justify-content: space-between;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 1.5rem;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 2px 0 24px rgba(0, 0, 0, 0.2);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav>ul {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }

    .main-nav>ul>li {
        width: 100%;
    }

    .main-nav>ul>li>a {
        font-size: 1.05rem;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #77AD57 !important;
        border-radius: 0 !important;
        padding: 0.25rem 0 0.25rem 1rem !important;
        display: none !important;
        margin: 0 !important;
    }

    .dropdown-menu.is-open {
        display: block !important;
    }
}

/* =============================================================================
   CORRECCIONES FINALES — todas las páginas revisadas
============================================================================= */

/* ── 1. PAGE HERO: más espacio arriba, más abajo antes de la curva ── */
.page-hero {
    padding: calc(80px + 3.5rem) 0 7rem !important;
    min-height: 300px !important;
    align-items: flex-start !important;
}

.page-hero::after {
    height: 80px !important;
}

/* Singles también */
.single-actualidad-hero,
.single-herramienta-hero {
    padding: calc(80px + 3rem) 0 6.5rem !important;
}

/* ── 2. HERO PORTADA: subir contenido ── */
.hero {
    align-items: flex-start !important;
}

.hero-content {
    padding-top: 4rem !important;
    padding-bottom: 3rem !important;
}

.hero-eu-badge {
    bottom: 5rem !important;
}

/* ── 3. TARJETAS: hover solo sombra y borde, SIN translateY ── */
.news-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.news-card:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(58, 105, 82, 0.18) !important;
    border-color: #77AD57 !important;
}

.tool-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.tool-card:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(58, 105, 82, 0.18) !important;
    border-color: #77AD57 !important;
}

.obj-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.obj-card:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(58, 105, 82, 0.18) !important;
}

.pub-item,
.material-card,
.image-card,
.partner-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.pub-item:hover,
.material-card:hover,
.partner-card:hover {
    transform: none !important;
    box-shadow: 0 8px 24px rgba(58, 105, 82, 0.16) !important;
    border-color: #77AD57 !important;
}

.image-card:hover {
    transform: none !important;
}

/* Las imágenes dentro sí hacen zoom — el overflow las recorta limpio */
.news-card-img,
.tool-card-img {
    overflow: hidden !important;
}

.news-card-img img,
.tool-card-img img {
    transition: transform 0.5s ease !important;
    will-change: transform;
}

.news-card:hover .news-card-img img,
.tool-card:hover .tool-card-img img {
    transform: scale(1.05) !important;
}

/* ── 4. PROYECTO HERO: 2 columnas con imagen a la derecha ── */
.proyecto-hero-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
}

.proyecto-hero-2col-text {}

.proyecto-hero-2col-img img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    object-fit: cover;
    max-height: 420px;
}

@media (max-width: 900px) {
    .proyecto-hero-2col {
        grid-template-columns: 1fr;
    }

    .proyecto-hero-2col-img {
        display: none;
    }
}

/* ── 5. SECUENCIA: separar pasos + restaurar flecha animada ── */
/* Anular el override que quitó la flecha */
.actions-sequence::after {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    top: 20px !important;
    left: calc(16.666% + 30px) !important;
    width: 18px !important;
    height: 18px !important;
    border-right: 3px solid #77AD57 !important;
    border-top: 3px solid #77AD57 !important;
    transform: rotate(45deg) !important;
    animation: arrowSlide 2.4s ease-in-out infinite !important;
    border-radius: 2px !important;
    background: none !important;
}

/* Más separación entre pasos */
.action-step {
    padding: 0 2.5rem !important;
}

/* ── 6. QUIÉNES SOMOS: icono de tamaño correcto ── */
.proyecto-cta-icon-img {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain !important;
    margin: 0 auto 1rem !important;
    display: block !important;
}

/* ── 7. MENÚ ACTIVO: asegurar que se ve ── */
.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a,
.main-nav>ul>li.current_page_item>a,
.main-nav>ul>li.current_page_ancestor>a {
    color: #2d5340 !important;
    background: #e8f4e4 !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -3px 0 #77AD57 !important;
}

/* ── 8. LOGO MENÚ: tamaño correcto ── */
.site-logo img {
    height: 58px !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain !important;
}

/* ── 9. MÓVIL: correcciones ── */
@media (max-width: 820px) {
    .page-hero {
        padding: calc(64px + 2.5rem) 0 6rem !important;
    }

    .site-logo img {
        height: 40px !important;
    }

    .action-step {
        padding: 0 1rem !important;
    }

    .hero-eu-badge {
        bottom: 1.5rem !important;
    }
}

/* =============================================================================
   FIX FINAL v2 — secuencia, menú activo, hero badge
============================================================================= */

/* ── Secuencia: flecha que viaja ── */
/* Necesita @keyframes separados para left porque transform ya tiene rotate */
@keyframes arrowTravelFix {
    0% {
        left: calc(16.666% + 30px);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    88% {
        opacity: 1;
    }

    100% {
        left: calc(83.333% - 50px);
        opacity: 0;
    }
}

.actions-sequence::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 20px !important;
    left: calc(16.666% + 30px) !important;
    width: 14px !important;
    height: 14px !important;
    border-right: 2.5px solid #77AD57 !important;
    border-top: 2.5px solid #77AD57 !important;
    transform: rotate(45deg) !important;
    border-radius: 2px !important;
    background: none !important;
    animation: arrowTravelFix 2.2s ease-in-out infinite !important;
}

/* Más separación entre los pasos */
.action-step {
    padding: 0 3rem !important;
}

/* ── Menú activo ── */
/* WordPress añade estas clases automáticamente al li del item activo */
.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a,
.main-nav>ul>li.current_page_item>a,
.main-nav>ul>li.current_page_ancestor>a,
.main-nav>ul>li.current-page-ancestor>a {
    color: #2d5340 !important;
    background: #e8f4e4 !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -3px 0 #77AD57 !important;
    border-radius: 8px !important;
}

/* ── Hero: badge más arriba, contenido más pegado al badge ── */
.hero-badge {
    margin-bottom: 1rem !important;
}

.hero-content {
    padding-top: 2.5rem !important;
    padding-bottom: 3rem !important;
}

.hero h1 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* ── Single actualidad/herramienta: menos padding arriba ── */
.single-actualidad-hero,
body.single-actualidad .page-hero,
body.single .page-hero {
    padding-top: calc(80px + 1.5rem) !important;
    padding-bottom: 5rem !important;
}

/* =============================================================================
   SECUENCIA: flecha animada con elemento real (no ::after)
   + hover círculos con relleno verde
============================================================================= */

/* Desactivar TODOS los ::after anteriores de la secuencia */
.actions-sequence::after {
    display: none !important;
    animation: none !important;
}

/* Línea horizontal */
.actions-sequence::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 29px !important;
    left: calc(16.666% + 30px) !important;
    right: calc(16.666% + 30px) !important;
    height: 2px !important;
    background: linear-gradient(90deg, #77AD57, #3A6952) !important;
    animation: none !important;
}

/* Track de la flecha — ocupa toda la línea */
.seq-arrow-track {
    position: absolute;
    top: 19px;
    left: calc(16.666% + 30px);
    right: calc(16.666% + 30px);
    height: 20px;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

/* La flecha: triángulo rotado que se mueve de izq a der */
.seq-arrow {
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2.5px solid #77AD57;
    border-top: 2.5px solid #77AD57;
    transform: translateY(-50%) rotate(45deg);
    animation: seqArrowMove 2s ease-in-out infinite;
}

@keyframes seqArrowMove {
    0% {
        left: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% - 14px);
        opacity: 0;
    }
}

/* Hover círculos: relleno verde como el borde */
.action-step:hover .action-step-number {
    background: #77AD57 !important;
    border-color: #77AD57 !important;
}

.action-step:hover .action-step-number img {
    filter: brightness(0) invert(1) !important;
}

/* Transición suave */
.action-step-number {
    transition: background 0.3s ease, border-color 0.3s ease !important;
}

/* ── Privacidad y páginas genéricas: menos espacio tras el hero ── */
body.page-template-page-privacidad .section:first-of-type,
body.page-template-page-privacidad-php .section:first-of-type,
.privacy-content-section {
    padding-top: 2rem !important;
}

/* Aplica a todas las páginas con page-hero — reducir el gap blanco */
.page-hero+* {
    margin-top: -2rem;
}

/* =============================================================================
   FIXES — hover imagen proyecto, círculo suave, consorcio reveal, single hero
============================================================================= */

/* ── 1. Hover imagen proyecto: ligera rotación ── */
.proyecto-hero-2col-img img {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transform-origin: center center;
}

.proyecto-hero-2col:hover .proyecto-hero-2col-img img,
.proyecto-hero-2col-img:hover img {
    transform: rotate(-2deg) scale(1.03) !important;
}

/* ── 2. Hover círculo secuencia: transición más suave ── */
.action-step-number {
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease !important;
}

.action-step:hover .action-step-number {
    background: #77AD57 !important;
    border-color: #77AD57 !important;
    box-shadow: 0 4px 16px rgba(119, 173, 87, 0.35) !important;
}

/* ── 3. Consorcio: socios con animación reveal al scroll ── */
.partner-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}

.partner-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger delays */
.partner-card:nth-child(1) {
    transition-delay: 0.05s !important;
}

.partner-card:nth-child(2) {
    transition-delay: 0.12s !important;
}

.partner-card:nth-child(3) {
    transition-delay: 0.19s !important;
}

.partner-card:nth-child(4) {
    transition-delay: 0.26s !important;
}

.partner-card:nth-child(5) {
    transition-delay: 0.33s !important;
}

.partner-card:nth-child(6) {
    transition-delay: 0.40s !important;
}

/* ── 4. Single hero: más arriba ── */
.single-actualidad-hero {
    padding-top: calc(80px + 1rem) !important;
    padding-bottom: 4.5rem !important;
}

.single-actualidad-hero+section {
    margin-top: -2rem;
}

/* =============================================================================
   SECUENCIA: círculos más grandes, más separados, flecha por debajo del círculo
============================================================================= */

/* Más separación y alineación para que la flecha pase por debajo */
.actions-sequence {
    align-items: flex-start !important;
    padding-bottom: 2.5rem !important;
}

/* Círculos más grandes */
.action-step-number {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2.5px solid #77AD57 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1.25rem !important;
    position: relative !important;
    z-index: 2 !important;
    box-shadow: 0 2px 16px rgba(58, 105, 82, .10) !important;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

.action-step-number img {
    width: 38px !important;
    height: 38px !important;
    object-fit: contain !important;
    transition: filter 0.5s ease !important;
}

/* Hover más suave */
.action-step:hover .action-step-number {
    background: #77AD57 !important;
    border-color: #77AD57 !important;
    box-shadow: 0 6px 24px rgba(119, 173, 87, .30) !important;
}

.action-step:hover .action-step-number img {
    filter: brightness(0) invert(1) !important;
}

/* Más separación entre pasos */
.action-step {
    padding: 0 3.5rem !important;
}

/* Línea horizontal — pasa por el centro del círculo (80px/2 = 40px desde top) */
.actions-sequence::before {
    top: 39px !important;
}

/* Track de la flecha — justo debajo de la línea */
.seq-arrow-track {
    top: 52px !important;
    /* por debajo del centro del círculo */
}

@media (max-width: 768px) {
    .action-step-number {
        width: 60px !important;
        height: 60px !important;
    }

    .action-step-number img {
        width: 28px !important;
        height: 28px !important;
    }

    .action-step {
        padding: 0 1rem !important;
    }

    .seq-arrow-track {
        display: none !important;
    }

    .actions-sequence::before {
        display: none !important;
    }
}

/* ── Flecha secuencia: centrada sobre la línea ── */
.seq-arrow-track {
    top: 32px !important;
    /* centro del círculo (80px/2=40) minus flecha height (12px/2=6) = 34px, ajuste visual */
    height: 16px !important;
}

.seq-arrow {
    top: 50% !important;
    transform: translateY(-50%) rotate(45deg) !important;
}

@keyframes seqArrowMove {
    0% {
        left: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: calc(100% - 14px);
        opacity: 0;
    }
}

/* ── Franja decorativa entre objetivo y secuencia ── */
.proyecto-deco-strip {
    width: 100%;
    background: linear-gradient(180deg, #fff 0%, #f2f8f2 40%, #f2f8f2 60%, #f0f5f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0 0;
    overflow: hidden;
}

.proyecto-deco-strip-img {
    max-width: 680px;
    width: 60%;
    height: auto;
    opacity: 0.18;
    filter: grayscale(15%) sepia(25%);
    display: block;
}

@media (max-width: 768px) {
    .proyecto-deco-strip {
        display: none;
    }
}

/* ── Imagen decorativa en sección "En detalle" ── */
.detalle-deco {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 520px;
    pointer-events: none;
    z-index: 0;
}

.detalle-deco img {
    width: 100%;
    height: auto;
    display: block;
}

#actions-detail:hover .detalle-deco {
    opacity: 0.18;
}

#actions-detail .container {
    position: relative;
    z-index: 1;
}

/* Quitar la clase vacía anterior */
.proyecto-seq-deco {
    display: none;
}

@media (max-width: 768px) {
    .detalle-deco {
        display: none;
    }
}

/* ── Círculos secuencia: sin fondo, transparente ── */
.action-step-number {
    background: transparent !important;
}

/* Hover sigue siendo verde */
.action-step:hover .action-step-number {
    background: #77AD57 !important;
}

/* ── Círculos secuencia: fondo blanco fijo ── */
.action-step-number {
    background: #ffffff !important;
}

.action-step:hover .action-step-number {
    background: #77AD57 !important;
}

/* ── LIMPIEZA DEFINITIVA hover círculos secuencia ── */
/* Anular TODOS los hovers anteriores */
.action-step:hover .action-step-number,
.action-step.active .action-step-number {
    background: #77AD57 !important;
    border-color: #77AD57 !important;
    box-shadow: 0 4px 16px rgba(119, 173, 87, 0.35) !important;
}

.action-step:hover .action-step-number img,
.action-step.active .action-step-number img {
    filter: brightness(0) invert(1) !important;
}

/* ── CÍRCULOS SECUENCIA — clase dedicada, sin conflictos ── */
.seq-circle {
    background: #ffffff !important;
    border: 2.5px solid #77AD57 !important;
    transition: background 0.4s ease, box-shadow 0.4s ease !important;
}

.action-step:hover .seq-circle {
    background: #77AD57 !important;
    box-shadow: 0 4px 16px rgba(119, 173, 87, 0.35) !important;
}

.action-step:hover .seq-circle img {
    filter: brightness(0) invert(1) !important;
    transition: filter 0.4s ease !important;
}

.seq-circle img {
    filter: none !important;
    transition: filter 0.4s ease !important;
}

/* =============================================================================
   MOBILE FIXES — responsive improvements
============================================================================= */

@media (max-width: 820px) {

    /* ── 1. Menú: nav por encima de todo el contenido ── */
    #site-header {
        z-index: 100000 !important;
    }

    .main-nav {
        z-index: 99999 !important;
        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: #fff !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease !important;
        display: block !important;
        overflow-y: auto !important;
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.25) !important;
        padding: 1.5rem !important;
    }

    .main-nav.is-open {
        transform: translateX(0) !important;
        display: block !important;
    }

    .main-nav>ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        width: 100% !important;
    }

    .main-nav>ul>li {
        width: 100% !important;
    }

    .main-nav>ul>li>a {
        font-size: 1.05rem !important;
        padding: 0.85rem 1rem !important;
        border-bottom: 1px solid #f0f0f0 !important;
        display: block !important;
    }

    body.nav-is-open::before {
        display: none !important;
    }

    /* ── 2. Hero mobile logo: más grande y más arriba ── */
    .hero-mobile-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 1rem;
        padding-top: 0.5rem;
    }

    .hero-mobile-logo img {
        max-width: 260px !important;
        width: 80% !important;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* ── 3. Footer logo móvil: mismo tamaño que hero ── */
    .footer-brand .footer-logo {
        height: 60px !important;
        max-width: 200px !important;
    }

    /* ── 4. Partners logos row en home: visible en móvil también ── */
    .partners-logos-row {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .partners-logos-row img {
        height: 32px !important;
    }

    /* ── 5. Noticias home: 1 tarjeta visible, centradas ── */
    .news-carousel-track {
        justify-content: center;
    }

    .news-card {
        min-width: calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        margin: 0 auto;
    }

    /* ── 6. Consorcio: ocultar botón mapa en móvil ── */
    .consortium-map-btn-mobile-hidden {
        display: none !important;
    }

    /* ── 7. Secuencia proyecto en móvil: tarjetas, sin animación ── */
    .actions-sequence {
        flex-direction: column !important;
        gap: 1rem !important;
        background-image: none !important;
    }

    .actions-sequence::before,
    .actions-sequence::after,
    .seq-arrow-track {
        display: none !important;
    }

    .action-step {
        flex-direction: row !important;
        text-align: left !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        padding: 1.25rem !important;
        background: #fff !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(58, 105, 82, .08) !important;
        border: 1px solid #e0ede0 !important;
    }

    .action-step-number {
        flex-shrink: 0 !important;
        margin: 0 !important;
        width: 52px !important;
        height: 52px !important;
    }

    .action-step-text {
        flex: 1;
        text-align: left !important;
    }

    .action-step h3 {
        font-size: 1rem !important;
        margin-bottom: 0.35rem !important;
    }

    .action-step p {
        font-size: 0.88rem !important;
    }
}

/* Segunda fila logos home — oculta en móvil (ya aparece la de arriba) */
@media (max-width: 820px) {
    .partners-logos-row-desktop {
        display: none !important;
    }
}

/* ── Secuencia móvil: tarjetas verticales simples ── */
@media (max-width: 820px) {
    .action-step {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        padding: 1.5rem 1.25rem !important;
    }

    .action-step-number {
        margin: 0 auto 1rem !important;
    }

    .action-step-text {
        text-align: center !important;
    }
}

/* Quitar imagen de fondo en secuencia en móvil */
@media (max-width: 820px) {
    .actions-timeline img[aria-hidden="true"] {
        display: none !important;
    }
}

/* ── Mobile nav — fuera del header-inner ── */



/* ── HEADER ── */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 1000;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(58, 105, 82, .10);
    transition: box-shadow .3s
}

#site-header.scrolled {
    box-shadow: 0 4px 20px rgba(58, 105, 82, .15)
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative
}

.page-content-offset {
    height: 72px
}

.admin-bar #site-header {
    top: 32px
}

.admin-bar .page-content-offset {
    height: 104px
}

.site-logo {
    display: flex;
    align-items: center;
    margin-right: auto;
    flex-shrink: 0
}

.site-logo img {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain
}

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

.main-nav>ul {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0
}

.main-nav>ul>li {
    position: relative;
    list-style: none
}

.main-nav>ul>li>a {
    display: block;
    padding: .5rem .9rem;
    font-size: .9rem;
    font-weight: 500;
    color: #3B3B47;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap
}

.main-nav>ul>li>a:hover {
    color: #3A6952;
    background: #e8f4e4
}

.main-nav>ul>li.current-menu-item>a,
.main-nav>ul>li.current-menu-ancestor>a {
    color: #2d5340 !important;
    background: #e8f4e4 !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -3px 0 #77AD57 !important
}

.has-dropdown>a::after {
    content: ' ▾';
    font-size: .75rem
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dde8d9;
    box-shadow: 0 8px 32px rgba(58, 105, 82, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .3s;
    z-index: 100;
    padding: .4rem;
    list-style: none;
    margin: 0
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.dropdown-menu li {
    list-style: none
}

.dropdown-menu li a {
    display: block;
    padding: .6rem 1rem;
    font-size: .88rem;
    color: #3B3B47;
    border-radius: 8px;
    text-decoration: none
}

.dropdown-menu li a:hover {
    color: #3A6952;
    background: #e8f4e4
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0
}

.lang-switcher a {
    padding: .3rem .6rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    color: #888;
    text-decoration: none
}

.lang-switcher a:hover,
.lang-switcher a.active {
    background: #3A6952;
    color: #fff
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    flex-shrink: 0
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #3B3B47;
    border-radius: 2px;
    transition: all .3s
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg)
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg)
}

/* ── MOBILE ── */
@media(max-width:820px) {
    .nav-toggle {
        display: flex
    }

    .site-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%)
    }

    .hero {
        padding-top: 72px
    }

    .page-hero {
        padding-top: calc(72px + 2rem) !important
    }

    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 2px solid #e0ede0;
        padding: 1.5rem 2rem;
        transform: translateY(-120%);
        opacity: 0;
        transition: transform .3s ease, opacity .3s ease;
        pointer-events: none;
        z-index: 2000;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .main-nav>ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%
    }

    .main-nav>ul>li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        list-style: none
    }

    .main-nav>ul>li:first-child {
        border-top: 1px solid #f0f0f0
    }

    .main-nav>ul>li>a {
        padding: .9rem 0;
        font-size: 1rem;
        display: block
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid #77AD57;
        border-radius: 0;
        padding: .25rem 0 .25rem 1rem;
        display: none;
        margin: 0
    }

    .dropdown-menu.is-open {
        display: block
    }

    body.nav-is-open::before {
        display: none !important;
    }
}

/* ── SEQUENCE MOBILE ── */
@media(max-width:820px) {
    .actions-sequence {
        flex-direction: column !important;
        gap: 1rem !important;
        background-image: none !important
    }

    .actions-sequence::before,
    .actions-sequence::after,
    .seq-arrow-track {
        display: none !important
    }

    .action-step {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem !important;
        background: #fff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 16px rgba(58, 105, 82, .10) !important;
        border: 1px solid #e0ede0 !important;
        width: 100% !important;
        transform: none !important
    }

    .action-step-number,
    .seq-circle {
        width: 68px !important;
        height: 68px !important;
        margin: 0 auto 1rem !important;
        background: #fff !important;
        border: 2.5px solid #77AD57 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important
    }

    .action-step-number img,
    .seq-circle img {
        width: 34px !important;
        height: 34px !important;
        object-fit: contain !important;
        display: block !important;
        filter: none !important;
        opacity: 1 !important;
        visibility: visible !important
    }

    .action-step-text {
        text-align: center !important;
        width: 100% !important
    }
}

/* ── MOBILE NAV FIXES ── */
@media(max-width:820px) {
    .main-nav {
        overflow-y: auto !important;
        max-height: calc(100vh - 72px) !important;
        border-bottom: none !important;
    }

    .main-nav>ul>li>a {
        padding: .9rem 1.5rem !important;
    }

    .main-nav>ul>li:first-child {
        border-top: none !important;
    }
}

/* ── Quitar espacio fino bajo el header en móvil ── */
@media(max-width:820px) {
    #site-header {
        border-bottom: none !important;
        box-shadow: none !important;
    }

    #site-header.scrolled {
        box-shadow: 0 2px 12px rgba(58, 105, 82, .12) !important;
    }
}

/* ── Secuencia móvil: tarjetas centradas con iconos ── */
@media(max-width:820px) {
    .actions-sequence {
        flex-direction: column !important;
        gap: 1.25rem !important;
        background: none !important;
        padding: 0 !important;
    }

    .actions-sequence::before,
    .actions-sequence::after,
    .seq-arrow-track {
        display: none !important;
    }

    .action-step {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem !important;
        background: #fff !important;
        border-radius: 14px !important;
        box-shadow: 0 2px 16px rgba(58, 105, 82, .10) !important;
        border: 1px solid #e0ede0 !important;
        width: 100% !important;
        transform: none !important;
    }

    /* Forzar el círculo a mostrar el icono */
    .action-step>div:first-child {
        width: 72px !important;
        height: 72px !important;
        border-radius: 50% !important;
        background: #fff !important;
        border: 2.5px solid #77AD57 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 1rem !important;
        flex-shrink: 0 !important;
    }

    .action-step>div:first-child img {
        width: 36px !important;
        height: 36px !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        filter: none !important;
    }

    .action-step>div:last-child {
        text-align: center !important;
    }
}

/* ── Fixes finales móvil ── */
@media(max-width:820px) {

    /* 1. Quitar espacio/línea bajo header */
    #site-header {
        border-bottom: none !important;
        outline: none !important;
    }

    .header-inner {
        border-bottom: none !important;
    }

    /* La barra fina viene del page-content-offset que tiene background */
    .page-content-offset {
        background: transparent !important;
        border: none !important;
    }

    /* 2. Tarjetas secuencia centradas horizontalmente */
    .actions-sequence {
        align-items: center !important;
    }

    .action-step {
        max-width: 340px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
}

/* 3. Objetivos estratégicos: animación suave al hacer scroll */
.obj-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}

.obj-card.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.obj-card.vn-delay-1 {
    transition-delay: 0.1s !important;
}

.obj-card.vn-delay-2 {
    transition-delay: 0.2s !important;
}

.obj-card.vn-delay-3 {
    transition-delay: 0.3s !important;
}

.obj-card.vn-delay-4 {
    transition-delay: 0.4s !important;
}

/* ── Lightbox: flechas debajo del contador ── */
.vn-gallery-lightbox-nav {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.vn-gallery-lightbox-btn {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}

.vn-gallery-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Show-more: asegurar visibilidad al revelar tarjetas ── */
.tool-card-hidden {
    display: none !important;
}

.video-card {
    display: flex;
    flex-direction: column;
}

/* ── DOI oculto en móvil ── */
@media (max-width: 820px) {
    .pub-doi--desktop {
        display: none !important;
    }
}

/* ── Footer logo: borde fino, fondo verde claro, esquinas redondeadas ── */
.footer-logo {
    background: #e8f4e4 !important;
    border: 1.5px solid #c5dfc5 !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
}

/* old logo rules removed */

/* ── WYSIWYG content styling ── */
.wysiwyg-content {
    color: #555;
    line-height: 1.9;
    font-size: 1.05rem;
}

.wysiwyg-content p {
    margin-bottom: 1.25rem;
}

.wysiwyg-content p:last-child {
    margin-bottom: 0;
}

.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4 {
    color: #3A6952;
    margin: 1.75rem 0 0.75rem;
    font-weight: 700;
}

.wysiwyg-content ul,
.wysiwyg-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.wysiwyg-content li {
    margin-bottom: 0.4rem;
}

.wysiwyg-content a {
    color: #3A6952;
    text-decoration: underline;
}

.wysiwyg-content a:hover {
    color: #77AD57;
}

.wysiwyg-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.wysiwyg-content strong {
    color: #2d5340;
}

.wysiwyg-content blockquote {
    border-left: 3px solid #77AD57;
    padding: .75rem 0 .75rem 1.25rem;
    margin: 1.25rem 0;
    color: #666;
    font-style: italic;
}

/* ── Fix blur on hover animations — GPU rendering ── */
.partner-card,
.obj-card,
.tool-card,
.video-card,
.news-card,
.action-scroll-item,
.publication-item,
.action-step,
.site-logo img,
.footer-logo,
[class*="vn-reveal"],
[class*="vn-btn"] {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

/* Prevent will-change from persisting on non-hovered elements (memory) */
.partner-card:not(:hover),
.obj-card:not(:hover),
.tool-card:not(:hover),
.news-card:not(:hover) {
    will-change: auto;
}

/* ── Hero mobile logo: borde y fondo como footer ── */
@media (max-width: 820px) {
    .hero-mobile-logo img {
        background: rgba(232, 244, 228, 0.92) !important;
        border: 1.5px solid #c5dfc5 !important;
        border-radius: 12px !important;
        padding: 10px 18px !important;
        box-sizing: border-box !important;
        max-width: 220px !important;
        width: 70% !important;
        height: auto !important;
    }
}

/* ── Logo menú desktop: más grande y más nítido ── */
.site-logo img {
    height: 56px !important;
    max-width: 240px !important;
    width: auto !important;
    object-fit: contain !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
}

/* scroll reveal — moved to unified block below */

/* =============================================================================
   SCROLL REVEAL — UNIFICADO para todas las páginas y dispositivos
   Mismo efecto: fade + subida suave 30px, 0.7s ease-out
============================================================================= */
.vn-reveal,
.vn-reveal-left,
.vn-reveal-right,
.tool-card,
.video-card,
.publication-item,
.news-card,
.partner-card,
.obj-card,
.action-scroll-item,
.vinnea-reveal,
.vinnea-reveal-left,
.vinnea-reveal-right {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out !important;
    will-change: opacity, transform;
}

/* Estado visible */
.vn-reveal.is-visible,
.vn-reveal-left.is-visible,
.vn-reveal-right.is-visible,
.tool-card.is-visible,
.video-card.is-visible,
.publication-item.is-visible,
.news-card.is-visible,
.partner-card.is-visible,
.obj-card.is-visible,
.action-scroll-item.is-visible,
.vinnea-reveal.is-visible,
.vinnea-reveal-left.is-visible,
.vinnea-reveal-right.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Delays escalonados — cards en grid aparecen en cascada */
.tool-card:nth-child(2),
.video-card:nth-child(2),
.publication-item:nth-child(2),
.news-card:nth-child(2),
.partner-card:nth-child(2),
.obj-card:nth-child(2) {
    transition-delay: 0.1s !important;
}

.tool-card:nth-child(3),
.video-card:nth-child(3),
.publication-item:nth-child(3),
.news-card:nth-child(3),
.partner-card:nth-child(3),
.obj-card:nth-child(3) {
    transition-delay: 0.2s !important;
}

.tool-card:nth-child(4),
.video-card:nth-child(4),
.publication-item:nth-child(4),
.news-card:nth-child(4),
.partner-card:nth-child(4),
.obj-card:nth-child(4) {
    transition-delay: 0.3s !important;
}

.tool-card:nth-child(5),
.video-card:nth-child(5),
.publication-item:nth-child(5),
.news-card:nth-child(5),
.partner-card:nth-child(5),
.obj-card:nth-child(5) {
    transition-delay: 0.4s !important;
}

.tool-card:nth-child(6),
.video-card:nth-child(6),
.publication-item:nth-child(6),
.news-card:nth-child(6) {
    transition-delay: 0.5s !important;
}

/* Delay para vn-delay classes */
.vn-delay-1,
.vinnea-delay-1 {
    transition-delay: 0.1s !important;
}

.vn-delay-2,
.vinnea-delay-2 {
    transition-delay: 0.2s !important;
}

.vn-delay-3,
.vinnea-delay-3 {
    transition-delay: 0.3s !important;
}

.vn-delay-4,
.vinnea-delay-4 {
    transition-delay: 0.4s !important;
}

.vn-delay-5,
.vinnea-delay-5 {
    transition-delay: 0.5s !important;
}

/* ══════════════════════════════════════════════════════════
   TABLET NAV FIX (821px – 1100px): same hamburger as mobile
   but header is taller (100px) so panel top must match
   ══════════════════════════════════════════════════════════ */
@media (min-width: 821px) and (max-width: 1100px) {

    /* Panel slides from top:100px (header height) */
    .main-nav {
        position: fixed !important;
        top: 100px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: calc(100vh - 100px) !important;
        background: #fff !important;
        padding: 1.5rem 2rem !important;
        transform: translateY(-120%) !important;
        opacity: 0 !important;
        transition: transform .3s ease, opacity .3s ease !important;
        pointer-events: none !important;
        z-index: 2000 !important;
        display: block !important;
        overflow-y: auto !important;
        flex: none !important;
        box-sizing: border-box !important;
    }

    .main-nav.open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }

    .main-nav>ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-nav>ul>li {
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0 !important;
        list-style: none !important;
        display: block !important;
    }

    .main-nav>ul>li>a {
        display: block !important;
        padding: .9rem 1.5rem !important;
        font-size: 1rem !important;
        white-space: normal !important;
    }

    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #77AD57 !important;
        border-radius: 0 !important;
        padding: .25rem 0 .25rem 1.5rem !important;
        display: none !important;
        margin: 0 !important;
    }

    .dropdown-menu.is-open {
        display: block !important;
    }

    /* Overlay behind panel — pointer-events none so links stay clickable */
    body.nav-is-open::before {
        display: none !important;
    }
}

/* ══════════════════════════════════════════════════════════
   LOGO + HEADER — final override (wins everything above)
   ══════════════════════════════════════════════════════════ */

/* Desktop */
@media (min-width: 1101px) {

    #site-header,
    #site-header.scrolled {
        height: 100px !important;
    }

    .header-inner,
    #site-header.scrolled .header-inner {
        height: 100px !important;
    }

    .page-content-offset {
        height: 100px !important;
    }

    .page-hero {
        padding-top: calc(100px + 2.5rem) !important;
    }

    .hero {
        padding-top: 100px !important;
    }

    .admin-bar #site-header {
        top: 32px !important;
    }

    .admin-bar .page-content-offset {
        height: 132px !important;
    }

    /* Logo: same rendering as footer — no crisp-edges, let browser smooth it */
    .site-logo img,
    #site-header.scrolled .site-logo img {
        height: 78px !important;
        width: auto !important;
        max-width: 480px !important;
        object-fit: contain !important;
        image-rendering: auto !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Layout: 3-column grid — logo left | nav center | lang right */
    .header-inner {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        position: static !important;
        padding: 0 2rem !important;
        gap: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* mobile toggle stays out of the way */
    .nav-toggle {
        display: none !important;
    }

    .site-logo {
        justify-self: start !important;
        position: static !important;
        margin: 0 !important;
        padding-right: 7rem !important;
    }

    .site-logo img,
    #site-header.scrolled .site-logo img {
        height: 58px !important;
        width: auto !important;
        max-width: 360px !important;
        object-fit: contain !important;
        position: static !important;
        transform: none !important;
    }

    .main-nav {
        justify-self: center !important;
        position: static !important;
        transform: none !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
        flex: none !important;
    }

    .lang-switcher {
        justify-self: end !important;
        position: static !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
    }
}

/* Mobile */
@media (max-width: 1100px) {
    .site-logo img {
        height: 40px !important;
        max-width: 200px !important;
    }
}

/* EU badge */
.hero-eu-badge {
    bottom: 7rem !important;
}

@media (max-width: 1100px) {
    .hero-eu-badge {
        bottom: 1.5rem !important;
    }
}

/* Map legend — hide where there is no map */
@media (max-width: 768px) {
    .map-legend {
        display: none !important;
    }
}