/* Estilos mejorados para la vista de Bodegas */

/* Encabezado de sección */
.seccion-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #007bff;
}

.seccion-header .display-4 {
    font-weight: 600;
    color: #495057;
}

/* Noticia Individual */
.noticia-individual {
    margin-bottom: 2rem;
}

.noticia-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.breadcrumb {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.breadcrumb-item a {
    color: #6c757d;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #007bff;
}

.seccion-badge .badge {
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.seccion-badge .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Títulos de noticia */
.titulo-principal {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
    margin-bottom: 1rem;
}

.titulo-principal a {
    color: inherit;
    transition: color 0.3s ease;
}

.titulo-principal a:hover {
    color: #007bff;
}

.subtitulo-noticia {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.4;
    color: #6c757d;
}

.subtitulo-noticia a {
    color: inherit;
    transition: color 0.3s ease;
}

.subtitulo-noticia a:hover {
    color: #495057;
}

/* Navegación de noticias */
.navegacion-noticias .btn {
    transition: all 0.3s ease;
    border-radius: 25px;
}

.navegacion-noticias .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Compartir redes sociales */
.compartir-redes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Reproductor de audio */
.audio-player-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

/* Contenido de la noticia */
.contenido-noticia {
    font-size: 1.1rem;
    line-height: 1.6;
}

.entradilla strong,
.entradilla b {
    font-weight: 700 !important; /* 700 es equivalente a bold */
}

.texto-principal strong,
.texto-principal b {
    font-weight: 700 !important; /* 700 es equivalente a bold */
}



.entradilla {
    font-size: 1.25rem;
    font-weight: 300;
    color: #495057;
    padding-left: 0;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}


.texto-principal {
    font-size: 1.25rem;
    font-weight: 300;
    color: #495057;
    padding-left: 0;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

/*.texto-principal p {
    margin-bottom: 1.5rem;
    text-align: justify;
}*/

.texto-principal h3,
.texto-principal h4,
.texto-principal h5 {
    color: #495057;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    clear: both;
}

/* Mejoras tipográficas para texto envolvente */
.contenido-texto-envolvente .entradilla {
    margin-bottom: 2rem;
}

.contenido-texto-envolvente .texto-principal {
    text-indent: 0;
}

.contenido-texto-envolvente .texto-principal p:first-of-type {
    margin-top: 0;
    font-size: 1.15rem;
    font-weight: 500;
    color: #495057;
}

.contenido-texto-envolvente .texto-principal p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    color: #007bff;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    margin-bottom: -6px;
    font-family: Georgia, serif;
}

/* Contenedor de imágenes */
.imagenes-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.imagenes-container:hover {
    transform: translateY(-5px);
}

/* Estilos para imágenes flotantes alrededor del texto */
.contenido-texto-envolvente {
    padding: 2rem;
    line-height: 1.8;
    text-align: justify;
}

.imagen-flotante {
    max-width: 45%;
    width: 45%;
    margin: 0 2rem 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.4s ease;
    position: relative;
    display: block;
}

.imagen-flotante:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.imagen-izquierda {
    float: left;
    margin-right: 2rem;
    margin-left: 0;
}

.imagen-derecha {
    float: right;
    margin-left: 2rem;
    margin-right: 0;
}

/* Estilos para el contenido dentro de las imágenes flotantes */
.imagen-flotante img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.imagen-flotante .carousel-inner {
    width: 100%;
    height: auto;
}

.imagen-flotante .carousel-item {
    width: 100%;
    height: auto;
}

.imagen-flotante .carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Si hay carrusel, asegurar que se ajuste */
.imagen-flotante .carousel {
    width: 100%;
    height: auto;
}

.imagen-flotante .carousel-indicators {
    margin-bottom: 0.5rem;
}

.imagen-flotante .carousel-control-prev,
.imagen-flotante .carousel-control-next {
    width: 8%;
}

/* Forzar que todas las imágenes se ajusten al contenedor */
.imagen-flotante * {
    max-width: 100% !important;
    height: auto !important;
}

.imagen-flotante div,
.imagen-flotante figure,
.imagen-flotante picture {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estilos específicos para diferentes tipos de contenido de imagen */
.imagen-flotante .row {
    margin: 0 !important;
    width: 100% !important;
}

.imagen-flotante .col,
.imagen-flotante [class*="col-"] {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

/* Asegurar que el contenido no se desborde */
.imagen-flotante {
    contain: layout style;
}

.imagen-flotante::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,123,255,0.1), rgba(102,126,234,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.imagen-flotante:hover::after {
    opacity: 1;
}

/* Clearfix para el contenedor */
.contenido-texto-envolvente::after {
    content: "";
    display: table;
    clear: both;
}

/* Video container */
.video-container {
    padding: 1.5rem;
}

.video-container h5 {
    color: #495057;
    font-weight: 600;
}

/* Mapa container */
.mapa-container {
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    width: 100%;
    height: 450px;
    position: relative;
}

.mapa-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

.mapa-container > div {
    width: 100% !important;
    height: 100% !important;
}

/* Galería de noticias */
.galeria-noticias {
    margin-top: 2rem;
}

.galeria-container .card {
    border-radius: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.galeria-container .card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.galeria-container .card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e9ecef;
}

.galeria-container .card-title {
    color: #495057;
    font-weight: 600;
}

/* Sidebar */
.sidebar-content {
    padding-left: 1rem;
}

.sidebar-content .sticky-top {
    z-index: 1020;
}

/* Noticias relacionadas */
.noticias-relacionadas {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .titulo-principal {
        font-size: 2rem;
    }
    
    .subtitulo-noticia {
        font-size: 1.1rem;
    }
    
    .contenido-noticia {
        font-size: 1rem;
    }
    
    .navegacion-noticias,
    .compartir-redes {
        margin-bottom: 1rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sidebar-content {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .mapa-container {
        height: 300px;
    }
    
    /* Responsive para imágenes flotantes */
    .contenido-texto-envolvente {
        padding: 1.5rem;
    }
    
    .imagen-flotante {
        float: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 0 1.5rem 0 !important;
        display: block;
    }
    
    .imagen-izquierda,
    .imagen-derecha {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Media query específica para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .imagen-flotante {
        max-width: 50%;
        width: 50%;
    }
}

@media (max-width: 576px) {
    .titulo-principal {
        font-size: 1.75rem;
    }
    
    .seccion-header .display-4 {
        font-size: 2.5rem;
    }
    
    .entradilla {
        font-size: 1.1rem;
        padding: 0.8rem 0;
    }
    
    .contenido-texto-envolvente {
        padding: 1rem;
    }
    
    .contenido-texto-envolvente .texto-principal p:first-of-type::first-letter {
        font-size: 2.5rem;
        margin-right: 5px;
        margin-top: 3px;
        margin-bottom: -3px;
    }
    
    .texto-principal {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}

/* Animaciones suaves */
.card,
.btn,
.badge {
    transition: all 0.3s ease;
}

/* Mejoras de accesibilidad */
.btn:focus,
.badge:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Estados hover mejorados */
.card:hover {
    transform: translateY(-2px);
}

.btn:hover {
    transform: translateY(-1px);
}

/* Espaciado consistente */
.mb-custom {
    margin-bottom: 1.5rem;
}

.mt-custom {
    margin-top: 1.5rem;
}