/* --- Estilos globales para prevenir scroll horizontal --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* --- Variables CSS (Asegúrate de que estas estén al principio de tu archivo) --- */
:root {
    --primary-color: #4a90e2; /* Un azul más suave y moderno */
--accent-color: #f5a623; /* Un naranja/dorado más cálido */
--secondary-color: #888; /* Un gris más neutro */
--text-color-dark: #333; /* Un negro más suave para el texto principal */
--text-color-light: #f9f9f9; /* Blanco roto para fondos oscuros */
    --bg-light: #f8f9fa; /* Fondo claro */
    --bg-dark: #212529; /* Fondo oscuro */
    --header-bg: #fff; /* Fondo del header */
    --footer-bg: #1a1a1a; /* Fondo del footer */
    --danger-color: #dc3545; /* Rojo para alertas o eliminar */

    --font-heading: 'Montserrat', sans-serif; /* Para títulos y encabezados */
--font-body: 'Open Sans', sans-serif; /* Para el cuerpo del texto */

    --transition-speed: 0.3s;
    --border-radius-lg: 15px;
    --border-radius-sm: 8px;
}

/* --- Estilos para Paginación --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.pagination-controls button {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color var(--transition-speed) ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #3a7bd5; /* Un tono más oscuro de primary-color */
    transform: translateY(-2px);
}

.pagination-controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination-controls button i {
    margin-right: 8px;
}

/* --- Globales y Reset (Ajusta si ya los tienes) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-top: 0;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 {
    font-size: 2.8em;
}

h2 {
    font-size: 2.2em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

#proyectos .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.section-padding {
    padding: 80px 0;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-color-dark);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.2;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.8em; }
h3 { font-size: 2em; }

p {
    margin-bottom: 15px;
}

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

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

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px; /* Más redondeado para un look moderno */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-donate {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-donate:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.big-btn {
    padding: 18px 40px;
    font-size: 1.2em;
    border-radius: 60px;
}

.main-nav .donate-btn-container .btn-donate:hover {
    color: #fff !important;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
}

/* --- Header --- */
.main-header {
    background-color: var(--header-bg);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all var(--transition-speed) ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.main-header .logo img:hover {
    transform: scale(1.05);
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: var(--text-color-dark);
    font-weight: 600;
    font-size: 1em;
    padding: 10px 0;
    position: relative;
    transition: all var(--transition-speed) ease;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Efecto de subrayado en el menú */
.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Grosor del subrayado */
    background-color: var(--accent-color); /* Color del subrayado */
    bottom: -5px;
    left: 0;
    transition: width var(--transition-speed) ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

/* Botón de donación en el menú */
.main-nav .donate-btn-container {
    margin-left: 40px; /* Más espacio para el botón de donación */
}

.main-nav .donate-btn-container .btn-donate {
    padding: 18px 40px;
    font-size: 1.2em;
    border-radius: 60px;
}

/* Administrador link - OCULTO POR DEFECTO */
.admin-link-container {
    display: none !important; /* Oculto por defecto */
}

/* Mostrar solo cuando se active el modo admin */
.admin-mode .admin-link-container {
    display: block !important;
}

.admin-button-container {
    display: none !important; /* Oculto por defecto */
}

/* Mostrar solo cuando se active el modo admin */
.admin-mode .admin-button-container {
    display: block !important;
}

.admin-link,
.admin-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.admin-link:hover,
.admin-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.admin-link::before {
    content: "⚙️ ";
    margin-right: 5px;
}

.menu-toggle {
    display: none; /* Oculto en desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: #fff; /* Mejor contraste sobre header oscuro */
    cursor: pointer;
    padding: 5px;
}

/* Estilo de las tres barras del menú hamburguesa (estructura con spans) */
.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #fff;
    border-radius: 999px;
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Ocupa toda la altura de la ventana */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

.hero-section .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-section .video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Asegura que el video cubra todo el espacio */
}

.hero-section .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Oscurece el video para que el texto sea legible */
}

.hero-section .hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 800px;
}

.hero-section .hero-content h1 {
    font-size: 4.5em; /* Título más grande */
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    font-weight: 700;
}

.hero-section .hero-content .tagline {
    font-size: 1.6em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.hero-section .hero-content .hero-btn {
    font-size: 1.1em;
    padding: 15px 35px;
    border-radius: 50px;
}

/* --- About Section (Quiénes Somos) --- */
.about-section h2 {
    margin-bottom: 60px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: start; /* Alinea al inicio para que coincidan las alturas */
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 1.5fr 1fr; /* Imagen mucho más ancha a la izquierda, texto más estrecho a la derecha */
    }
}

.about-image img {
    width: 100%;
    height: 100%; /* Altura automática para que se ajuste */
    min-height: 450px; /* Altura mínima para la imagen */
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-content-text .text-block h3 {
    text-align: left;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.about-content-text .text-block p {
    font-size: 1.1em;
    margin-bottom: 25px;
}

.team-block {
    margin-top: 50px;
}

.team-block h3 {
    text-align: left;
    margin-bottom: 25px;
    color: var(--text-color-dark);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas en una sola línea */
    gap: 20px;
}

@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
    }
}

@media (max-width: 576px) {
    .team-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
    }
}

.team-member {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed) ease;
}

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

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
    padding: 3px;
}

.team-member h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: var(--text-color-dark);
}

.team-member p {
    font-size: 0.9em;
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* --- Gallery Section (Galerías) --- */
.gallery-section h2 {
    margin-bottom: 60px;
    text-align: center;
}

.gallery-section {
    text-align: center;
}

.gallery-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.filter-buttons {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.filter-btn {
    background-color: #e9ecef;
    color: var(--text-color-dark);
    padding: 10px 25px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    font-family: var(--font-body);
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 111, 0, 0.3);
}

.gallery-grid {
    gap: 30px;
}


section#galerias .gallery-grid {
    display: grid;
    /* Menos columnas para ganar espacio horizontal en cada tarjeta */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px; /* más espacio horizontal */
    row-gap: 26px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 22px 10px;
    box-sizing: border-box;
    overflow-x: hidden;
}

section#galerias .gallery-item {
    width: auto;
}





.gallery-grid > .gallery-item {
    /* flex: 0 0 auto; */ /* Evita que los elementos se encojan */
    /* width: 320px; */ /* Ancho fijo para cada tarjeta, ajusta según necesites */
}


/* Estilos generales para la galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px; /* Reducido de 50px a 25px */
    padding: 20px; /* Reducido de 30px a 20px */
    max-width: 1400px; /* Reducido de 1600px a 1400px */
    margin: 0 auto;
}

/* Grid específico para proyectos destacados - 3 columnas */
section#proyectos .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

section#proyectos .gallery-grid > .gallery-item {
    width: 100%;
    max-width: 100%;
    margin: 8px; /* Reducido de 10px a 8px */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 380px; /* Altura fija para todas las tarjetas */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evita el desbordamiento */
}

/* Efecto hover más pronunciado */
.gallery-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3) !important;
}

/* Ajustes responsivos */
@media (max-width: 1400px) {
    .gallery-grid {
        gap: 20px;
        padding: 15px;
        max-width: 1200px;
    }
    
    section#proyectos .gallery-grid {
        gap: 20px;
        padding: 15px;
        max-width: 1200px;
        justify-content: center; /* Centrar las tarjetas */
    }
    
    section#proyectos .gallery-grid > .gallery-item {
        width: 240px;
        margin: 8px;
    }
}

@media (max-width: 1200px) {
    .gallery-grid,
    section#proyectos .gallery-grid {
        gap: 20px;
    }
    
    section#proyectos .gallery-grid > .gallery-item {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        padding: 15px;
    }
    
    section#proyectos .gallery-grid {
        gap: 15px;
        padding: 15px;
    }
    
    section#proyectos .gallery-grid > .gallery-item {
        width: 220px;
    }
}


.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    cursor: pointer;
    background: #fff;
    /* width: 100%; */
    /* max-width: 100%; */
    /* height: 450px; */ /* Altura aumentada para imágenes más grandes */
    /* Tarjetas horizontales, un poco más altas para texto */
    aspect-ratio: 16 / 9;
    min-height: 300px;
    background-color: #f0f0f0; /* Color de fondo mientras carga */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* margin: 0 auto; */
}

/* Mantener misma proporción para videos también */
.gallery-item.gallery-item--video { aspect-ratio: 16 / 9; }

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: transform 0.5s ease;
    background-color: #f0f0f0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* Mejora la calidad de la imagen */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    -ms-interpolation-mode: nearest-neighbor;
    /* Suavizado mejorado */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Mejora el escalado */
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Fuerza la renderización de la GPU */
    transform: translate3d(0, 0, 0);
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #000;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.gallery-item .item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: #fff;
    padding: 18px 18px 16px;
    transform: translateY(0);
    transition: all 0.4s ease;
    opacity: 1 !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 118px;
    z-index: 10;
    pointer-events: none;
}

.gallery-item:hover .item-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.90) 30%, rgba(0,0,0,0.7) 60%, transparent 100%);
    padding-bottom: 18px;
    min-height: 128px;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item .item-overlay h3 {
    color: #ffffff !important;
    margin-bottom: 6px;
    font-size: 1.05em !important;
    font-weight: 700 !important;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 3px 12px rgba(0,0,0,0.9), 0 0 25px rgba(0,0,0,0.7);
    letter-spacing: -0.01em;
    display: -webkit-box !important;
    width: 100%;
    padding: 0 8px;
    visibility: visible !important;
    opacity: 1 !important;
    text-transform: none;
    /* Permitir hasta 2 líneas centradas para títulos largos */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.gallery-item .item-overlay p {
    font-size: 0.9em;
    color: rgba(255,255,255,0.95);
    margin-bottom: 0;
    text-align: center;
    line-height: 1.6;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    display: -webkit-box;
    /* dejar ver una línea más de descripción */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    padding: 0 8px;
    text-transform: none;
}

/* Galerías: ajustes de legibilidad en pantallas pequeñas */
@media (max-width: 992px) {
    section#galerias .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        padding: 16px 8px;
    }

    .gallery-item .item-overlay {
        padding: 14px 14px 12px;
        min-height: 88px;
    }

    .gallery-item .item-overlay h3 {
        font-size: 1em !important;
        padding: 0 6px;
    }

    .gallery-item .item-overlay p {
        font-size: 0.9em;
        line-height: 1.5;
        -webkit-line-clamp: 2;
        padding: 0 6px;
    }
}

/* Tablets y móviles grandes: una sola columna para que cada tarjeta ocupe todo el ancho */
@media (max-width: 768px) {
    section#galerias .gallery-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 20px;
        padding: 14px 8px;
    }
}

@media (max-width: 576px) {
    section#galerias .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px 6px;
    }

    .filter-buttons {
        gap: 10px;
        margin-bottom: 24px;
    }

    .filter-btn {
        padding: 9px 14px;
        border-radius: 999px;
        font-size: 0.9em;
    }

    /* En móvil vertical, imagen arriba y texto debajo para poder leer todo */
    .gallery-item {
        aspect-ratio: auto;
        min-height: auto;
    }

    .gallery-item img,
    .gallery-item video {
        position: relative;
        height: 190px;
        max-height: 50vh;
    }

    .gallery-item .item-overlay {
        position: static;
        background: linear-gradient(to top, #000000dd 0%, #000000bb 60%, #000000aa 100%);
        padding: 10px 12px 12px;
        min-height: auto;
    }

    /* En móvil, dejamos crecer el texto verticalmente dentro del cuadro */
    .gallery-item .item-overlay h3 {
        font-size: 1em !important;
        letter-spacing: 0;
        text-transform: none;
        margin-bottom: 6px;
        display: block !important;
        overflow: visible;
        word-break: break-word;
    }

    .gallery-item .item-overlay p {
        font-size: 0.86em;
        text-transform: none;
        display: block;
        overflow: visible;
        word-break: break-word;
    }
}

/* Utilidad para ocultar elementos (filtrado de galería) */
.hidden {
    display: none !important;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-overlay.active { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90vw;
    max-height: 70vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-media video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255,0,0,0.8);
    transform: scale(1.1);
}

.lightbox-caption {
    margin-top: 20px;
    color: #f8f9fa;
    text-align: center;
    max-width: 90vw;
    padding: 0 20px;
}

.lightbox-caption h4 {
    margin-bottom: 8px;
    font-size: 1.5em;
    color: #fff;
    font-weight: 600;
}

.lightbox-caption p {
    margin: 0;
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    line-height: 1.6;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    width: 100%;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-btn {
    pointer-events: all;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0 15px;
}

.lightbox-btn:hover {
    background: rgba(74, 144, 226, 0.9);
    transform: scale(1.1);
}


/* --- Blog Section - Mejorada --- */
.blog-section {
    padding: 60px 0 !important;
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

/* Efecto de partículas sutiles */
.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(74, 144, 226, 0.08) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(245, 166, 35, 0.08) 0%, transparent 20%);
    pointer-events: none;
}

#blog-posts-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.blog-section h2 {
    text-align: center;
    margin: 60px 0 60px 0; /* Aumentado de 20px a 60px el margen superior */
    font-size: 3em;
    color: #1a2b49;
    position: relative;
    padding-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.blog-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #6c5ce7);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.blog-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)) !important;
    gap: 30px !important;
    margin: 0 auto !important;
    max-width: 1400px !important;
    padding: 0 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 1;
}

.blog-post-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.blog-post {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transform: translateY(0);
}

.blog-post:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.15) !important;
}

.blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.post-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #f6f8fa, #e9f0f8);
}

.post-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.2), rgba(74, 144, 226, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.blog-post:hover .post-image-container::before {
    opacity: 1;
}

.post-image-container:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-post:hover .post-image-container:before {
    opacity: 1;
}

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

.blog-post:hover img {
    transform: scale(1.05);
}

.blog-post .post-content {
    padding: 24px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    background: #fff;
    position: relative;
    z-index: 2;
}

.post-content h3 {
    margin: 0 0 8px 0 !important;
    font-size: 1em !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #1a2b49 !important;
    padding: 0 !important;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
    /* Limitar a 2 líneas para que no se haga demasiado largo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.blog-post:hover .post-content h3 {
    color: #4a90e2 !important;
}

.post-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: #6c7a8a;
    font-size: 0.9em;
    margin-bottom: 16px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 500;
}

.post-meta i {
    color: #4a90e2;
    margin-right: 5px;
    font-size: 0.95em;
}

.post-meta i {
    color: var(--primary-color);
    margin-right: 5px;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    padding: 10px 0;
    transition: all 0.3s ease;
    position: relative;
    width: fit-content;
    font-size: 0.95em;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.read-more:hover:after {
    width: 100%;
}

.read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Ajustes responsivos */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 800px !important;
        padding: 0 30px !important;
    }
    
    .post-image-container {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
        padding: 0 16px !important;
        gap: 18px;
        max-width: 600px !important;
    }
    
    .post-image-container {
        height: 210px;
    }
    
    .blog-post {
        margin-bottom: 16px;
    }
}

/* En móvil, blog con mismo estilo que Galerías: imagen arriba + bloque oscuro debajo */
@media (max-width: 576px) {
    .blog-section {
        padding: 40px 0 !important;
    }

    .blog-section h2 {
        margin: 30px 0 30px 0;
        font-size: 2em;
        padding-bottom: 14px;
    }

    .blog-grid {
        padding: 12px 6px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        gap: 16px;
    }

    .post-image-container {
        height: 190px;
        max-height: 50vh;
    }

    /* Bloque de texto estilo Galerías: fondo oscuro, texto claro */
    .blog-post .post-content {
        padding: 10px 12px 12px !important;
        background: linear-gradient(to top, #000000dd 0%, #000000bb 60%, #000000aa 100%) !important;
    }

    .blog-post {
        border-radius: 12px !important;
        overflow: hidden;
    }

    .blog-post .post-content h3,
    .blog-post .post-content h3 a {
        color: #ffffff !important;
        font-size: 1em !important;
        line-height: 1.25 !important;
        display: block !important;
        -webkit-line-clamp: unset;
        overflow: visible;
        word-break: break-word;
        margin-bottom: 6px !important;
    }

    .blog-post .post-content .post-meta {
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 0.86em !important;
        margin-bottom: 8px !important;
    }

    .blog-post .post-content .post-meta i {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .blog-post .post-content .post-excerpt {
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 0.86em !important;
        line-height: 1.5 !important;
        display: block !important;
        -webkit-line-clamp: unset;
        overflow: visible;
        word-break: break-word;
        margin-bottom: 10px !important;
    }

    .blog-post .post-content .read-more {
        color: #fff !important;
        font-size: 0.9em !important;
    }

    .blog-post .post-content .read-more:hover {
        color: var(--accent-color) !important;
    }
}

/* Extra ajuste para teléfonos muy angostos (≤ 480px) – mismo estilo Galerías */
@media (max-width: 480px) {
    .blog-grid {
        padding: 12px 6px !important;
        max-width: 100% !important;
    }

    .blog-post .post-content {
        padding: 10px 12px 12px !important;
    }

    .blog-post .post-content h3 {
        font-size: 0.95em !important;
    }

    .blog-post .post-content .post-excerpt {
        font-size: 0.85em;
        line-height: 1.45;
        display: block !important;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .blog-post .post-content .post-meta {
        font-size: 0.82em;
        margin-bottom: 8px !important;
    }

    .blog-post .post-content .read-more {
        font-size: 0.88em;
    }
}

/* Ajuste adicional para pantallas muy pequeñas (~318px de ancho) */
@media (max-width: 360px) {
    .blog-grid {
        padding: 0 6px !important;
        gap: 12px;
    }

    .post-image-container {
        height: 165px;
    }

    .blog-post .post-content {
        padding: 14px 10px !important;
    }

    .blog-post .post-content h3 {
        font-size: 0.82em !important;
        line-height: 1.25 !important;
    }

    .post-excerpt {
        font-size: 0.8em;
        line-height: 1.35;
    }
}

/* Ajuste específico para pantallas muy pequeñas (~292px de ancho) */
@media (max-width: 320px) {
    .blog-grid {
        padding: 0 4px !important;
        gap: 10px;
    }

    .post-image-container {
        height: 150px;
    }

    .blog-post .post-content {
        padding: 12px 8px !important;
    }

    .blog-post .post-content h3 {
        font-size: 0.78em !important;
        line-height: 1.2 !important;
    }

    .post-excerpt {
        font-size: 0.78em;
        line-height: 1.3;
    }

    .read-more {
        font-size: 0.8em;
    }
}

/* Estilos para imágenes de respaldo (fallback) */
.image-fallback {
    opacity: 0.5;
    filter: grayscale(50%);
    border: 2px dashed var(--secondary-color);
    position: relative;
}

.image-fallback::after {
    content: 'Imagen no disponible';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 500;
    pointer-events: none;
}

/* --- New Donation Section --- */
.donations-section {
    position: relative;
    padding: 100px 0;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.donations-section .donation-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 50%, #415a77 100%);
    filter: brightness(0.9);
    z-index: 0;
}

.donations-section .donation-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4); /* Fondo semi-transparente para el texto */
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.donations-section .donation-content h2 {
    font-size: 3.5em;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.donations-section .donation-content p {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
}

.donations-section .donation-content .big-btn {
    font-size: 1.5em;
    padding: 20px 50px;
    margin-bottom: 20px;
}

.donations-section .donation-content .small-text {
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
}

/* --- New Book Promotion Section --- */
.book-promo-section {
    position: relative;
    padding: 100px 0;
    background-color: var(--bg-light); /* Fondo claro para la sección */
    overflow: hidden;
}

.book-promo-section .section-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient( circle at 20% 20%, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0) 40%),
                radial-gradient( circle at 80% 0%, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 35%);
    opacity: 1;
    z-index: 0;
}

.book-promo-section .container {
    position: relative;
    z-index: 1; /* Asegura que el contenido esté sobre el patrón */
}

.book-promo-content {
    display: flex;
    flex-direction: column; /* Por defecto en móvil, columna */
    align-items: center;
    gap: 60px; /* Espacio entre los elementos */
}

@media (min-width: 992px) {
    .book-promo-content {
        flex-direction: row; /* En desktop, fila */
        justify-content: center;
        text-align: left;
    }
}

.book-visual {
    position: relative;
    flex-shrink: 0; /* No encoger la imagen del libro */
    width: 300px; /* Ancho fijo para la portada del libro */
    height: auto;
    perspective: 1000px; /* Para efectos 3D */
    margin-bottom: 30px; /* Espacio en móvil */
}

.book-visual img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
    box-shadow: 10px 10px 30px rgba(0,0,0,0.2); /* Sombra más pronunciada */
    transform: rotateY(-10deg) rotateX(5deg); /* Inclinación sutil */
    transition: transform 0.5s ease;
}

.book-visual img:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02); /* Enderezar y agrandar al pasar el ratón */
}

.book-visual .video-thumbnail {
    position: absolute;
    bottom: -30px; /* Superpuesto debajo de la imagen del libro */
    right: -50px;
    width: 220px;
    height: 120px;
    background-color: #000;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 991px) {
    .book-visual .video-thumbnail {
        position: static; /* En móvil, debajo de la imagen */
        margin: 30px auto 0;
        width: 90%;
        height: 180px;
    }
}


.book-visual .video-thumbnail:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 8px 8px 25px rgba(0,0,0,0.4);
}

.book-visual .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.3s ease;
}

.book-visual .video-thumbnail:hover img {
    filter: brightness(0.9);
}

.book-visual .video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: #fff;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.book-visual .video-thumbnail .play-button:hover {
    background: rgba(255,111,0,0.8); /* Cambiar a color acento al pasar el ratón */
    transform: translate(-50%, -50%) scale(1.1);
}

.book-text {
    max-width: 600px;
}

.book-text h2 {
    font-size: 3.2em;
    text-align: left; /* Alineado a la izquierda */
    color: var(--primary-color);
    margin-bottom: 15px;
}

@media (max-width: 991px) {
    .book-text h2 {
        text-align: center;
    }
}

.book-text .subtitle {
    font-size: 1.4em;
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 25px;
    text-align: left;
}
@media (max-width: 991px) {
    .book-text .subtitle {
        text-align: center;
    }
}


.book-text p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-color-dark);
    text-align: justify;
}
@media (max-width: 991px) {
    .book-text p {
        text-align: center;
    }
}

.book-text p strong {
    color: var(--primary-color);
}

.book-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: flex-start; /* Alinea los botones a la izquierda */
    flex-wrap: wrap; /* Permite que los botones se envuelvan en pantallas pequeñas */
}

@media (max-width: 991px) {
    .book-buttons {
        justify-content: center; /* Centra los botones en móvil */
    }
}

.book-buttons .btn {
    padding: 15px 35px;
    font-size: 1.1em;
    border-radius: 50px;
}

/* --- Contact Section --- */
.contact-section h2 {
    margin-bottom: 60px;
    color: var(--text-color-light); /* En fondo oscuro */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: flex-start; /* Alinea los elementos al inicio */
}

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

.contact-info h3 {
    text-align: left;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.contact-info p i {
    margin-right: 15px;
    color: var(--accent-color);
    font-size: 1.2em;
}

.social-links {
    margin-top: 30px;
    display: flex;
}

.social-links a {
    font-size: 1.5em;
    color: var(--text-color-light);
    transition: color var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.contact-form h3 {
    text-align: left;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--border-radius-sm);
    background-color: rgba(255,255,255,0.1);
    color: var(--text-color-light);
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    background-color: rgba(255,255,255,0.2);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

.contact-form .btn-primary i {
    margin-left: 10px;
}

.map-container {
    margin-top: 80px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
}

/* --- Footer Mejorado --- */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--text-color-light);
    padding: 60px 0 20px;
    font-size: 0.95em;
    text-align: center;
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.main-footer h3 {
    color: #fff;
    font-size: 1.4em;
    margin-bottom: 25px;
    text-align: left;
}

.main-footer p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

.main-footer ul {
    list-style: none;
    padding: 0;
}

.main-footer ul li {
    margin-bottom: 10px;
}

.main-footer ul li a {
    color: rgba(255,255,255,0.8);
    transition: color var(--transition-speed) ease;
}

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

.footer-social.social-links {
    margin-top: 20px;
    justify-content: center;
}

.footer-social.social-links a {
    color: rgba(255,255,255,0.7);
    font-size: 1.2em;
}

.footer-social.social-links a:hover {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 18px;
    border-radius: 5px 0 0 5px;
    border: none;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1em;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter-form .btn-primary {
    border-radius: 0 5px 5px 0;
    padding: 12px 20px;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.85em;
}

/* --- Scroll Animations (Asegúrate de que estas clases estén en tu js/scroll-animations.js) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific animations for more variety */
.fade-in-up {
    transform: translateY(50px);
}
.fade-in-up.visible {
    transform: translateY(0);
}

.left-to-right {
    transform: translateX(-50px);
}
.left-to-right.visible {
    transform: translateX(0);
}

.right-to-left {
    transform: translateX(50px);
}
.right-to-left.visible {
    transform: translateX(0);
}

.zoom-in {
    transform: scale(0.9);
}
.zoom-in.visible {
    transform: scale(1);
}


/* --- Responsive Design (Media Queries) --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.8em; }

    .main-nav {
        display: none; /* Oculta el menú principal en pantallas pequeñas */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* Debajo del header */
        left: 0;
        background-color: var(--header-bg);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid #eee;
    }

    .main-nav.active {
        display: flex; /* Muestra el menú cuando está activo */
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .main-nav ul li a {
        padding: 10px 0;
        display: block;
        font-size: 1.1em;
    }

    .main-nav ul li a::after {
        display: none; /* Deshabilita el subrayado animado en móvil */
    }

    .main-nav .donate-btn-container {
        margin-top: 20px;
        margin-left: 0; /* Centra el botón de donar en móvil */
    }
    .main-nav .donate-btn-container .btn-donate {
        width: 80%; /* Hacer el botón de donar más ancho */
        margin: 0 auto;
    }

    .menu-toggle {
        display: block; /* Muestra el botón de menú en pantallas pequeñas */
    }

    .hero-section .hero-content h1 {
        font-size: 3em;
    }
    .hero-section .hero-content .tagline {
        font-size: 1.3em;
    }

    .about-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
    .about-image {
        order: -1; /* Mueve la imagen arriba en móvil */
        margin-bottom: 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .blog-grid {
        grid-template-columns: 1fr; /* Una columna para el blog en móvil */
    }

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

    .donations-section .donation-content h2 {
        font-size: 2.5em;
    }
    .donations-section .donation-content p {
        font-size: 1em;
    }
    .donations-section .donation-content .big-btn {
        font-size: 1.2em;
        padding: 15px 30px;
    }

    .book-promo-content {
        flex-direction: column;
        text-align: center;
    }

    .book-promo-content .book-text h2,
    .book-promo-content .book-text .subtitle,
    .book-promo-content .book-text p {
        text-align: center;
    }

    .book-visual .video-thumbnail {
        position: static;
        margin: 30px auto 0;
        width: 90%;
        height: 180px;
    }
    .book-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    .book-buttons .btn {
        width: 90%; /* Hace que los botones sean más anchos en móvil */
    }


    .main-footer .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .main-footer .footer-grid h3,
    .main-footer .footer-social.social-links {
        justify-content: center; /* Centrar elementos en el footer móvil */
        text-align: center;
    }
    .main-footer .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .main-footer .newsletter-form input[type="email"] {
        width: 80%;
        margin-bottom: 15px;
        border-radius: 5px;
    }
    .main-footer .newsletter-form .btn-primary {
        width: 80%;
        border-radius: 5px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.4em; }

    .hero-section .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-section .hero-content .tagline {
        font-size: 1em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.8em;
    }

    .book-promo-content .book-text h2 {
        font-size: 2em;
    }
    .book-promo-content .book-text .subtitle {
        font-size: 1.1em;
    }
}

/* Project Detail Page Styles */
#project-detail {
    padding: 60px 0;
    background-color: #f9f9f9;
}

#project-detail .container {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.project-title {
    font-size: 2.8em;
    color: #333;
    margin-bottom: 30px;
    font-weight: 700;
}

.project-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.03);
}

.project-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: left;
}

.btn-primary {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Blog Post Detail Page Styling */
.blog-post-container {
    /* display: grid; */
    /* grid-template-columns: 2fr 1fr; /* Main content 2/3, sidebar 1/3 */
    /* gap: 30px; */
    /* padding: 30px 0; */
    /* align-items: start; */
    /* background-color: rgba(255, 0, 0, 0.3); /* Temporary background for debugging (red) */
}

.blog-post-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content 2/3, sidebar 1/3 */
    gap: 30px;
    padding: 30px 0;
    align-items: start;
}

.main-content {
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.main-content h2 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.main-content h3 {
    font-size: 1.8em;
    color: #444;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Subtítulos del blog (como en proyectos): líneas cortas que terminan en ":" */
.main-content .blog-section-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1em;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: justify;
}

.main-content p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.main-content ul,
.main-content ol {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    padding-left: 25px;
}

.main-content ul li {
    margin-bottom: 10px;
}

.main-content ol li {
    margin-bottom: 10px;
}

.main-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-content a:hover {
    text-decoration: underline;
}

.main-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.main-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.main-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    color: #c7254e;
    background-color: #f9f2f4;
    padding: 2px 4px;
    border-radius: 3px;
}

.main-content pre code {
    background-color: transparent;
    color: #333;
    padding: 0;
}

.main-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

.main-content figure {
    margin: 20px 0;
    text-align: center;
}

.main-content figcaption {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

.main-content img,
.main-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-content .featured-image img {
    margin-top: 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sidebar {
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.comments-section {
    margin-top: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.comments-section h3 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 25px;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.comment-form textarea {
    resize: vertical;
}

.comments-list {
    margin-top: 40px;
}

.comments-list h4 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.comment-avatar i {
    font-size: 2em;
    color: #ccc;
}

.comment-content {
    flex-grow: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    font-size: 0.9em;
    color: #777;
}

.comment-content p {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 0;
}

.sidebar-block {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-block h3 {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.social-followers li {
    margin-bottom: 10px;
}

.social-followers li a {
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-followers li a:hover {
    color: var(--primary-color);
}

.social-followers li a i {
    font-size: 1.2em;
    margin-right: 10px;
    color: var(--primary-color);
}

.social-followers li a span {
    margin-left: auto;
    font-weight: 600;
    color: #777;
}

.highlighted-posts li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.highlighted-posts li img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.highlighted-posts li a {
    font-size: 1.05em;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.highlighted-posts li a:hover {
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    /* .blog-post-container {
        flex-direction: column;
    } */

    .main-content, .sidebar {
        /* flex: none;
        width: 100%;
        min-width: unset; */
    }
}

@media (max-width: 768px) {
    .main-content article,
    .sidebar .sidebar-block {
        padding: 20px;
    }

    .main-content #post-title {
        font-size: 2em;
    }
}

@media (max-width: 576px) {
    .main-content #post-title {
        font-size: 1.8em;
    }
}

/* --- Breadcrumbs (elegante) --- */
.breadcrumbs {
    margin: 25px 0 35px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 12px;
    color: #bbb;
    font-weight: 300;
    font-size: 1.2em;
}

.breadcrumbs a {
    color: #777;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 4px 0;
}

.breadcrumbs a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs a:hover::after {
    width: 100%;
}

.breadcrumbs .active {
    color: #333;
    font-weight: 600;
}

/* --- Post Meta Top (Categoría y Tiempo de Lectura - elegante) --- */
.post-meta-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.post-category {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.post-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.post-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
}

.post-category:hover::before {
    left: 100%;
}

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 0.88em;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.reading-time:hover {
    background: #e9ecef;
    color: #555;
}

.reading-time i {
    color: var(--primary-color);
    font-size: 0.95em;
}

/* --- Post Meta Enhanced (elegante) --- */
.post-meta-enhanced {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.93em;
    padding: 8px 14px;
    background: #fafafa;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meta-item:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1.05em;
    opacity: 0.9;
}

.meta-item span {
    color: #555;
    font-weight: 500;
}

/* --- Post Title (elegante) --- */
.main-content h1#post-title {
    font-size: 2.8em;
    color: #222;
    margin-bottom: 25px;
    line-height: 1.25;
    font-weight: 700;
    text-align: left;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #222 0%, #444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Social Share Buttons (elegante) --- */
.social-share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 35px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.share-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    font-size: 0.93em;
    letter-spacing: 0.3px;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    overflow: hidden;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-button:hover::before {
    width: 300px;
    height: 300px;
}

.share-button i {
    font-size: 1.15em;
    position: relative;
    z-index: 1;
}

.share-button span {
    position: relative;
    z-index: 1;
}

.share-button.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}

.share-button.facebook:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.share-button.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #1a91da 100%);
    box-shadow: 0 2px 6px rgba(29, 161, 242, 0.25);
}

.share-button.twitter:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(29, 161, 242, 0.4);
}

.share-button.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #22c55e 100%);
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

.share-button.whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.share-button.copy-link {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.25);
}

.share-button.copy-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

/* --- Social Follow Section (lado izquierdo) --- */
.social-follow-section {
    margin: 30px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.social-follow-section h3 {
    font-size: 1.2em;
    color: #222;
    margin-bottom: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-follow-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    border-radius: 2px;
}

.social-follow-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-follow-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    overflow: hidden;
}

.social-follow-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.social-follow-link:hover::before {
    width: 300px;
    height: 300px;
}

.social-follow-link i {
    font-size: 1.1em;
    position: relative;
    z-index: 1;
    color: #ffffff;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.social-follow-link span {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.social-follow-link.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}

.social-follow-link.facebook span {
    color: #ffffff;
    font-weight: 600;
}

.social-follow-link.facebook:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.social-follow-link.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #1a91da 100%);
    box-shadow: 0 2px 6px rgba(29, 161, 242, 0.25);
}

.social-follow-link.twitter span {
    color: #ffffff;
    font-weight: 600;
}

.social-follow-link.instagram span {
    color: #ffffff;
    font-weight: 600;
}

.social-follow-link.instagram {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 100%);
    box-shadow: 0 2px 6px rgba(228, 64, 95, 0.25);
}

.social-follow-link.instagram:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(228, 64, 95, 0.4);
}

.social-follow-link.youtube span {
    color: #ffffff;
    font-weight: 600;
}

.social-follow-link.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.25);
}

.social-follow-link.youtube:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
}

/* --- Post Tags Bottom (elegante) --- */
.post-tags-bottom {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.08);
    flex-wrap: wrap;
}

.post-tags-bottom i {
    color: var(--primary-color);
    font-size: 1.15em;
    opacity: 0.8;
}

.post-tags-bottom span {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 7px 16px;
    background: #f5f5f5;
    color: #666;
    border-radius: 20px;
    font-size: 0.84em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    border-color: transparent;
}

.tag:hover::before {
    left: 100%;
}

/* --- Post Navigation (Previo/Siguiente - elegante) --- */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 60px;
    padding-top: 35px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.05), transparent);
    transition: left 0.6s;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: var(--primary-color);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.15);
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn.next-post {
    flex-direction: row-reverse;
    text-align: right;
}

.nav-btn.next-post:hover {
    transform: translateX(-6px);
}

.nav-btn i {
    font-size: 1.6em;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-btn:hover i {
    transform: scale(1.1);
}

.nav-btn-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.nav-label {
    display: block;
    font-size: 0.82em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.nav-btn:hover .nav-title {
    color: var(--primary-color);
}

/* --- Responsive para nuevos elementos (elegante) --- */
@media (max-width: 992px) {
    .blog-post-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-content article {
        padding: 30px;
    }
    
    .main-content h1#post-title {
        font-size: 2.4em;
    }
    
    .post-navigation {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content article {
        padding: 25px 20px;
    }
    
    .main-content h1#post-title {
        font-size: 2em;
        line-height: 1.2;
    }
    
    .breadcrumbs {
        margin: 20px 0 25px;
        padding: 15px 0;
        font-size: 0.88em;
    }
    
    .post-meta-top {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .post-category {
        padding: 6px 14px;
        font-size: 0.75em;
    }
    
    .reading-time {
        padding: 5px 10px;
        font-size: 0.82em;
    }
    
    .post-meta-enhanced {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    .meta-item {
        padding: 6px 12px;
        font-size: 0.88em;
    }
    
    .social-share-buttons {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 12px;
        margin: 30px 0;
    }
    
    .share-label {
        margin-bottom: 12px;
        margin-right: 0;
        text-align: center;
    }
    
    .share-button {
        justify-content: center;
        padding: 12px 18px;
        width: 100%;
    }
    
    .post-tags-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 40px;
        padding-top: 25px;
    }
    
    .tag {
        padding: 6px 14px;
        font-size: 0.8em;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 50px;
        padding-top: 30px;
    }
    
    .nav-btn {
        padding: 20px;
        gap: 14px;
    }
    
    .nav-btn.next-post {
        flex-direction: row;
        text-align: left;
    }
    
    .nav-btn.next-post:hover {
        transform: translateX(5px);
    }
    
    .nav-title {
        font-size: 0.98em;
    }
    
    .main-content .featured-image {
        margin-bottom: 30px;
        border-radius: 10px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .sidebar .sidebar-block {
        padding: 22px;
        border-radius: 16px;
    }
    
    .sidebar .sidebar-block h3 {
        font-size: 1.25em;
    }
    
    .sidebar .social-followers li a {
        padding: 12px 14px;
    }
    
    .sidebar .highlighted-posts li img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .main-content article {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .main-content h1#post-title {
        font-size: 1.75em;
        letter-spacing: -0.01em;
        margin-bottom: 20px;
    }
    
    .sidebar .sidebar-block {
        padding: 20px;
        border-radius: 14px;
        margin-bottom: 20px;
    }
    
    .sidebar .sidebar-block h3 {
        font-size: 1.2em;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .sidebar .social-followers li a {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .sidebar .social-followers li a i {
        font-size: 1.2em;
        margin-right: 10px;
    }
    
    .sidebar .highlighted-posts li {
        margin-bottom: 14px;
    }
    
    .sidebar .highlighted-posts li img {
        width: 65px;
        height: 65px;
        margin-right: 12px;
        border-radius: 10px;
    }
    
    .sidebar .highlighted-posts li a {
        font-size: 0.88em;
    }
    
    .breadcrumbs {
        font-size: 0.82em;
        gap: 8px;
        margin: 15px 0 20px;
        padding: 12px 0;
    }
    
    .breadcrumbs li:not(:last-child)::after {
        margin-left: 8px;
        font-size: 1.1em;
    }
    
    .post-meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-category {
        padding: 5px 12px;
        font-size: 0.7em;
    }
    
    .reading-time {
        padding: 4px 8px;
        font-size: 0.78em;
    }
    
    .post-meta-enhanced {
        gap: 8px;
    }
    
    .meta-item {
        padding: 5px 10px;
        font-size: 0.85em;
    }
    
    .social-share-buttons {
        padding: 18px 15px;
        border-radius: 12px;
    }
    
    .share-button {
        padding: 10px 16px;
        font-size: 0.85em;
    }
    
    .post-tags-bottom {
        margin-top: 35px;
        padding-top: 20px;
    }
    
    .tag {
        padding: 5px 12px;
        font-size: 0.78em;
    }
    
    .post-navigation {
        margin-top: 40px;
        padding-top: 25px;
        gap: 12px;
    }
    
    .nav-btn {
        padding: 18px 15px;
        gap: 12px;
        border-radius: 12px;
    }
    
    .nav-btn i {
        font-size: 1.4em;
    }
    
    .nav-label {
        font-size: 0.75em;
        margin-bottom: 6px;
    }
    
    .nav-title {
        font-size: 0.92em;
    }
}

/* --- Social Share Buttons (ya definido arriba, mantengo este comentario) --- */
    margin-top: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.social-share-buttons .share-button {
    background-color: #f0f2f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-share-buttons .share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-share-buttons .facebook {
    background-color: #3b5998;
    color: #fff;
    border-color: #3b5998;
}

.social-share-buttons .twitter {
/* --- Estilos para Paginación --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.pagination-controls button {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color var(--transition-speed) ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #3a7bd5; /* Un tono más oscuro de primary-color */
    transform: translateY(-2px);
}

.pagination-controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination-controls button i {
    margin-right: 8px;
}
    background-color: #1da1f2;
    color: #fff;
    border-color: #1da1f2;
}

.social-share-buttons .pinterest {
    background-color: #bd081c;
    color: #fff;
    border-color: #bd081c;
}

.social-share-buttons .whatsapp {
    background-color: #25d366;
    color: #fff;
    border-color: #25d366;
}

.social-share-buttons .share-button::before {
    font-family: "Font Awesome 5 Brands"; /* Assuming Font Awesome 5 is used */
    margin-right: 8px;
}

.social-share-buttons .facebook::before {
    content: "\f09a"; /* Facebook icon */
}

.social-share-buttons .twitter::before {
    content: "\f099"; /* Twitter icon */
}

.social-share-buttons .pinterest::before {
    content: "\f0d2"; /* Pinterest icon */
}

.social-share-buttons .whatsapp::before {
    content: "\f232"; /* WhatsApp icon */
}

/* Featured Projects Section */
.featured-projects {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.featured-projects .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.featured-projects .section-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.featured-projects .section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #36d1dc);
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.project-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a90e2;
    backdrop-filter: blur(10px);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.project-content p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-content .btn-primary {
    display: inline-block;
    background: #4a90e2;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.project-content .btn-primary:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .featured-projects .section-title {
        font-size: 2em;
    }
}

/* Sección de Proyectos Destacados - Estilos con mayor especificidad */
#proyectos.featured-projects {
    padding: 80px 0 !important;
    background-color: #f8f9fa !important;
    position: relative;
    z-index: 1;
}

#proyectos .section-header {
    text-align: center !important;
    margin-bottom: 50px !important;
}

#proyectos .section-title {
    font-size: 2.5em !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    position: relative !important;
    display: inline-block !important;
}

#proyectos .section-divider {
    width: 80px !important;
    height: 3px !important;
    background: linear-gradient(90deg, #4a90e2, #36d1dc) !important;
    margin: 0 auto !important;
}

#proyectos .projects-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    padding: 0 15px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

#proyectos .project-card {
    background: #fff !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

#proyectos .project-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

#proyectos .project-image {
    position: relative !important;
    height: 200px !important;
    overflow: hidden !important;
    width: 100% !important;
}

#proyectos .project-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

#proyectos .project-card:hover .project-image img {
    transform: scale(1.05) !important;
}

#proyectos .project-tag {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background: rgba(74, 144, 226, 0.9) !important;
    color: white !important;
    padding: 5px 15px !important;
    border-radius: 20px !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 2 !important;
}

#proyectos .project-content {
    padding: 25px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

#proyectos .project-content h3 {
    font-size: 1.3em !important;
    color: #333 !important;
    margin-bottom: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

#proyectos .project-content p {
    color: #666 !important;
    font-size: 0.95em !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    flex: 1 !important;
}

#proyectos .project-content .btn {
    display: inline-block !important;
    background: #4a90e2 !important;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9em !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    margin-top: auto !important;
    width: fit-content !important;
}

#proyectos .project-content .btn:hover {
    background: #357abd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3) !important;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
    #proyectos .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #proyectos .projects-grid {
        grid-template-columns: 1fr !important;
        max-width: 500px !important;
        margin: 0 auto !important;
    }
    
    #proyectos .section-title {
        font-size: 2em !important;
    }
}

/* Estilos para la sección de proyectos destacados */
.proyectos-container {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.proyectos-container .section-header {
    margin-bottom: 50px;
    text-align: center;
}

.proyectos-container .section-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.proyectos-container .section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #36d1dc);
    margin: 0 auto;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.proyecto-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.proyecto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.proyecto-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

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

.proyecto-card:hover .proyecto-image img {
    transform: scale(1.1);
}

.proyecto-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #4a90e2;
    backdrop-filter: blur(10px);
}

.proyecto-content {
    padding: 30px;
}

.proyecto-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.proyecto-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
    .proyectos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .proyectos-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .proyectos-container .section-title {
        font-size: 2rem;
    }
}