/* ============================================
   CSS ESPECÍFICO PARA VISTA DETALLE DE NOTICIA
   ============================================ */

/* Header con gradiente - más compacto sin título y con bordes redondeados */
.detalle-noticia-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0 2rem 0;
    margin-bottom: -1.5rem; /* Overlap negativo para integración con card */
    position: relative;
    z-index: 1;
    border-radius: 0 0 20px 20px; /* Bordes redondeados en la parte inferior */
}

.detalle-noticia-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.detalle-noticia-header .breadcrumb-item a:hover {
    color: white;
}

/* Referencias badges en header - ocultas ahora */
.referencias-badges {
    display: none;
}

/* Card principal - mismo ancho que el header, con elevación */
.detalle-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    max-width: 1140px; /* Mismo max-width que el container del header */
    margin-left: auto;
    margin-right: auto;
}

/* Borde superior decorativo que conecta con el header */
.detalle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
}

/* Sección del título dentro de la card */
.card-header-section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #f0f0f0;
    position: relative;
}

/* Imagen de fondo sutil detrás del título */
.card-header-section::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: -2.5rem;
    right: -2.5rem;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: 0.3; /* Muy sutil */
    z-index: -1;
    pointer-events: none;
    border-radius: 15px 15px 0 0;
}

/* Título dentro de la card */
.card-titulo {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
    margin: 0;
}

/* Referencias dentro de la card */
.referencias-badges-card {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.referencia-badge-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Metadata en el header */
.metadata-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.metadata-header-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.metadata-header-item i {
    color: #16a085;
    font-size: 1rem;
}

.metadata-header-item strong {
    color: #6c757d;
}

.metadata-header-item time,
.metadata-header-item span {
    color: #212529;
    font-weight: 500;
}

@media (max-width: 768px) {
    .detalle-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .detalle-card::before {
        height: 3px;
    }
    
    .card-titulo {
        font-size: 1.5rem;
    }
}

/* Layout simplificado sin imagen flotante */
.noticia-content-layout {
    display: block;
}

/* Ocultar contenedor de imagen (ahora está de fondo) */
.noticia-imagen-container {
    display: none;
}

.noticia-texto-container {
    width: 100%;
}

/* Metadata con iconos - ahora después del contenido */
.metadata-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.metadata-item i {
    color: #667eea;
    font-size: 1.1rem;
}

.metadata-item strong {
    color: #495057;
}

/* Resumen principal */
.resumen-principal {
    margin-bottom: 2rem;
}

.resumen-principal h3 {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resumen-principal h3 i {
    color: #667eea;
}

.resumen-principal p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #212529;
}

/* Bullets destacados */
.bullets-detalle {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.bullets-detalle h4 {
    color: #667eea;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bullets-detalle ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.bullets-detalle li {
    padding: 0.75rem 0;
    line-height: 1.7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
}

.bullets-detalle li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bullets-detalle li:before {
    content: "▸";
    color: #667eea;
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Botones de acción */
.botones-accion {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.btn-volver {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-volver:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-fuente-original {
    background: #28a745;
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-fuente-original:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    color: white;
}

/* Alert para noticias sin bullets */
.alert-warning {
    border-left: 4px solid #ffc107;
    background: #fff3cd;
    border-radius: 8px;
}

/* Sección de noticias relacionadas */
.noticias-relacionadas {
    margin-top: 3rem;
    max-width: 1140px; /* Mismo max-width que la card principal */
    margin-left: auto;
    margin-right: auto;
}

.noticias-relacionadas h3 {
    color: #495057;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.noticias-relacionadas h3 i {
    color: #667eea;
}

.noticia-relacionada-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    height: 100%;
}

.noticia-relacionada-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.noticia-relacionada-card .card-title {
    color: #212529;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.noticia-relacionada-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

.noticia-relacionada-card .btn {
    background: #667eea;
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.noticia-relacionada-card .btn:hover {
    background: #764ba2;
    transform: translateX(3px);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detalle-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Mejoras de accesibilidad */
.btn-volver:focus,
.btn-fuente-original:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .detalle-noticia-header,
    .botones-accion,
    .noticias-relacionadas {
        display: none;
    }
    
    .detalle-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Ajustes responsivos adicionales */
@media (max-width: 1200px) {
    .detalle-card,
    .noticias-relacionadas {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .detalle-card,
    .noticias-relacionadas {
        max-width: 720px;
    }
    
    .detalle-noticia-header {
        padding: 2rem 0 2.5rem 0;
        margin-bottom: -1rem;
        border-radius: 0 0 18px 18px;
    }
}

@media (max-width: 768px) {
    .detalle-card,
    .noticias-relacionadas {
        max-width: 100%;
    }
    
    .detalle-noticia-header {
        padding: 1.5rem 0 2rem 0;
        margin-bottom: -0.5rem;
        border-radius: 0 0 15px 15px;
    }
    
    .detalle-card {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        border-radius: 0; /* Sin bordes redondeados en móviles */
        margin-left: 0;
        margin-right: 0;
        padding: 1.5rem 1rem; /* Padding más ajustado */
    }
    
    .card-header-section::before {
        left: -1rem;
        right: -1rem;
        top: -1.5rem;
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .card-titulo {
        font-size: 1.25rem;
    }
    
    .detalle-card {
        border-radius: 0; /* Sin bordes en móviles pequeños */
        padding: 1.5rem 0.75rem;
    }
    
    .detalle-card::before {
        left: 0;
        right: 0;
    }
    
    .referencia-badge-card {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .detalle-noticia-header {
        border-radius: 0 0 12px 12px;
    }
    
    .card-header-section::before {
        border-radius: 0;
    }
}

/* ============================================
   SECCIÓN DE COMPARTIR EN REDES SOCIALES
   ============================================ */

.compartir-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.compartir-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compartir-titulo i {
    color: #667eea;
}

.compartir-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-compartir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-compartir:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-compartir i {
    font-size: 1.1rem;
}

/* WhatsApp */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

/* Email */
.btn-email {
    background: linear-gradient(135deg, #EA4335 0%, #C5221F 100%);
}

.btn-email:hover {
    background: linear-gradient(135deg, #C5221F 0%, #A50E0E 100%);
}

/* Facebook */
.btn-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #0C63D4 0%, #084B9E 100%);
}

/* Twitter/X */
.btn-twitter {
    background: linear-gradient(135deg, #000000 0%, #14171A 100%);
}

.btn-twitter:hover {
    background: linear-gradient(135deg, #14171A 0%, #1C1F23 100%);
}

/* Copiar enlace */
.btn-copiar {
    background: linear-gradient(135deg, #6C757D 0%, #495057 100%);
}

.btn-copiar:hover {
    background: linear-gradient(135deg, #495057 0%, #343A40 100%);
}

/* Responsive para botones de compartir */
@media (max-width: 768px) {
    .compartir-botones {
        justify-content: center;
    }
    
    .btn-compartir {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .btn-compartir {
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .compartir-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}
