/* Variables de color principales */
:root {
    --primary-color: #d4af49;
    --text-light: #ffffff;
}

/* Icono de enlace externo (rotado 180° para apuntar hacia afuera) */
.external-link-icon {
    width: 18px;
    height: 18px;
    margin-left: 6px;
    vertical-align: middle;
    transform: rotate(180deg);
    filter: brightness(0) invert(1);
}

/* === CALENDARIO: SOLO REUNIONES DEL DÍA === */
.calendar-container {
    width: 100%;
    max-width: 583px;
    min-height: 500px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    padding: 15px;
    border: 2px solid #d4af49;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 2;
    margin: 0 20px;
    display: flex;
    flex-direction: column;
}

.calendar-title {
    font-family: 'LEGAFONT-Bold', sans-serif;
    font-size: 1.6rem;
    color: #d4af49;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Iframe del calendario de Outlook (reuniones del día) - ESTO ES LO QUE NO SE VEÍA BIEN ANTES */
#microsoft-calendar-iframe {
    width: 100%;
    flex: 1;               /* Ocupa todo el espacio restante del contenedor */
    border: none;
    border-radius: 8px;
    display: block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .calendar-container {
        min-height: 550px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        min-height: 450px;
        padding: 8px;
    }
}

/* === MATCH CONTAINER === */
.match-container {
    width: 100%;
    max-width: 400px;
    min-height: 240px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    z-index: 1010;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.match-container h3 {
    color: var(--primary-color);
    font-size: clamp(16px, 1.6vw, 18px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.match-details {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-size: clamp(12px, 1.2vw, 14px);
    padding: 4px 0;
    width: 100%;
    gap: 8px;
}

.match-details .team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 30%;
    max-width: 90px;
    text-align: center;
}

.match-details .team img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.match-details .team span {
    font-weight: 600;
    font-size: clamp(12px, 1.2vw, 14px);
    white-space: normal;
    word-wrap: break-word;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.2;
}

.match-details .match-time {
    font-size: clamp(14px, 1.4vw, 16px);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 10px;
    white-space: nowrap;
}

.match-jornada {
    font-size: clamp(12px, 1.2vw, 14px);
    color: var(--text-light);
    text-align: center;
    margin-top: 4px;
}

.match-date {
    font-size: clamp(10px, 1vw, 12px);
    opacity: 0.9;
    margin-top: 2px;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.match-container .stadium-container {
    display: none !important;
    width: 100%;
    text-align: center;
    margin-top: 6px;
    min-height: 78px;
    justify-content: center;
    align-items: center;
}

.match-container .stadium-image {
    display: none;
    width: 100%;
    max-width: 120px;
    height: 70px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    border: none;
    margin: 0 auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-container .stadium-image.show {
    display: block;
    opacity: 1;
}

.match-container .prev-arrow, .match-container .next-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.match-container .prev-arrow { left: 6px; }
.match-container .next-arrow { right: 6px; }

.match-container .prev-arrow:disabled, .match-container .next-arrow:disabled {
    background: #555;
    cursor: not-allowed;
}

.match-container .prev-arrow:hover:not(:disabled), .match-container .next-arrow:hover:not(:disabled) {
    background: var(--text-light);
    color: var(--primary-color);
}

.match-container .loading {
    color: var(--text-light);
    font-size: clamp(12px, 1.2vw, 14px);
    text-align: center;
    padding: 10px;
    display: block;
}

.match-container .error-message {
    display: none;
    color: var(--text-light);
    font-size: clamp(12px, 1.2vw, 14px);
    text-align: center;
    padding: 10px;
}

@media (min-width: 2560px) {
    .match-container {
        min-height: 320px;
    }
    .match-container .stadium-container {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    .match-container {
        max-width: 400px;
        padding: 12px;
    }
    .match-details .team img { width: 48px; height: 48px; }
    .match-container h3 { font-size: clamp(18px, 1.8vw, 20px); }
    .match-details .team span { font-size: clamp(14px, 1.4vw, 16px); }
    .match-details .match-time { font-size: clamp(16px, 1.6vw, 18px); }
    .match-jornada, .match-date { font-size: clamp(12px, 1.2vw, 14px); }
}

@media (max-width: 600px) {
    .match-container { max-width: 260px; }
    .match-details .team img { width: 36px; height: 36px; }
    .match-container h3 { font-size: clamp(14px, 1.4vw, 16px); }
    .match-details .team span { font-size: clamp(10px, 1vw, 12px); }
    .match-details .match-time { font-size: clamp(12px, 1.2vw, 14px); }
    .match-jornada, .match-date { font-size: clamp(9px, 0.9vw, 10px); }
    .match-details .team { max-width: 80px; }
}

@media (max-width: 480px) {
    .match-container { max-width: 240px; padding: 8px; }
    .match-details .team img { width: 32px; height: 32px; }
    .match-details .team { max-width: 70px; }
}

@media (max-width: 360px) {
    .match-container { max-width: 220px; }
    .match-details .team { max-width: 60px; }
}

/* Contenedor centrado para QR y WiFi (posición fija) */
.center-container {
    position: relative;
    top: 15vh;
    left: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
    z-index: 1010;
}
.news-container {
    margin: 20px auto 60px auto !important;
}
/* Pantallas de 769px o menos */
@media (max-width: 769px) {
    .center-container {
        /* 1. Lo devuelve al flujo normal para que empuje al contenedor de abajo */
        position: relative !important; 
        left: auto !important;
        transform: none !important; 
        width: 90%;
        max-width: 450px;
        height: auto !important;
        margin: 40px auto !important; 
    }
}

/* Pantallas de 600px o menos */
@media (max-width: 600px) {
    .center-container {
        width: 92%;
        max-width: 400px;
        margin: 35px auto !important; 
    }
}

/* Pantallas de 480px o menos */
@media (max-width: 480px) {
    .center-container {
        width: 95%;
        max-width: 320px;
        margin: 30px auto !important; 
    }
}

/* Pantallas de 360px o menos */
@media (max-width: 360px) {
    .center-container {
        width: 95%;
        max-width: 280px;
        margin: 25px auto !important; 
    }
}