/* =========================================
   AGENDA - GRID 4 COLUMNAS
   ========================================= */

.agenda-grid-section {
    padding: 60px 0 80px;
    background: #f8fafc;
}

.agenda-grid-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header de la sección */
.agenda-grid-header {
    text-align: center;
    margin-bottom: 45px;
}

.agenda-grid-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a2634;
	
}

.agenda-grid-titulo span {
    color: #007AB4;
}


.agenda-grid-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #007AB4, #ffd700);
    margin: 12px auto 15px;
    border-radius: 4px;
}

.agenda-grid-subtitulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
}

/* =========================================
   GRID DE AGENDA - 4 COLUMNAS
   ========================================= */

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.agenda-grid-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.agenda-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 122, 180, 0.12);
    border-color: rgba(0, 122, 180, 0.15);
}

.agenda-grid-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.agenda-grid-body {
    padding: 18px 20px 22px;
}

.agenda-grid-categoria {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #007AB4;
    padding: 3px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.agenda-grid-categoria.verde {
    background: #27ae60;
}

.agenda-grid-categoria.naranja {
    background: #e67e22;
}

.agenda-grid-categoria.morado {
    background: #8e44ad;
}

.agenda-grid-categoria.rojo {
    background: #e74c3c;
}

.agenda-grid-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1a2634;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agenda-grid-titulo:hover {
    color: #007AB4;
}

.agenda-grid-resumen {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agenda-grid-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
    flex-wrap: wrap;
    gap: 5px;
}

.agenda-grid-fecha {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #718096;
}

.agenda-grid-fecha i {
    margin-right: 4px;
    color: #007AB4;
}

.agenda-grid-leer {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #007AB4;
    text-decoration: none;
    transition: all 0.3s ease;
}

.agenda-grid-leer i {
    transition: transform 0.3s ease;
}

.agenda-grid-leer:hover i {
    transform: translateX(4px);
}

/* =========================================
   MODAL DE AGENDA
   ========================================= */

.modal-agenda {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    animation: modalFadeIn 0.4s ease;
}

.modal-agenda.active {
    display: block;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-agenda-content {
    background: #fff;
    max-width: 850px;
    margin: 40px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-agenda-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    font-size: 1.4rem;
    color: #1a2634;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.modal-agenda-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

/* Imagen de la agenda */
.modal-agenda-imagen {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: #e9ecef;
}

.modal-agenda-img-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-agenda-img-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007AB4, #003d5e);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    z-index: 0;
}

.modal-agenda-img-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

.modal-agenda-img-placeholder span {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    opacity: 0.8;
}

.modal-agenda-img-container img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-agenda-img-container img[src=""],
.modal-agenda-img-container img[src="#"] {
    display: none;
}

.modal-agenda-img-container img[src=""] + .modal-agenda-img-placeholder,
.modal-agenda-img-container img[src="#"] + .modal-agenda-img-placeholder {
    display: flex;
}

.modal-agenda-categoria {
    position: absolute;
    bottom: 20px;
    left: 25px;
    background: #ffd700;
    color: #1a2634;
    padding: 6px 20px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

/* Información de la agenda */
.modal-agenda-info {
    padding: 30px 40px 40px 40px;
}

.modal-agenda-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.modal-agenda-fecha,
.modal-agenda-tipo {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #718096;
}

.modal-agenda-fecha i,
.modal-agenda-tipo i {
    margin-right: 6px;
    color: #007AB4;
}

.modal-agenda-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a2634;
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-agenda-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #007AB4, #ffd700);
    border-radius: 4px;
    margin-bottom: 20px;
}

.modal-agenda-texto {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: #4a5568;
}

.modal-agenda-texto p {
    margin-bottom: 18px;
}

.modal-agenda-texto p:last-child {
    margin-bottom: 0;
}

.modal-agenda-texto strong {
    color: #007AB4;
    font-weight: 700;
}

/* Compartir */
.modal-agenda-compartir {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-agenda-compartir-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a2634;
}

.modal-agenda-compartir-label i {
    color: #007AB4;
    margin-right: 6px;
}

.modal-agenda-compartir-botones {
    display: flex;
    gap: 10px;
}

.modal-agenda-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.modal-agenda-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-agenda-share-btn.whatsapp {
    background: #25D366;
}

.modal-agenda-share-btn.facebook {
    background: #1877F2;
}

.modal-agenda-share-btn.twitter {
    background: #000000;
}

.modal-agenda-share-btn.linkedin {
    background: #0A66C2;
}

.modal-agenda-share-btn.copiar {
    background: #e9ecef;
    color: #1a2634;
}

.modal-agenda-share-btn.copiar:hover {
    background: #dde1e6;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1200px) {
    .agenda-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .agenda-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .modal-agenda-content {
        margin: 20px;
        border-radius: 16px;
    }

    .modal-agenda-imagen {
        height: 280px;
    }

    .modal-agenda-info {
        padding: 25px 30px 30px 30px;
    }

    .modal-agenda-titulo {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .agenda-grid-section {
        padding: 40px 0 60px;
    }

    .agenda-grid-titulo {
        font-size: 1.7rem;
    }

    .agenda-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .agenda-grid-img {
        height: 160px;
    }

    .agenda-grid-body {
        padding: 14px 16px 18px;
    }

    .agenda-grid-titulo {
        font-size: 14px;
    }

    .agenda-grid-resumen {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .modal-agenda-content {
        margin: 10px;
        border-radius: 12px;
    }

    .modal-agenda-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .modal-agenda-imagen {
        height: 200px;
    }

    .modal-agenda-categoria {
        bottom: 12px;
        left: 15px;
        font-size: 11px;
        padding: 4px 14px;
    }

    .modal-agenda-info {
        padding: 20px 20px 25px 20px;
    }

    .modal-agenda-meta {
        gap: 15px;
        font-size: 13px;
    }

    .modal-agenda-titulo {
        font-size: 20px;
    }

    .modal-agenda-texto {
        font-size: 15px;
        line-height: 1.8;
    }

    .modal-agenda-compartir {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 500px) {
    .agenda-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .agenda-grid-titulo {
        font-size: 1.4rem;
    }

    .agenda-grid-subtitulo {
        font-size: 0.95rem;
    }

    .agenda-grid-img {
        height: 200px;
    }

    .modal-agenda-content {
        margin: 5px;
        border-radius: 10px;
    }

    .modal-agenda-imagen {
        height: 160px;
    }

    .modal-agenda-info {
        padding: 16px 16px 20px 16px;
    }

    .modal-agenda-titulo {
        font-size: 17px;
    }

    .modal-agenda-texto {
        font-size: 14px;
        line-height: 1.7;
    }

    .modal-agenda-fecha,
    .modal-agenda-tipo {
        font-size: 12px;
    }

    .modal-agenda-share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}