/* Mejorar fade del carousel para evitar flash blanco */
.carousel.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 1;
}
.carousel.carousel-fade .carousel-item.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
.carousel.carousel-fade .carousel-inner {
  background: #222; /* color oscuro para evitar flash blanco */
}

/* Botones del slider sobrepuestos y visibles */
.carousel-control-prev, .carousel-control-next {
  z-index: 3;
  opacity: 0.85;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
  background: rgba(0,0,0,0.45);
  opacity: 1;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-size: 2.5rem 2.5rem;
}
/* Carousel Fade Effect */
.carousel.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1);
}
.carousel.carousel-fade .carousel-item.active,
.carousel.carousel-fade .carousel-item-next.carousel-item-start,
.carousel.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  z-index: 2;
}
.carousel.carousel-fade .carousel-item-next,
.carousel.carousel-fade .carousel-item-prev,
.carousel.carousel-fade .carousel-item.active.carousel-item-end,
.carousel.carousel-fade .carousel-item.active.carousel-item-start {
  opacity: 0;
  z-index: 1;
}
/* Custom styles for the site */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

body:not(.home-page) main { padding-top:139px; }
body.sostenibilidad-page main { padding-top:0 !important; }
body.product-detail-page main { padding-top:0 !important; }
body.products-page main { padding-top:0 !important; }
body.blog-list-page main { padding-top:0 !important; }
body.blog-detail-page main { padding-top:0 !important; }
body.contact-page main { padding-top:0 !important; }
/* Strong override to counter other navbar fix styles */
body.sostenibilidad-page main, body.sostenibilidad-page main > * {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.sost-banner { margin-top: 0 !important; }
/* Compensar navbar fijo en la página de sostenibilidad para que la parte superior del banner no quede oculta */
body.sostenibilidad-page .sost-banner { margin-top: 0 !important; }

/* Ajuste específico para el carousel del home removed - handled by the stronger scoped rule below */
body.innovacion-page main { padding-top:0 !important; }
/* For home page, ensure content is pushed below fixed navbar (80px) */
body.home-page main { padding-top:80px !important; }

/* Ensure carousel on home doesn't use negative margin that hides it under navbar */
/* Strong page-scoped override: keep carousel visible and make sure main content accounts for 80px navbar */
html body.home-page #carousel { margin-top: 0 !important; }
html body.home-page main { padding-top: 80px !important; }

/* Navigation - Eliminado para evitar conflictos */

/* Ajuste para scroll padding */
html { scroll-padding-top: 80px; }

/* Dropdown menu improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(0,123,255,0.1);
    color: var(--primary-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220,53,69,0.1);
    color: var(--danger-color);
}

/* Hero Section */
.hero-section {
    background: white;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

/* About page banner */
.about-banner {
    height: 768px;
    background: url('../img/banner-sostenibilidad.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 18px;
    margin-bottom: 18px;
    margin-top: 0 !important;
}
.about-banner .overlay { position:absolute; inset:0; background: transparent; border-radius: 18px; }
.about-banner .content { position:relative; z-index:2; color: #fff; text-align:center; max-width:920px; padding: 0 20px; }
.about-page main { padding-top: 0 !important; }
/* New hero title & button */
.about-hero-title { font-size: clamp(2.2rem,4.2vw,3.6rem); font-weight:300; color:#ffffff; margin:0 0 34px; letter-spacing:.5px; }
.about-hero-title strong { font-weight:800; }
.about-hero-btn { display:inline-block; padding:12px 34px; border:2px solid #ffffff; color:#ffffff; font-weight:600; border-radius:8px; text-decoration:none; background:rgba(255,255,255,0.02); backdrop-filter: blur(2px); transition:background .25s ease, color .25s ease, transform .18s ease; }
.about-hero-btn:hover { background:rgba(255,255,255,0.12); color:#ffffff; transform:translateY(-2px); }
@media (max-width:991.98px){ .about-banner { height: 520px; } }
@media (max-width:575.98px){ .about-banner { height: 340px; } .about-hero-title { font-size:2rem; margin-bottom:26px; } .about-hero-btn { padding:10px 26px; font-size:.9rem; } }

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-img-top {
    transition: transform 0.3s ease;
}

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

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

/* Sections */
.section {
    padding: 80px 0;
}

/* Carousel */
.carousel-item img {
    border-radius: 15px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-indicators button {
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border-bottom: none;
    font-weight: 600;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
}

.alert-dismissible .btn-close {
    border-radius: 50%;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-hover:hover {
    animation: pulse 0.3s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* CTA Sections */
.cta-section {
    position: relative;
    overflow: hidden;
}



.cta-section .container {
    position: relative;
    z-index: 1;
}

/* Icon improvements */
.fa-stack {
    margin-bottom: 20px;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Sostenibilidad page styles (migrated from templates/website/sostenibilidad.html) */
/* Banner */
.sost-banner {
    height: 768px;
    background: url('../img/banner-sostenibilidad.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px;
    margin-bottom: 0;
}
.sost-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,57,71,0.55);
    border-radius: 24px;
    z-index: 1;
}
.sost-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    color: #fff;
}
.sost-banner-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

/* Política block (purple card) */
.sost-policy {
    height: 811px;
    background: url('../img/pattern-sostenibilidad.png') center/cover no-repeat;
    background-color: #bdb5e8; /* user-provided purple (rgba(189,181,232,1)) */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 18px;
    margin: 40px 0 0; /* quita el margen inferior para que quede pegado al siguiente bloque */
    padding: 48px 24px;
}
.sost-policy-overlay {
    position: absolute;
    inset: 0;
    /* semi-transparent overlay using the user color with 0.6 alpha */
    background: rgba(189,181,232,0.6);
    border-radius: 18px;
    z-index: 1;
    backdrop-filter: none;
}
.sost-policy-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    max-width: 920px;
    margin: 0 auto;
}
.sost-policy-title { font-size: 2.1rem; font-weight:700; margin-bottom: 20px; }
.sost-policy p { text-align: left; margin: 10px 0; line-height: 1.6; opacity: 0.95; }
@media (max-width: 991.98px){
    .sost-banner { height: 520px; }
    .sost-banner-title { font-size: 2.1rem; }
}
@media (max-width: 575.98px){
    .sost-banner { height: 340px; border-radius: 14px; }
    .sost-banner-title { font-size: 1.3rem; margin-bottom: 18px; }
    .sost-policy { height: auto; margin: 24px 0; padding: 28px 18px; }
    .sost-policy-content { padding: 0 6px; }
}

/* Report block styles */
.sost-report { margin: 0 0 80px; /* asegurar margin-top:0 para quedar junto a .sost-policy */ }
.sost-report-inner { height: 332px; background-position: center; background-size: cover; display:flex; align-items:center; justify-content:center; position:relative; border-radius:12px; overflow:hidden; }
.sost-report-overlay { position:absolute; inset:0; background: rgba(0,0,0,0.28); }
.sost-report-content { position:relative; z-index:2; text-align:center; color:#fff; width:100%; max-width:920px; padding:0 20px; }
.sost-report-title { font-size:1.6rem; font-weight:700; margin-bottom:14px; }
.sost-report .btn {
    padding: 10px 22px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.9);
    color: #ffffff;
    margin-top: 12px;
    transition: background .18s ease, color .18s ease, transform .08s ease;
}
.sost-report .btn:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Goals grid (9 squares) */
.sost-goals { background: #ffffff; }
.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 36px;
    justify-items: center;
    align-items: start;
    padding: 12px 0 24px;
}
.goal-item { text-align: center; max-width: 260px; }
.goal-square {
    width: 300px; /* aumentado ~20% (250 -> 300) */
    height: 300px; /* aumentado ~20% */
    background: #e9e9e9;
    border-radius: 0; /* quitar border-radius */
    margin: 0 auto 12px;
}
.goal-square img { width:100%; height:100%; object-fit:cover; border-radius:0; display:block; }
.goal-title { font-weight: 700; font-size: 0.95rem; color: #111; }
@media (max-width: 991.98px){ .goals-grid { grid-template-columns: repeat(2,1fr); gap:34px 24px; } .goal-square { width:156px;height:156px; } }
@media (max-width: 575.98px){ .goals-grid { grid-template-columns: 1fr; } .goal-square { width:132px;height:132px; } }

/* Animations for goal squares */
@keyframes goal-fade-up {
    0% { opacity: 0; transform: translateY(18px) scale(0.985); }
    60% { opacity: 1; transform: translateY(-6px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.goal-item { opacity: 0; transform: translateY(18px); }
.goal-item.is-visible { opacity: 1; transform: none; }
.goal-square {
        transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, background 180ms ease;
        will-change: transform, box-shadow;
}
.goal-square:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 28px rgba(16,24,40,0.12);
        background: linear-gradient(180deg, #ffffff 0%, #f6f6f8 100%);
}

/* Staggered entrance using nth-child delays */
.goals-grid .goal-item:nth-child(1) { animation: goal-fade-up 520ms ease both; animation-delay: 80ms; }
.goals-grid .goal-item:nth-child(2) { animation: goal-fade-up 520ms ease both; animation-delay: 160ms; }
.goals-grid .goal-item:nth-child(3) { animation: goal-fade-up 520ms ease both; animation-delay: 240ms; }
.goals-grid .goal-item:nth-child(4) { animation: goal-fade-up 520ms ease both; animation-delay: 320ms; }
.goals-grid .goal-item:nth-child(5) { animation: goal-fade-up 520ms ease both; animation-delay: 400ms; }
.goals-grid .goal-item:nth-child(6) { animation: goal-fade-up 520ms ease both; animation-delay: 480ms; }
.goals-grid .goal-item:nth-child(7) { animation: goal-fade-up 520ms ease both; animation-delay: 560ms; }
.goals-grid .goal-item:nth-child(8) { animation: goal-fade-up 520ms ease both; animation-delay: 640ms; }
.goals-grid .goal-item:nth-child(9) { animation: goal-fade-up 520ms ease both; animation-delay: 720ms; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .goals-grid .goal-item { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
    .goal-square:hover { transform: none !important; box-shadow: none !important; }
}

/* Medio Ambiente card + tabs */
.medio-card {
    border-radius: 18px; /* border radius aplicado en toda la tarjeta */
    padding: 40px 0; /* vertical padding; inner content constrained */
    display: flex;
    align-items: center;
    justify-content: center; /* center card-inner both axes */
    height: 503px; /* fixed height requested */
    margin: 12px 0 36px;
    color: #592239; /* color solicitado */
    overflow: hidden;
}
.medio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* slightly lighter overlay per request */
    background: linear-gradient(rgba(40,26,55,0.18), rgba(40,26,55,0.12));
    pointer-events: none;
}
.medio-card .card-inner {
    position: relative;
    /* slightly brighter inner background for better contrast */
    background: rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 22px 18px;
    margin: 0 auto;
    max-width: 1180px; /* center content */
    width: calc(100% - 48px);
    color: #592239; /* asegurar color dentro del contenido */
}
.medio-title { font-size: 1.95rem; font-weight: 700; text-align: center; margin-bottom: 18px; color: #592239; }
.medio-tabs { display:flex; gap:12px; justify-content: space-between; margin-bottom: 18px; position: relative; align-items: center; color:#592239; }
/* faint full-width rule under tabs */
.medio-tabs::before { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: rgba(0,0,0,0.08); top: 58%; transform: translateY(6px); border-radius:2px; }
.medio-tab {
    padding: 6px 8px;
    cursor: pointer;
    background: transparent;
    color: rgba(89,34,57,0.95); /* color solicitado aplicado */
    border: none;
    font-weight: 600;
    font-size: 0.98rem;
    position: relative;
    transition: color 160ms ease, background 160ms ease;
}
.medio-tab:focus { outline: none; }
.medio-tab:hover { color: rgba(255,255,255,0.90); }
.medio-tab.active { color: #592239; }
/* small centered active underline */
.medio-tab::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -14px; width: 0; height: 3px; background: rgba(89,34,57,0.95); border-radius:2px; transition: width 220ms cubic-bezier(.2,.9,.2,1); }
.medio-tab.active::after { width: 96px; }

.medio-content {
    min-height: 120px;
    padding: 18px 24px 12px 24px;
    /* brighten the content box slightly to improve legibility */
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.medio-pane { position: absolute; inset: 0; padding: 6px 12px; opacity: 0; transform: translateY(8px); transition: opacity 340ms cubic-bezier(.2,.9,.2,1), transform 340ms cubic-bezier(.2,.9,.2,1); }
.medio-pane.active { opacity: 1; transform: translateY(0); }
.medio-pane p { color: rgba(255,255,255,0.92); text-align: center; max-width: 980px; margin: 0 auto; }

/* Aplicar color de texto al contenido dentro de medio-card */
/* COMENTADO - ahora usa estilos de sostenibilidad.css
.medio-card .card-inner, .medio-card .card-inner p, .medio-card .medio-pane, .medio-card .medio-pane p {
    color: #ffffff !important;
}
*/

@media (max-width: 991.98px) {
  .medio-tabs { gap:10px; }
  .medio-tab::after { width: 72px; }
}

/* Responsive: on small screens, let the medio-card grow and keep content readable */
@media (max-width: 575.98px) {
    .medio-card { height: auto; padding: 28px 12px; }
    .medio-card .card-inner { width: auto; }
    .medio-pane p { text-align: left; }
}
@media (max-width: 575.98px) {
  .medio-tabs { flex-wrap: wrap; gap:8px; justify-content: center; }
  .medio-title { font-size: 1.4rem; }
  .medio-tab::after { width: 56px; }
}

/* PROGRAMAS Y PROYECTOS - white section */
.programs-section { background: #ffffff; padding: 56px 0; }
.programs-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Fixed size for specific uva image in sostenibilidad - use natural width (avoid PNG padding) and keep consistent height */
.programs-image img.fixed-uv {
    width: auto;
    max-width: 100%;
    height: 498px;
    object-fit: cover;
    display: block;
}
@media (max-width: 767.98px) {
    .programs-image img.fixed-uv { width: 100%; height: auto; }
}

/* Programs simple rows: make a 3-column responsive layout where the image is contained */
.programs-simple-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.programs-row {
    display: flex;
    align-items: center; /* vertical centering */
    gap: 28px;
    margin-bottom: 36px;
}
.programs-row .programs-text {
    flex: 1 1 0;
}
.programs-row .programs-image {
    flex: 0 0 395px; /* fixed image column */
    display: flex;
    align-items: center;
    justify-content: center;
}
.programs-row .programs-image img {
    max-width: 100%;
    display: block;
}

/* Alternate row: keep same layout but allow image on left if desired */
.programs-row.alt { flex-direction: row-reverse; }

/* Small screens: stack vertically for readability */
@media (max-width: 767.98px) {
    .programs-row { flex-direction: column; gap: 18px; }
    .programs-row .programs-image { flex: 0 0 auto; width: 100%; }
    .programs-row .programs-image img.fixed-uv { width: 100%; height: auto; }
    .programs-row.alt { flex-direction: column; }
}
.programs-title { font-size: 1.9rem; font-weight: 800; color: #1f1230; text-align: left; margin-bottom: 20px; }
.programs-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.program-card { background: transparent; padding: 18px 14px; border-radius: 12px; }
.program-card h4 { margin: 0 0 6px 0; font-size: 1.05rem; color: #2b1536; }
.program-card p { margin: 0; color: #4a3b50; line-height: 1.6; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 520ms cubic-bezier(.2,.9,.2,1), transform 520ms cubic-bezier(.2,.9,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* Title animation */
@keyframes title-pop {
    0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
    60% { opacity: 1; transform: translateY(2px) scale(1.02); }
    100% { opacity: 1; transform: none; }
}
.programs-title { text-align: center; animation: title-pop 560ms cubic-bezier(.2,.9,.2,1) both; }

/* Card hover lift */
.program-card { transition: transform 180ms ease, box-shadow 180ms ease; }
.program-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(16,24,40,0.06); }

@media (prefers-reduced-motion: reduce) {
    .programs-title { animation: none !important; }
    .program-card { transition: none !important; transform: none !important; box-shadow: none !important; }
}

/* --- Overrides (enforced) : goal squares size shrink --- */
html body.sostenibilidad-page .goals-grid .goal-square { width:144px !important; height:144px !important; }
@media (max-width: 991.98px){ html body.sostenibilidad-page .goals-grid .goal-square { width:140px !important; height:140px !important; } }
@media (max-width: 575.98px){ html body.sostenibilidad-page .goals-grid .goal-square { width:120px !important; height:120px !important; } }
/* End overrides */

@media (min-width: 768px) {
    .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

/* Simple Programs 3-column Rows */
.programs-simple { padding:70px 0 90px; background:#ffffff; }
.programs-simple-inner { max-width:1280px; margin:0 auto; padding:0 32px; }
.programs-simple-title { font-size:2rem; font-weight:800; text-align:center; margin:0 0 54px; color:#2b1638; }
.programs-row { display:grid; grid-template-columns: 1fr auto 1fr; gap:48px; align-items:center; padding:38px 42px; border-radius:30px; background:#fff; box-shadow:0 4px 18px rgba(0,0,0,0.05); position:relative; }
.programs-row + .programs-row { margin-top:40px; }
.programs-row.alt { background:#bdb5e8; }
.programs-row.alt:before { content:''; position:absolute; inset:0; background:linear-gradient(rgba(40,26,55,0.32), rgba(40,26,55,0.32)); border-radius:30px; }
.programs-row.alt > * { position:relative; z-index:1; }
.programs-text h4 { font-size:1rem; font-weight:700; margin:0 0 10px; line-height:1.35; color:#2b1638; }
.programs-text p { margin:0; font-size:.9rem; line-height:1.55; color:#4a3b50; }
.programs-row.alt .programs-text h4 { color:#fff; }
.programs-row.alt .programs-text p { color:rgba(255,255,255,0.92); }
.programs-image { display:flex; align-items:center; justify-content:center; overflow: visible; position: relative; }
.programs-image img { max-width:100%; display:block; filter:drop-shadow(0 6px 16px rgba(0,0,0,0.18)); }

/* --- Unified imagenes Sostenibilidad: evitar recortes y facilitar ajustes --- */
/* En lugar de forzar width/height en la imagen, limitamos el contenedor .programs-image
   y dejamos que la imagen ocupe el 100% del contenedor sin recortarse (object-fit: contain).
   Esto evita que PNGs con padding o imágenes altas se corten. */
body.sostenibilidad-page .programs-row .programs-image {
    max-width: 40%; /* controla tamaño relativo en desktop (ajustado a 40%) */
    display: flex;
    align-items: center;
    justify-content: center;
}

body.sostenibilidad-page .programs-row .programs-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Para la variante fixed-uv mantenemos una altura máxima razonable, pero no forzamos recorte */
body.sostenibilidad-page .programs-row .programs-image img.fixed-uv {
    height: auto !important;
    max-height: 300px; /* evitar imágenes gigantes, ajustar según diseño */
    object-fit: contain !important;
}

/* Para móviles: imágenes a ancho completo y contenedor sin limitar */
@media (max-width: 767.98px) {
    body.sostenibilidad-page .programs-row .programs-image { max-width: 100%; }
    body.sostenibilidad-page .programs-row .programs-image img { width: 100% !important; height: auto !important; }
    body.sostenibilidad-page .programs-row .programs-image img.fixed-uv { max-height: none !important; }
}

/* Vertically center text blocks within the grid cells */
.programs-row .programs-text { display:flex; flex-direction:column; justify-content:center; }

/* Responsive */
@media (max-width: 1199.98px){ .programs-row { grid-template-columns: 1fr 360px 1fr; gap:40px; } }
@media (max-width: 991.98px){ .programs-row { grid-template-columns: 1fr; text-align:center; padding:34px 34px; } .programs-image img:not(.fixed-uv) { width:260px; } }
@media (max-width: 575.98px){ .programs-simple { padding:56px 0 70px; } .programs-simple-title { font-size:1.55rem; margin-bottom:38px; } .programs-row { padding:28px 24px; gap:28px; } .programs-image img { width:200px; } }

/* New: three-column programs grid (text - image - text) */
.programs-grid-three { display: grid; gap: 36px 28px; }
.programs-grid-three .programs-item { display: grid; grid-template-columns: 1fr 360px 1fr; gap: 28px; align-items: center; padding: 32px; border-radius: 18px; background: #fff; box-shadow: 0 6px 20px rgba(16,24,40,0.04); }
.programs-grid-three .programs-item.alt { background: linear-gradient(180deg,#f6f6f8,#fff); }

/* Alternate backgrounds: odd = white, even = purple (#BDB5E8) */
.programs-grid-three .programs-item:nth-child(odd) { background: #ffffff; }
.programs-grid-three .programs-item:nth-child(even) { background: #BDB5E8; color: #fff; }
.programs-grid-three .programs-item:nth-child(even) .pi-text { color: rgba(255,255,255,0.95); }
.programs-grid-three .programs-item:nth-child(even) .pi-text h4 { color: #ffffff; }

/* Reduce image in row 3 ~20% */
.programs-grid-three .programs-item:nth-child(3) .pi-image .pi-img {
    max-width: 80%;
}

/* Texto de filas con fondo blanco: color y tipografía solicitada */
.programs-grid-three .programs-item:nth-child(odd) .pi-text {
    color: #592239;
    font-family: 'Geologica', sans-serif;
}
.programs-grid-three .programs-item:nth-child(odd) .pi-text h4 { color: #592239; }
.programs-grid-three .pi-text { padding: 8px 12px; }
.programs-grid-three .pi-image { display:flex; align-items:center; justify-content:center; }
.programs-grid-three .pi-image .pi-img { width:100%; height:auto; max-width:360px; object-fit: contain; display:block; }

@media (max-width: 991.98px) {
    .programs-grid-three .programs-item { grid-template-columns: 1fr; text-align: center; }
    .programs-grid-three .pi-image .pi-img { max-width: 260px; margin: 0 auto; }
}

@media (max-width: 575.98px) {
    .programs-grid-three .pi-image .pi-img { max-width: 200px; }
}

/* Single centered item (última fila sin imagen) */
.programs-grid-three .programs-item.single { grid-template-columns: 1fr; text-align: center; padding: 36px 24px; }
.programs-grid-three .programs-item.single .pi-single { margin: 0 auto; max-width: 820px; }
.programs-grid-three .programs-item.single .pi-single h4 { margin-bottom: 12px; }
@media (max-width: 575.98px){
    body.sostenibilidad-page .programs-image img {
        width: 100px !important;
        height: auto !important;
    }
    body.sostenibilidad-page .programs-image img.fixed-uv {
        width: 100px !important;
        height: 125px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none !important; transform: none !important; opacity: 1 !important; }
}

/* ================= ABOUT PAGE ENHANCEMENTS (Nosotros/Misión/Visión + Stats + Valores) ================ */
.about-page .nmv-section { background:#ffffff; padding:60px 0 30px; }
.nmv-inner { max-width:1350px; margin:0 auto; padding:0 40px; }
.nmv-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:40px; }
.nmv-item h3 { font-size:1.05rem; font-weight:700; text-align:center; margin:0 0 18px; color:#342035; letter-spacing:.5px; }
.nmv-item p { font-size:.84rem; line-height:1.55; margin:0; color:#3f3a40; text-align:left; }

/* Stats Bar */
.stats-bar-wrapper { position:relative; padding:10px 0 0; background:#ffffff; }
.stats-bar { max-width:1350px; margin:0 auto; background:linear-gradient(110deg,#ef5966 0%,#eb5a63 25%,#f36655 65%,#f86e4a 100%); color:#fff; display:grid; grid-template-columns:repeat(4,1fr); gap:10px; border-radius:28px; padding:48px 70px; position:relative; overflow:hidden; }
.stats-bar:before { content:''; position:absolute; inset:0; background:url('../img/pattern-sostenibilidad.png') center/cover no-repeat; opacity:.14; mix-blend-mode:overlay; }
.stat { position:relative; text-align:left; }
.stat-value { font-size:2.4rem; font-weight:800; line-height:1; margin:0 0 10px; letter-spacing:1px; }
.stat-label { font-size:.78rem; font-weight:500; text-transform:none; line-height:1.25; }

/* Valores */
.valores-section { background:#ffffff; padding:72px 0 40px; }
.valores-inner { max-width:1320px; margin:0 auto; padding:0 40px; }
.valores-title { text-align:center; font-size:1.55rem; font-weight:700; letter-spacing:.5px; margin:0 0 56px; color:#251326; }
.valores-title span { color:#411f45; }
.valores-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:56px 80px; align-items:start; }
.valor-block h4 { font-size:1rem; font-weight:700; margin:0 0 14px; color:#3c1f46; display:flex; align-items:center; gap:8px; }
.valor-icon { font-size:1.6rem; display:block; margin-bottom:10px; }
.valor-block p { font-size:.82rem; line-height:1.55; margin:0; color:#3f3a40; }

/* Icon strip reused on about */
.icon-strip { position:relative; z-index:2; margin-top:0; padding:0; }
.icon-strip-bar { width:100vw; margin-left:calc(50% - 50vw); background:#0f2731 url("../img/image 9.png") center/cover no-repeat; border-radius:24px; height:120px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.icon-strip-bar:before { content:""; position:absolute; inset:0; background:rgba(0,0,0,0.25); mix-blend-mode:normal; }
.icon-strip-bar > * { position:relative; z-index:2; }
@media (max-width:575.98px){ .icon-strip-bar { height:110px; border-radius:20px; } }
.icon-strip-bar .icons-row { width:100%; }
.icon-svg-white { filter:brightness(0) invert(1); width:34px; height:34px; margin-bottom:6px; }
.icon-text-white { color:#ffffff; font-size:12px; margin-bottom:0; font-weight:400; line-height:1.1; }

/* Responsive adjustments */
@media (max-width: 1199.98px){
    .stats-bar { padding:44px 46px; }
    .stat-value { font-size:2.2rem; }
}
@media (max-width: 991.98px){
    .nmv-grid { grid-template-columns:1fr; gap:34px; }
    .stats-bar { grid-template-columns:repeat(2,1fr); row-gap:34px; }
    .valores-grid { grid-template-columns:1fr; gap:42px; }
    .stat { text-align:center; }
    .stat-label { font-size:.74rem; }
}
@media (max-width: 575.98px){
    .nmv-inner, .valores-inner { padding:0 22px; }
    .stats-bar { grid-template-columns:1fr 1fr; padding:40px 34px; border-radius:22px; }
    .stat-value { font-size:1.9rem; }
    .valores-title { font-size:1.35rem; margin-bottom:44px; }
    .valores-grid { gap:34px; }
    .valor-block p, .nmv-item p { font-size:.8rem; }
}

@media (prefers-reduced-motion: reduce){
    .stats-bar, .nmv-grid, .valores-grid { animation:none !important; }
}

/* Extended Valores section */
.valores-extended { background:#ffffff; padding:10px 0 30px; }
.valores-ext-inner { max-width:1320px; margin:0 auto; padding:0 40px; }
.valores-ext-top { background:linear-gradient(115deg,#ef5966 0%, #eb5a63 30%, #f36655 70%, #f86e4a 100%); border-radius:34px; padding:46px 70px; display:grid; grid-template-columns:repeat(2,1fr); gap:46px; position:relative; overflow:hidden; }
.valores-ext-top:before { content:""; position:absolute; inset:0; background:url('../img/pattern-sostenibilidad.png') center/cover no-repeat; opacity:.2; }
.valor-ext { position:relative; z-index:1; color:#ffffff; text-align:left; }
.valor-ext h4 { font-size:0.95rem; font-weight:700; margin:14px 0 16px; letter-spacing:.5px; }
.valor-ext p { font-size:0.74rem; line-height:1.55; margin:0; max-width:520px; }
.valor-ext-icon { width:44px; height:44px; filter:brightness(0) invert(1); }
.valores-ext-bottom { display:grid; grid-template-columns:repeat(2,1fr); gap:70px; padding:54px 10px 10px; }
.valor-ext-btm { text-align:left; }
.valor-ext-btm h4 { font-size:0.95rem; font-weight:700; color:#d45458; letter-spacing:.5px; margin:0 0 14px; }
.valor-ext-btm p { font-size:0.74rem; line-height:1.55; margin:0; color:#473d45; max-width:560px; }
.valor-ext-btm .valor-ext-icon.accent { filter:none; width:42px; height:42px; margin-bottom:12px; }

@media (max-width: 1199.98px){
    .valores-ext-top { padding:46px 50px; gap:40px; }
    .valores-ext-bottom { gap:56px; }
}
@media (max-width: 991.98px){
    .valores-ext-top { grid-template-columns:1fr; }
    .valores-ext-bottom { grid-template-columns:1fr; padding-top:44px; }
    .valor-ext, .valor-ext-btm { text-align:center; }
    .valor-ext p, .valor-ext-btm p { margin:0 auto; }
}
@media (max-width: 575.98px){
    .valores-ext-inner { padding:0 24px; }
    .valores-ext-top { padding:40px 32px; border-radius:26px; }
    .valor-ext p, .valor-ext-btm p { font-size:0.72rem; }
    .valores-ext-bottom { gap:42px; }
}

/* ===== SECCIÓN INNOVACIÓN: Estadísticas + Imagen con anotaciones (reconstruida) ===== */

/* Contenedor principal y estadísticas */
.innov-stats-section { 
    background: linear-gradient(180deg, #b9a7e6, #cbbbee); 
    padding: 48px 0 0; 
    position: relative;
    margin-top: -40px;
    border-radius: 24px 24px 0 0;
    z-index: 2;
}

.innov-stats-card { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px 40px 20px; 
    background: transparent; 
    border-radius: 18px; 
}

.innov-stats-grid { 
    display: flex; 
    gap: 18px; 
    justify-content: space-between; 
    align-items: stretch; 
    margin-bottom: 28px; 
}

.innov-stats-grid .stat { 
    flex: 1; 
    text-align: center; 
    padding: 18px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.innov-stats-grid .stat.visible { 
    opacity: 1;
    transform: translateY(0);
}

.innov-stats-grid .stat .stat-value { 
    font-size: 2.4rem; 
    font-weight: 800; 
    color: #fff; 
}

.innov-stats-grid .stat .stat-label { 
    color: rgba(255,255,255,0.9); 
    font-size: 0.95rem; 
}

.innov-stats-card .divider { 
    width: 85%; 
    height: 3px; 
    background: #fff; 
    margin: 18px auto 28px; 
    border-radius: 2px; 
    opacity: 0.95; 
}

.innov-section-title { 
    text-align: center; 
    color: #fff; 
    font-size: 2.4rem; 
    font-weight: 800; 
    margin: 0 0 48px; 
}

.innov-section-title span { 
    font-weight: 400; 
}

/* Contenedor de imagen anotada centrado */
.innov-annotated-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 40px 20px; 
}

.innov-image-container { 
    position: relative; 
    max-width: 650px; 
    width: 100%; 
    margin: 0 auto; 
}

.innov-grape-img { 
    width: 100%; 
    height: auto; 
    display: block; 
    transform: rotate(26.794deg); 
}

/* Puntos conectores sobre la imagen */
.connector-dot { 
    position: absolute; 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    background: #fff; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.18); 
    z-index: 3; 
    opacity: 0;
    animation: dotFadeIn 0.8s ease forwards;
}

/* Líneas horizontales desde los puntos hacia las etiquetas */
.connector-dot::before { 
    content: ''; 
    position: absolute; 
    top: 50%; 
    height: 2px; 
    background: #fff; 
    transform: translateY(-50%);
    transform-origin: left;
    animation: lineGrow 1s ease forwards;
}

/* Animaciones para desktop/tablet */
@keyframes dotFadeIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes lineGrow {
    0% { width: 0; opacity: 0; }
    100% { opacity: 1; }
}

@keyframes labelSlideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes labelSlideInRight {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* LADO IZQUIERDO - Puntos y líneas */

/* Sistema flotante - superior izquierda */
.connector-dot.dot-top-left { 
    left: 40%; 
    top: 20%;
    animation-delay: 0.2s;
}

.connector-dot.dot-top-left::before { 
    right: 100%; 
    width: 300px;
    transform-origin: right;
    animation-delay: 0.6s;
}

/* Test Block - medio izquierda */
.connector-dot.dot-mid-left { 
    left: 24%; 
    top: 47%;
    animation-delay: 0.6s;
}

.connector-dot.dot-mid-left::before { 
    right: 100%; 
    width: 280px;
    transform-origin: right;
    animation-delay: 1s;
}

/* LADO DERECHO - Puntos y líneas */

/* Doble Cosecha - superior derecha */
.connector-dot.dot-top-right { 
    right: 35%; 
    top: 32%;
    animation-delay: 1s;
}

.connector-dot.dot-top-right::before { 
    left: 100%; 
    width: 300px;
    animation-delay: 1.4s;
}

/* Planta de Embalaje - inferior derecha */
.connector-dot.dot-bottom-right { 
    right: 24%; 
    bottom: 22%;
    animation-delay: 1.4s;
}

.connector-dot.dot-bottom-right::before { 
    left: 100%; 
    width: 280px;
    animation-delay: 1.8s;
}

/* Etiquetas de texto */
.label-box { 
    position: absolute; 
    color: #fff; 
    z-index: 2; 
    max-width: 260px;
    opacity: 0;
}

.label-box h6 { 
    margin: 0 0 4px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    line-height: 1.3; 
}

.label-box h6 span { 
    font-weight: 400; 
    font-size: 0.85rem; 
    display: block; 
}

.label-box .label-desc { 
    margin: 8px 0 0; 
    font-size: 0.84rem; 
    line-height: 1.5; 
    color: rgba(255,255,255,0.95); 
}

/* POSICIONES DE ETIQUETAS - mucho más alejadas de la imagen */

/* Sistema flotante - izquierda arriba */
.label-top-left { 
    left: -28%; 
    top: 16%; 
    text-align: right;
    animation: labelSlideIn 0.8s ease forwards;
    animation-delay: 0.8s;
}

/* Test Block - izquierda centro */
.label-mid-left { 
    left: -40%; 
    top: 40%; 
    text-align: right;
    animation: labelSlideIn 0.8s ease forwards;
    animation-delay: 1.2s;
}

/* Doble Cosecha - derecha arriba */
.label-top-right { 
    right: -28%; 
    top: 28%; 
    text-align: left;
    animation: labelSlideInRight 0.8s ease forwards;
    animation-delay: 1.6s;
}

/* Planta de Embalaje - derecha abajo */
.label-bottom-right { 
    right: -38%; 
    bottom: 18%; 
    text-align: left;
    animation: labelSlideInRight 0.8s ease forwards;
    animation-delay: 2s;
}

/* Responsive: tablet */
@media (max-width: 991.98px) {
    .innov-stats-grid { 
        flex-wrap: wrap; 
    }
    
    .innov-image-container { 
        max-width: 500px; 
    }
    
    .connector-dot::before { 
        width: 120px !important; 
    }
    
    .label-box { 
        max-width: 220px; 
        font-size: 0.9rem; 
    }
}

/* Responsive: móvil */
@media (max-width: 575.98px) {
    /* Stats en móvil: mostrar uno a la vez en loop */
    .innov-stats-grid { 
        display: block !important;
        position: relative;
        min-height: 140px;
        margin-bottom: 28px;
    }
    
    .innov-stats-grid .stat {
        position: absolute !important;
        left: 50% !important;
        top: 0 !important;
        transform: translateX(-50%) translateY(20px) !important;
        opacity: 0 !important;
        width: 90% !important;
        max-width: 320px !important;
        transition: opacity 0.6s ease, transform 0.6s ease !important;
        background: rgba(255, 255, 255, 0.1);
        padding: 24px 20px !important;
        border-radius: 12px;
        backdrop-filter: blur(2px);
    }
    
    .innov-stats-grid .stat.visible {
        opacity: 0 !important;
        transform: translateX(-50%) translateY(20px) !important;
    }
    
    .innov-stats-grid .stat.active-mobile-stat {
        opacity: 1 !important;
        transform: translateX(-50%) translateY(0) !important;
        z-index: 10 !important;
    }
    
    .innov-stats-grid .stat .stat-value {
        font-size: 2.2rem !important;
    }
    
    .innov-stats-grid .stat .stat-label {
        font-size: 0.9rem !important;
    }
    
    .innov-section-title { 
        font-size: 1.6rem; 
        margin-bottom: 32px; 
    }
    
    .innov-annotated-wrapper { 
        flex-direction: column;
        position: relative;
        min-height: 500px;
        padding-bottom: 200px;
    }
    
    .innov-image-container { 
        max-width: 90%;
        position: relative;
        margin-bottom: 40px;
    }
    
    /* Ocultar puntos y líneas en móviles */
    .connector-dot, 
    .connector-dot::before { 
        display: none !important; 
    }
    
    /* Etiquetas en móvil: ciclo animado - DEBAJO de la imagen */
    .label-box { 
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        top: calc(100% + 50px) !important;
        bottom: auto !important;
        transform: translateX(-50%) !important;
        text-align: center !important;
        margin: 0 !important;
        max-width: 90% !important;
        width: 90% !important;
        opacity: 0 !important;
        animation: none !important;
        animation-delay: 0s !important;
        transition: opacity 0.8s ease !important;
        padding: 20px 15px !important;
        background: rgba(255,255,255,0.05) !important;
        border-radius: 12px !important;
        backdrop-filter: blur(2px) !important;
    }
    
    .label-box.active-mobile { 
        opacity: 1 !important;
        z-index: 10 !important;
    }
    
    .label-box h6 {
        font-size: 1.1rem !important;
    }
    
    .label-box .label-desc {
        font-size: 0.9rem !important;
        margin-top: 10px !important;
    }
}

@media (max-width: 991.98px){
    .connector-dot::after { width: 90px; }
    .connector-dot.dot-top { left:34%; top:16%; }
    .connector-dot.dot-mid { left:42%; top:46%; }
    .connector-dot.dot-bottom { left:50%; top:78%; }
}

@media (max-width: 575.98px){
    .connector-dot::after { width: 60px; }
    .label-top-left, .label-mid-left, .label-center-right, .label-bottom-right { position: relative; left: 0; right:0; top: auto; margin: 8px auto; text-align:center; }
    .connector-dot{ display:none; }
}
