/* ================================
   BANNER DE CARGA
================================ */
.tibia-news-loading-banner {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    text-align: center;
    max-width: 1200px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tibia-spinner-wrapper {
    display: inline-block;
    margin-bottom: 20px;
}

.tibia-news-loading-banner h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

/* ================================
   AJAX AUTO-REFRESH - MENSAJES DE ERROR
================================ */
/* Contenedor de error */
.tibia-news-error-container {
    background: linear-gradient(135deg, #fb9393 0%, #ff334f 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tibia-news-error-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.tibia-news-error-message {
    margin: 0;
    font-size: 14px;
}

@keyframes tibia-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Estilos para el spinner de carga */
.tibia-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(49,67,226,0.4);
    border-top-color: #3143e2;
    border-radius: 50%;
    animation: tibia-spin 1s linear infinite;
    margin: 0 auto;
}

/* Contenedor principal de noticias */
.tibia-news-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 200px; 
}

/* Cada noticia individual */
.tibia-news-item {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    padding: 25px;
    margin-bottom: 30px;
    min-height: 200px;
}

/* Contenedor de la línea del título */
.tibia-news-title-line {
    display: flex;
    align-items: center;
     margin-bottom: 10px;
}

/* Logo de Autor */
.tibia-news-logo {
    display: block;
    width: 35px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    align-self: center;
    margin-bottom: 0 !important;
    margin-right: 5px;
}

/* Fecha de la noticia */
.tibia-news-date {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
    align-self: baseline;
    margin-right: 5px;
}

/* Separador entre fecha y título */
.tibia-news-separator-dash {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

/* Título de la noticia */
.tibia-news-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    align-self: baseline;
}

/* Separador horizontal */
.tibia-news-separator {
    border: 0;
    border-top: 2px solid #dddddd;
    margin: 15px 0;
}

/* Contenido de la noticia */
.tibia-news-content {
    font-size: 14px;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 60px;
}

.tibia-news-content.tibia-news-content p {
    margin-top: 1em !important;
    margin-bottom: 1em !important;
    font-size: 14px !important;
}

.tibia-news-content a {
    color: rgba(49,67,226,0.8);
    text-decoration: none;
    font-weight: 700;
}

.tibia-news-content a:hover {
    color: #3143e2;
    text-decoration: underline;
}

.tibia-news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1em !important;
    cursor: default;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    /* Solo pointer en imágenes con lightbox */
    .tibia-news-content img[data-big-image],
    .tibia-news-content img[src*="_300x300"],
    .tibia-news-content img[src*="_thumb"],
    .tibia-news-content img[src*="_small"] {
        cursor: pointer;
    }

    .tibia-news-content img[data-big-image]:hover,
    .tibia-news-content img[src*="_300x300"]:hover,
    .tibia-news-content img[src*="_thumb"]:hover,
    .tibia-news-content img[src*="_small"]:hover {
        opacity: 0.85;
        transform: scale(1.02);
    }

.tibia-news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

/* Filas de la tabla */
.tibia-news-content table tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.tibia-news-content table tr:last-child {
    border-bottom: none;
}

.tibia-news-content table tr:hover {
    background-color: #f8f9fa;
}

/* Celdas de la tabla */
.tibia-news-content table td {
    padding: 2px 8px;
    vertical-align: middle;
    font-size: 14px;
    color: #34495e;
    line-height: 1.6;
    text-align: center;
    border:1px solid #dddddd !important;
}

/* Texto dentro de las tablas */
.tibia-news-content table td p {
    margin: 0 !important;
    padding: 0;
    font-size: 15px;
    color: #34495e;
    line-height: 1.6;
}

.tibia-news-content table td ul li {
    padding: 0;
    font-size: 15px;
    color: #34495e;
    line-height: 1.6;
    text-align: left;
}

/* Enlaces dentro de las tablas */
.tibia-news-content table td a {
    color: rgba(49,67,226,0.8);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.tibia-news-content table td a:hover {
    color: #3143e2;
    text-decoration: underline;
}

.tibia-news-content table td img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 5px auto;
    cursor: default;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    /* Solo pointer en imágenes con lightbox dentro de tablas */
    .tibia-news-content table td img[data-big-image],
    .tibia-news-content table td img[src*="_300x300"],
    .tibia-news-content table td img[src*="_thumb"],
    .tibia-news-content table td img[src*="_small"] {
        cursor: pointer;
    }

    .tibia-news-content table td img[data-big-image]:hover,
    .tibia-news-content table td img[src*="_300x300"]:hover,
    .tibia-news-content table td img[src*="_thumb"]:hover,
    .tibia-news-content table td img[src*="_small"]:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.tibia-news-content table th {
    padding: 15px;
    background-color: #3498db;
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    font-size: 16px;
}

/* Fuente al pie */
.tibia-news-source {
    font-size: 14px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #dddddd;
    text-align: right;
}

.tibia-news-source a {
    color: rgba(49,67,226,0.8);
    text-decoration: none;
    font-weight: 700;
}

.tibia-news-source a:hover {
    color: #3143e2;
    text-decoration: underline;
}

/* Mensaje de mantenimiento */
.tibia-mantenimiento-item {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 500;
    text-align: center;
}

/* Lightbox para imágenes */
.tibia-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.tibia-lightbox.active {
    display: flex;
}

.tibia-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.tibia-lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
    user-select: none;
}

.tibia-lightbox-close:hover {
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .tibia-news-title-line {
        font-size: 18px;
    }

    .tibia-news-content {
        font-size: 14px;
    }

    .tibia-news-item {
        padding: 15px;
    }
    
    .tibia-lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .tibia-news-content table {
        font-size: 14px;
    }
    
    .tibia-news-content table td {
        padding: 1px;
        font-size: 14px;
    }
    
    .tibia-news-content table td img {
        max-width: 100%;
    }
}