/*
Theme Name: AEGEE Valladolid Child
Theme URI: https://www.locals.aegee.org/valladolid
Description: Tema hijo personalizado para AEGEE Valladolid
Template: aegee-vi
Version: 2.0.0
*/

/* ========================================
   CABECERA - Fix para que las imágenes carguen
   ======================================== */
.title-card {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.title-card > img.header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.only-on-home .title-card {
    min-height: 100vh;
}

#site-meta {
    position: relative;
    z-index: 2;
}

/* ========================================
   NAVBAR - Fix móvil
   ======================================== */
@media (max-width: 767px) {
    .navbar-fixed-top {
        position: absolute;
        top: 0;
        width: 100%;
    }
    body {
        padding-top: 0 !important;
    }
}

/* ========================================
   IMÁGENES - Cursor lightbox
   ======================================== */
.entry-content img,
.wp-block-image img,
.wp-block-gallery img,
.gallery-item img,
article img {
    cursor: zoom-in;
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-block {
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.stat-block:hover {
    transform: translateY(-5px);
}

.stat-block:nth-child(1) { background: linear-gradient(135deg, #e6bde5 0%, #d8a4d7 100%); color: #7a1b16; }
.stat-block:nth-child(2) { background: linear-gradient(135deg, #c44bc2 0%, #b13ab0 100%); color: white; }
.stat-block:nth-child(3) { background: linear-gradient(135deg, #931991 0%, #821680 100%); color: white; }
.stat-block:nth-child(4) { background: linear-gradient(135deg, #70086e 0%, #5f075d 100%); color: white; }

/* ========================================
   TABLAS ESTILO AEGEE MODERNA
   ======================================== */
.wp-block-table.is-style-aegee-moderna table {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table.is-style-aegee-moderna th {
    background-color: #f8f9fa;
    color: #333;
    border-bottom: 2px solid #eaeaea;
    padding: 12px;
    text-align: left;
}

.wp-block-table.is-style-aegee-moderna td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* ========================================
   TABLAS MORADO AEGEE (has-fixed-layout)
   ======================================== */
.entry-content .has-fixed-layout,
.entry-content table.has-fixed-layout {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    box-shadow: 0 2px 8px rgba(113,0,109,0.15) !important;
    overflow: hidden !important;
    background: #fff !important;
}

.entry-content .has-fixed-layout thead tr,
.entry-content table.has-fixed-layout thead tr {
    background: linear-gradient(135deg, #71006d, #911b7d) !important;
}

.entry-content .has-fixed-layout thead th,
.entry-content table.has-fixed-layout thead th {
    padding: 14px 16px !important;
    text-align: left !important;
    font-weight: 600 !important;
    border: none !important;
    color: white !important;
    background: transparent !important;
}

.entry-content .has-fixed-layout tbody tr {
    border-bottom: 1px solid #e8d5e8 !important;
    transition: background 0.2s ease !important;
}

.entry-content .has-fixed-layout tbody tr:hover {
    background-color: rgba(113,0,109,0.08) !important;
}

.entry-content .has-fixed-layout tbody td {
    padding: 12px 16px !important;
    border: 1px solid #e8d5e8 !important;
    border-left: 3px solid transparent !important;
    vertical-align: top !important;
}

.entry-content .has-fixed-layout tbody tr:hover td {
    border-left-color: #71006d !important;
}

.entry-content .has-fixed-layout tbody tr:nth-child(even) {
    background-color: rgba(113,0,109,0.04) !important;
}

/* ========================================
   TABLAS RESPONSIVE
   ======================================== */
.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .wp-block-table {
        display: block;
    }
    .wp-block-table table {
        min-width: 500px;
    }
}

/* ========================================
   EVENTOS
   ======================================== */
.events-container {
    display: flex;
    gap: 40px;
    align-items: center;
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 100%);
    border-radius: 16px;
    border-left: 5px solid #6a0dad;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.1);
}

.events-content h2 {
    color: #6a0dad;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.events-content p {
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.event-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-features span {
    color: #666;
    font-size: 0.9em;
}

.events-link {
    flex: 1;
    text-align: center;
}

.event-main-link {
    display: flex;
    align-items: center;
    background: #6a0dad;
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
    margin-bottom: 15px;
}

.event-main-link:hover {
    background: #5a0ca5;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.4);
    color: white;
    text-decoration: none;
}

.event-icon {
    font-size: 32px;
    margin-right: 20px;
}

.event-text {
    flex: 1;
    text-align: left;
}

.event-text strong {
    display: block;
    font-size: 1.3em;
    margin-bottom: 5px;
}

.event-desc {
    font-size: 0.9em;
    opacity: 0.9;
}

.event-arrow {
    font-size: 24px;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.event-main-link:hover .event-arrow {
    transform: translateX(3px);
}

.event-note {
    color: #6a0dad;
    font-size: 0.85em;
    font-style: italic;
    margin: 0;
    opacity: 0.8;
}

/* ========================================
   BLOQUES MORADOS
   ======================================== */
.morado-block {
    background: #f8f5ff;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #6a0dad;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(106, 13, 173, 0.1);
}

/* ========================================
   CARRUSEL SWIPER
   ======================================== */
.aegee-carrusel {
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.aegee-carrusel .swiper-slide {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.aegee-carrusel .swiper-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.aegee-carrusel .swiper-button-next,
.aegee-carrusel .swiper-button-prev {
    color: #fff;
    background: rgba(113,0,109,0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s;
}

.aegee-carrusel .swiper-button-next:hover,
.aegee-carrusel .swiper-button-prev:hover {
    background: rgba(113,0,109,1);
}

.aegee-carrusel .swiper-pagination-bullet {
    background: #71006d;
    opacity: 0.5;
}

.aegee-carrusel .swiper-pagination-bullet-active {
    background: #71006d;
    opacity: 1;
}

/* ========================================
   CONTENIDO - Mejoras mobile
   ======================================== */
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.entry-content iframe,
.entry-content embed,
.entry-content object {
    max-width: 100%;
}

/* ========================================
   RESPONSIVE GENERAL
   ======================================== */
@media (max-width: 768px) {
    .events-container {
        flex-direction: column;
        gap: 25px;
        padding: 25px 20px;
        text-align: center;
    }

    .event-main-link {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .event-text { text-align: center; }
    .event-icon { margin-right: 0; }
    .event-arrow { margin-left: 0; }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px 0;
    }

    .stat-block {
        padding: 20px 15px;
        font-size: 16px;
    }

    .morado-block {
        padding: 20px 15px;
        margin: 15px 0;
        border-radius: 8px;
    }

    .title-card {
        min-height: 250px;
    }

    .only-on-home .title-card {
        min-height: 80vh;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .entry-content {
        font-size: 15px;
        line-height: 1.6;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   GALERÍA
   ======================================== */
.wp-block-gallery {
    gap: 8px;
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .navbar, #site-navigation, .aegee-carrusel {
        display: none !important;
    }
}