/* =======================================================
   ESTILO UNIFICADO APROGAN WEB 2026 - FINAL CORREGIDO
   ======================================================= */

/* 1. VARIABLES Y CONFIGURACIÓN GLOBAL */
:root {
    --verde-principal: #004934; /* Verde oscuro institucional */
    --verde-claro: #2ecc71;      /* Verde vibrante */
    --verde-hover: #27ae60;
    --verde-oscuro: #003324;
    --gris-fondo: #f4f7f6;      
    --texto-oscuro: #2c3e50;
    --blanco: #ffffff;
    --sombra: 0 4px 12px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--gris-fondo);
    color: var(--texto-oscuro);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal */
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

main section:not(.hero) {
    position: relative;
    background-color: white; /* Evita que la foto se vea "detrás" del texto */
    z-index: 10; /* Lo pone por encima del carrusel al hacer scroll */
}

/* 2. HEADER Y NAVEGACIÓN (ELEMENTOS BASE) */
header {
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
}

header.header-transparente {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent !important;
    box-shadow: none;
}

header.header-fijo {
    background-color: var(--verde-principal);
    color: var(--blanco);
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-container {
    width: 95%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px; /* Altura fija para consistencia */
}

/* LOGO Y TEXTO HEADER */
.logo {
    display: flex;
    align-items: center;    /* Centrado vertical perfecto */
    gap: 15px;              /* Espacio entre el círculo y el texto */
    padding: 10px;
}

.logo-container {
    display: flex;          /* Alinea los elementos en fila */
    align-items: center;    /* Centrado vertical perfecto */
    gap: 20px;             /* Espacio entre el logo y el texto */
    background-color: #f5f5f5; /* Fondo opcional para contraste */
    padding: 10px;
}

.imglogo {
    width: 90px;            /* Tamaño del círculo en móvil */
    height: 90px;           /* Debe ser igual al ancho */
    background-color: #FFFFFF; /* Fondo blanco del círculo */
    border: 3px solid var(--verde-claro); /* Borde verde */
    border-radius: 50%;     /* Lo hace circular */
    padding: 8px;           
    box-sizing: border-box; /* Asegura que el padding no agrande la imagen */
    object-fit: contain;    /* Mantiene la proporción del logo dentro */
    flex-shrink: 0;         /* Evita que se aplaste en móviles */
}

.logonombre {
    
    font-size: 1.5rem;

    line-height: 1.2;
    color: var(--blanco);
    margin: 0;              
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Asegura el centrado vertical interno */
    text-align: center;
}

.logonombre span {
    display: block;
    font-size: 1.3rem;
 
  
    line-height: 1.1;
    margin: 0;
    transform: scaleY(1.1); /* Bajamos de 1.3 a 1.1 */
    transform-origin: center;
}
    
    


.texto-header {
    display: block;
    font-family: 'Open Sans', sans-serif; 
    line-height: 1.05;
    text-transform: uppercase;
    color: #F3F4F6;
    font-size: 28px;
    vertical-align: middle;
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
    .texto-header {
        font-size: 13px !important;
        line-height: 1.4;
        white-space: normal !important;
        word-break: normal;
    }
    .header-container {
        height: auto !important;
        padding: 8px 10px;
    }
    .imglogo {
        width: 50px !important;
        height: 50px !important;
        border-width: 2px !important;
    }
    .logonombre {
        flex: 1;
        min-width: 0;
    }
}

/* MENÚ Y BOTÓN HAMBURGUESA */
.menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.menu a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.menu a:hover { color: var(--verde-claro); }
/* BOTONES   */
        .btn-detalles {
            display: block;
            width: 100%;
            padding: 15px;
            background: var(--verde-principal);
            color: white;
            text-align: center;
            text-decoration: none;
            font-weight: 700;
            font-size: 0.8rem;
            text-transform: uppercase;
        }
.btn-ingresar {
    background-color: var(--verde-claro) !important;
    color: var(--verde-principal) !important;
    padding: 10px 18px !important;
    border-radius: 5px;
    font-weight: 800 !important;
    text-align: center;
}

.menu-toggle {
    display: none; /* Oculto en escritorio */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--blanco);
    border-radius: 3px;
    transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
/*  seccion HERO-APP-VOLVER    */
/* --- BOTÓN REGRESAR (ESTILO GENERAL) --- */
        /* Posicionamiento dentro del degradado */
.hero-app {
    position: relative;
    padding-top: 100px !important; /* Damos espacio arriba para que el botón no choque con el texto */
}

.contenedor-boton-volver {
    position: absolute;
    top: 30px;
    left: 30px;
}

/* --- BASE COMÚN PARA EL BOTÓN (Forma y fuente) --- */
/* --- BASE COMÚN --- */
.btn-regresar-educa {
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin:10px;
}

/* --- ESTILO PARA EL BLOG (Sobre fondo blanco) --- */
/* Botón VERDE con letras BLANCAS */
.btn-regresar-educa.estilo-oscuro {
    background: var(--verde-principal); /* Fondo Verde */
    color: #ffffff !important;           /* Letras Blancas */
    border: 2px solid var(--verde-principal); /* Borde Verde para delinear */
}

.btn-regresar-educa.estilo-oscuro:hover {
    background: var(--verde-oscuro);
    border-color: var(--verde-oscuro);
    transform: translateX(-5px);
}

/* --- ESTILO PARA GANADERO APP (Sobre fondo verde/degradado) --- */
/* Botón BLANCO con letras VERDES */
.btn-regresar-educa.estilo-claro {
    background: #ffffff;                 /* Fondo Blanco */
    color: var(--verde-principal) !important; /* Letras Verdes */
    border: 2px solid #ffffff;           /* Borde Blanco para delinear */
}

.btn-regresar-educa.estilo-claro:hover {
    background: var(--verde-claro);
    color: #ffffff !important;
    border-color: var(--verde-claro);
    transform: translateX(-5px);
}
/* Ajuste para que en móviles no se monte sobre el logo */
@media (max-width: 768px) {
    .contenedor-boton-volver {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 40px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .hero-app {
        padding-top: 40px !important;
    }
}
/*     BLOG   */
/* --- BLOG: CONTENEDORES PRINCIPALES --- */
.blog-header-section {
    text-align: center; 
    padding: 40px 0 20px 0;
}

.blog-main-title {
    color: var(--verde-principal); 
    font-family: 'Montserrat'; 
    text-transform: uppercase; 
    font-weight: 800; 
    font-size: 2.2rem;
}

/* --- VISTA DE ARTÍCULO INDIVIDUAL --- */
.article-full-view {
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    border: 1px solid #eee; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.article-main-img {
    width: 100%; 
    height: 400px; 
    object-fit: cover; 
    border-radius: 12px; 
    margin-bottom: 25px;
}

.article-meta-row {
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px;
}

.article-author-tag {
    color: var(--verde-claro); 
    font-weight: 800; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    margin-bottom: 25px;
}

.article-content-text {
    line-height: 1.8; 
    color: #334155; 
    font-size: 1.1rem; 
    white-space: pre-line;
}

.btn-pdf-download {
    background: #10b981; 
    margin-top: 40px; 
    border-radius: 10px;
    display: inline-block;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
}

/* --- TARJETAS DEL LISTADO (GRID) --- */
.card-img-wrapper {
    height: 200px;
    overflow: hidden;
}

.card-title-fix {
    height: auto; /* Cambiado de 50px a auto para que no corte el texto */
    min-height: 55px; /* Altura mínima para mantener alineación */
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    color: var(--verde-principal);
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.85rem; 
    color: #64748b; 
    margin-bottom: 20px;
}

.no-results-box {
    grid-column: 1/-1; 
    text-align: center; 
    padding: 80px 20px;
}
/* 3. SECCIÓN HERO (CARRUSEL) */
.hero { 
    position: relative; 
    height: 100vh; /* 100vh = 100% de la altura de la pantalla del dispositivo */
    width: 100%;
    overflow: hidden; 
    background-color: #000;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }

.slide-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center 20%; 
    z-index: -1;
    animation: kenburns 20s linear infinite alternate;
}

.slide-bg-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden; 
    animation: kenburns 20s linear infinite alternate;
}

.slide-bg-container::after { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.45); /* El color de opacidad */
    z-index: 1; 
}

.slide::after { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.45); 
    z-index: 0;
    display: none; /* Se oculta para no duplicar con el container */
}

@keyframes kenburns {
    0% { transform: scale(1.02); } 
    100% { transform: scale(1.15) translate(1%, -1%); }
}

.hero-content { 
    position: relative; 
    z-index: 10; 
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; text-align: center; padding: 0 15%; 
    padding-top: 80px; 
}

.frase-hero {
    font-size: 2.0rem;
    color: white;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.6);
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

.flecha {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 30; color: white; font-size: 3.5rem;
    cursor: pointer; padding: 15px; text-decoration: none;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    transition: 0.3s;
    user-select: none;
}
.flecha:hover { color: var(--verde-claro); scale: 1.1; }
.flecha-izq { left: 25px; }
.flecha-der { right: 25px; }

.btn-leer {
    background: var(--verde-principal);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 25px;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s;
    display: inline-block;
}
.btn-leer:hover { background: var(--verde-claro); transform: translateY(-2px); }

/* 4. SECCIÓN AGROTIENDA */
.tienda-header {
    min-height: 500px; 
    background: linear-gradient(rgba(0, 73, 52, 0.1), rgba(0, 73, 52, 0.1)), 
                url('../img/repositorio/_pivote_1632x1224.jpg');
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center;
    color: white;
    text-align: center;
    padding-bottom: 100px; 
}

.tienda-header h1 {
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.tienda-header .overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.tienda-content {
    position: relative;
    z-index: 2; 
}

/*.search-box { 
    background: white; 
    padding: 30px; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    position: relative; 
    z-index: 10; 
    max-width: 1100px; 
    margin-left: auto; 
    margin-right: auto;
}*/
/* =======================================================
   ESTILOS UNIFICADOS: BUSCADOR Y CHIPS (FILTROS)
   ======================================================= */
.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin: 20px auto 30px auto;
    max-width: 1000px;
}

.filter-section .category-chips {
    max-width: 100%;
    overflow-x: auto;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    outline: none;
}

.search-box button {
    background: var(--verde-principal);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.search-box button:hover {
    background: var(--verde-claro);
}

.category-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0 12px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

@media (max-width: 768px) {
    .category-chips {
        scrollbar-width: thin;
        scrollbar-color: var(--verde-principal) #e2e8f0;
    }
    .category-chips::-webkit-scrollbar { display: block; height: 6px; }
    .category-chips::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
    .category-chips::-webkit-scrollbar-thumb { background: var(--verde-principal); border-radius: 10px; }
}

.chip {
    text-decoration: none;
    padding: 8px 18px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.3s;
    white-space: nowrap;
    text-transform: uppercase;
}

.chip:hover, .chip.active {
    background: var(--verde-principal);
    color: white;
    border-color: var(--verde-principal);
}

/* =======================================================
   SISTEMA UNIFICADO DE TARJETAS (BLOG & AGROTIENDA)
   ======================================================= */
/* TARJETA UNIFICADA PROFESIONAL */
.card-unificada {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); 
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
}

.card-unificada:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: var(--verde-claro);
}

/* Contenedor de Imagen (Específico Tienda) */
.card-unificada .card-img-container {
    height: 220px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.card-unificada .card-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Cuerpo de la tarjeta */
/* Ajuste para que el texto no se corte con el borde inferior */

.card-unificada .card-content {
    padding: 15px;
    flex-grow: 1; /* Esto hace que el contenido ocupe el espacio */
    display: flex;
    flex-direction: column;
}

.card-unificada .ingrediente-tag {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-unificada h3 {
    font-size: 1rem;
    color: var(--verde-principal);
    margin: 0 0 15px 0;
    line-height: 1.2;
    height: 38px; /* Altura fija para alinear títulos */
    overflow: hidden;
}

/* Área de Precios y Stock (Al fondo) */
.card-unificada .precios-footer {
    margin-top: auto; /* Empuja esto al final de la tarjeta */
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.precio-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.stock-info {
    text-align: right;
    border-left: 1px solid #e2e8f0;
    padding-left: 10px;
}

.btn-detalles-unificado {
    background: var(--verde-principal);
    color: white;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}
/* Botón de acción unificado (Ver Información) */
.card-unificada .btn-action {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--verde-principal); /* Tu color verde */
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border: none;
    transition: background 0.3s ease;
    margin-top: auto; /* Se pega al fondo del card-content si no está fuera */
}

.card-unificada .btn-action:hover {
    background: var(--verde-claro);
    color: white;
}
/* 6. SECCIÓN NOSOTROS */
.page-nosotros .info-principal {
    padding: 40px 0;
}
/* --- GRID DE PRODUCTOS --- */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 20px 0;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .grid-productos {
        grid-template-columns: repeat(3, 1fr);
    }
}
#tituloNosotros {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--verde-principal);
    margin-bottom: 30px;
}

.resaltado {
    font-size: 1.2rem;
    color: var(--verde-principal);
    border-left: 5px solid var(--verde-claro);
    padding-left: 20px;
    margin-bottom: 25px;
}

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

.obj-box {
    background: var(--blanco);
    padding: 35px;
    border-radius: 15px;
    box-shadow: var(--sombra);
    border-top: 6px solid var(--verde-claro);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.obj-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.obj-box h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--verde-principal);
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.obj-box p, .obj-box ul {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--texto-oscuro);
}

.obj-box ul {
    list-style: none; 
}

.obj-box li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.obj-box li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--verde-claro);
    font-weight: bold;
}

/* 7. TABLAS Y FOOTER */
table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--sombra);
}

table th {
    background: var(--verde-principal);
    color: white;
    padding: 15px;
}

table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

footer {
    background: #1a1a1a;
    color: #999;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

/* =======================================================
   8. BLOQUE DE MEDIA QUERIES (RESPONSIVE OPTIMIZADO)
   ======================================================= */

/* --- DISPOSITIVOS GRANDES (PC y Laptops) --- */
@media (min-width: 1185px) {
    .texto-header {
        font-size: 30px;
        /* Refuerzo de grosor para pantallas grandes */
        text-shadow: 
            0.3px 0px 0px #FFFFFF, 
            -0.3px 0px 0px #FFFFFF,
            0px 3px 6px rgba(0, 0, 0, 0.4);
    }
    .imglogo {
        width: 120px;
        height: 120px;
        border-width: 4px;
        padding: 5px;
    }
}
/* --- DISPOSITIVOS GRANDES (PC y Laptops) --- */
@media (max-width: 1185px) {
    .logonombre span {
        font-size: 15px;
        /* Refuerzo de grosor para pantallas grandes */
 
             line-height: 1.3;
    }
    .menu a { 
        font-size: 0.75rem; 
       
    }

    .imglogo {
        width: 90px;
        height: 90px;
        border-width: 4px;
        padding: 5px;
    }
}
/* --- DISPOSITIVOS MEDIANOS Y PEQUEÑOS (Tablets y Celulares) --- */
@media (max-width: 992px) {
    /* Menú Hamburguesa */
    .menu-toggle { 
        display: flex; 
    } 

    #nav-menu {
        position: fixed;
        top: 100px; /* Ajustado a la altura del header-container */
        right: -100%; 
        width: 80%;
        height: calc(100vh - 100px);
        background-color: var(--verde-principal);
        transition: 0.4s ease-in-out;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.3);
        z-index: 1000;
    }

    #nav-menu.active { 
        right: 0; 
    } 

    .menu {
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
    }

    .menu a { 
        font-size: 1.1rem; 
    }

    /* Ajustes de Identidad en Móvil */
    .logonombre {
        font-size: 1.1rem;
    }
    
    .logonombre span {
        font-size: 0.6rem;
             line-height: 1.3;
    }

    .texto-header {
        font-size: 30px;
        text-shadow: 
            0.3px 0px 0px #FFFFFF, 
            -0.3px 0px 0px #FFFFFF,
            0px 3px 6px rgba(0, 0, 0, 0.4);
    }

    .imglogo {
        height: 90px;
        width: 90px;
        padding: 3px;
    }
}

/* --- AJUSTES EXCLUSIVOS PARA CELULARES (Menor a 768px) --- */
@media (max-width: 768px) {
    header {
        position: relative; 
        background: var(--verde-principal) !important; 
        padding: 10px 0;
    }

    .texto-header {
        font-size: 13px !important;
        text-shadow: none;
    }

    /* Hero / Carrusel */
    .hero { 
        height: 100vh; 
    }
    
    .frase-hero { 
   
        text-shadow: 
            0.px 0px 0px #FFFFFF, 
            -0.px 0px 0px #FFFFFF,
            0px 3px 6px rgba(0, 0, 0, 0.4);
             line-height: 1.3;
        
        font-size: 1.3rem; 
        padding: 0 5px;
    }

    .flecha { 
        font-size: 1.3rem; 
        color: gray; 
    }

    /* Tienda y Banner */
    .tienda-header {
        height: 250px; 
        min-height: 450px; 
        padding-top: 20px;
        padding-bottom: 80px;
        background-position: right;
    }

    .tienda-header h1 {
        font-size: 2.2rem !important;
    }

    .search-box {
        margin-top: -30px; 
        width: 95%;
        padding: 20px;
    }

    /* Tablas Responsivas (Evita que el celular se desborde) */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Otros */
    .objetivos-grid {
        grid-template-columns: 1fr;
    }
    
    #tituloNosotros {
        font-size: 1.8rem;
    }
    .frase-hero {
    font-size: 1.1rem;
    
}
}
/* --- LISTADO: Ajuste de imágenes en las tarjetas --- */
    .card-img-wrapper {
        width: 100%;
        height: 220px; /* Altura fija para que todas las tarjetas sean iguales */
        overflow: hidden;
        background: #f1f5f9; /* Color de fondo por si la imagen falla */
    }

    .card-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Esto evita que la imagen se estire o aplaste */
        object-position: center;
        transition: transform 0.3s ease;
    }

    .card-unificada:hover .card-img-wrapper img {
        transform: scale(1.05); /* Efecto visual al pasar el mouse */
    }

    /* --- DETALLE: Ajuste de la imagen principal --- */
    .article-main-img {
        width: 100%;
        max-height: 450px; /* Evita que la imagen ocupe toda la pantalla hacia abajo */
        object-fit: cover; 
        border-radius: 12px;
        margin-bottom: 25px;
        display: block;
    }

    /* --- GALERÍA: Ajuste de imágenes secundarias --- */
    .gallery-container { 
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
        gap: 20px; 
        margin-top: 30px; 
    }
    
    .gallery-item { 
        background: #f8fafc; 
        border-radius: 8px; 
        overflow: hidden; 
        border: 1px solid #e2e8f0; 
    }
    
    .gallery-item img { 
        width: 100%; 
        height: 200px; 
        object-fit: cover; 
    }

    .gallery-caption { padding: 10px; font-size: 0.9rem; color: #64748b; font-style: italic; }
    .article-content-text { line-height: 1.8; white-space: pre-wrap; font-size: 1.1rem; color: #334155; }
    
@media (max-width: 426px) {
    .grid-productos {
        grid-template-columns: 1fr !important;
    }
    .grid-directorio {
        grid-template-columns: 1fr !important;
    }
    .card-unificada h3,
    .card-negocio h3 {
        font-size: 0.9rem;
        word-break: break-word;
        height: auto !important;
    }
    .card-unificada .card-img-container {
        height: 260px !important;
    }
    .contenedor-img-card {
        height: 220px !important;
    }
}