:root {
    --primary-color: #0b5891;
    --primary-light: rgba(11, 88, 145, 0.1);
    --primary-dark: #084b7a;
    --secondary-color: #6c757d;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #888888;
    --bg-light: #f7f7f7;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --accent-color: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Barra de navegación de migas de pan */
.article-breadcrumb {
    padding: 12px 0;
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Estilos del artículo */
.article-container {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 40px;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-color);
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-date {
    display: flex;
    align-items: center;
}

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

.article-featured-image {
    position: relative;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 0;
    padding-bottom: 56%;
    background-color: #f0f0f0;
}

.article-featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* Animación al pasar el ratón sobre la imagen principal */
.article-featured-image:hover img {
    transform: scale(1.03);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-light);
    margin: 30px 0;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px dotted var(--primary-light);
}

.article-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Autor del artículo */
.article-author {
    display: flex;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.article-author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-author-info {
    flex: 1;
}

.article-author-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.article-author-bio {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Compartir en redes sociales */
.social-share {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 30px;
}

.social-share-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
}

.social-button:hover {
    transform: translateY(-3px);
}

.social-button.facebook {
    background-color: #3b5998;
}

.social-button.twitter {
    background-color: #1da1f2;
}

.social-button.whatsapp {
    background-color: #25D366;
}

.social-button.linkedin {
    background-color: #0077b5;
}

.social-button.email {
    background-color: #848484;
}

/* Artículos relacionados */
.related-articles {
    margin-top: 50px;
}

.related-articles-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
    border-left: 5px solid var(--primary-color);
}

.related-article {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 100%;
    transition: transform 0.3s;
}

.related-article:hover {
    transform: translateY(-5px);
}

.related-article-img {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.related-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-article:hover .related-article-img img {
    transform: scale(1.05);
}

.related-article-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.related-article-content {
    padding: 20px;
}

.related-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.related-article-title a:hover {
    color: var(--primary-color);
}

.related-article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Barra lateral */
.sidebar-ad {
    transition: transform 0.3s;
}

.sidebar-ad:hover {
    transform: translateY(-3px);
}

.sidebar-ad .ad-content {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
}

.popular-news-item {
    transition: transform 0.2s;
}

.popular-news-item:hover {
    transform: translateX(5px);
}

.popular-news-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.categories .list-group-item {
    transition: background-color 0.2s;
}

.categories .list-group-item:hover {
    background-color: var(--primary-light);
}

/* Estilos para imágenes y figuras */
figure {
    margin-bottom: 25px;
}

figcaption {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0;
}

/* Estados de carga */
.loading {
    position: relative;
    min-height: 200px;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Estilos responsive adicionales */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.8rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .related-article-img {
        height: 140px;
    }

    .social-button {
        width: 40px;
        height: 40px;
    }

    .article-author {
        flex-direction: column;
        text-align: center;
    }

    .article-author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .article-container {
        padding: 15px !important;
    }

    .article-featured-image {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        border-radius: 0;
    }

    .social-share-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .article-category {
        margin-top: 10px;
    }
}

/* Efectos de impresión */
@media print {
    .social-share,
    .related-articles,
    .sidebar-ad,
    nav,
    .news-header,
    footer {
        display: none !important;
    }

    .article-container {
        box-shadow: none;
        padding: 0 !important;
    }

    .article-content {
        font-size: 12pt;
    }

    .article-title {
        font-size: 18pt;
    }

    a {
        text-decoration: none !important;
        color: black !important;
    }

    .article-author {
        border-top: 1px solid #ddd;
        margin-top: 20px;
        padding-top: 20px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.article-container {
    animation: fadeIn 0.5s ease-in-out;
}


/* Estilos para la sección de comentarios */
.comments-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.comment, .comment-reply {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.comment-reply {
    margin-left: 40px;
    margin-bottom: 15px;
}

.comment-avatar {
    flex: 0 0 50px;
    margin-right: 15px;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.comment-reply .comment-avatar img {
    width: 40px;
    height: 40px;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.comment-author {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    margin-right: 10px;
}

.comment-date {
    font-size: 12px;
    color: #6c757d;
}

.comment-body {
    margin-bottom: 10px;
}

.comment-body p {
    margin-bottom: 0;
    white-space: pre-line;
}

.comment-footer {
    font-size: 14px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-reaction, .btn-responder, .btn-reportar {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-reaction i, .btn-responder i, .btn-reportar i {
    margin-right: 5px;
}

.btn-reaction:hover, .btn-responder:hover {
    color: #0d6efd;
}

.btn-reportar:hover {
    color: #dc3545;
}

.btn-reaction.active {
    color: #0d6efd;
    font-weight: 500;
}

.btn-reaction.no-me-gusta.active {
    color: #dc3545;
}

.respuesta-form-container {
    margin-top: 15px;
    margin-bottom: 15px;
}

.replies-container {
    margin-top: 15px;
}

.replies-toggle {
    color: #0d6efd;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
}

.replies-toggle:hover {
    text-decoration: underline;
}

.replies {
    padding-left: 10px;
    border-left: 2px solid #e5e5e5;
}

/* Estilos para el modal de autenticación */
#authModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#authModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

#authModal .btn-close {
    filter: invert(1);
}

#authModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white !important; /* Asegurar texto blanco */
}

#authModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white !important; /* Mantener texto blanco en hover */
}

#authModal .btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea !important; /* Forzar color azul */
    background-color: transparent;
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#authModal .btn-outline-primary:hover {
    background: #667eea !important;
    border-color: #667eea;
    color: white !important; /* ESTA ES LA LÍNEA CLAVE - texto blanco en hover */
    transform: translateY(-2px);
}

#authModal .btn-outline-primary:focus {
    background: #667eea !important;
    border-color: #667eea;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Estilos para botones de reacción cuando el usuario no está autenticado */
.btn-reaction:hover:not(.active) {
    background-color: #f8f9fa;
    color: #495057;
    cursor: pointer;
}

.btn-responder-no-auth,
.btn-reportar-no-auth {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-responder-no-auth:hover,
.btn-reportar-no-auth:hover {
    background-color: #f8f9fa;
    color: #495057;
}