/* Estilos Modernos para Nota Detallada */
.nota-detalle-moderno {
    background: white;
    border-radius: var(--radio-borde);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 40px 0;
    position: relative;
}

/* Media Principal */
.media-principal {
    position: relative;
    background: #000;
    border-radius: var(--radio-borde) var(--radio-borde) 0 0;
    overflow: hidden;
    min-height: 500px;
}

/* ========== SECCIÓN DE VÍDEO ========== */
.video-section,
.images-section {
    display: none;
    position: relative;
    width: 100%;
}

.video-section.active,
.images-section.active {
    display: block;
}

/* Contenedor de video */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    background: #000;
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Controles del video */
.video-controls-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: auto;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.video-volanta .volanta-text {
    background: var(--color-principal);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.video-buttons {
    display: flex;
    gap: 10px;
}

.media-switch-btn,
.audio-btn,
.gallery-count {
    width: 125px;
    height: 33px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    right: 80px;
    position: absolute;
    top: 17px;
}

.media-switch-btn:hover,
.audio-btn:hover {
    background: var(--color-principal);
    color: white;
    transform: scale(1.1);
}

.audio-btn {
    background: #d90000;
    color: white;
}

.gallery-count {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Título del video */
.video-title-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    pointer-events: auto;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.video-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* ========== SECCIÓN DE IMÁGENES ========== */
.images-container {
    display: flex;
    min-height: 600px;
    background: #000;
}

/* Miniaturas a la izquierda */
.thumbnails-left {
    width: 120px;
    background: #111;
    padding: 20px 10px;
    overflow-y: auto;
    flex-shrink: 0;
}

.thumbnails-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-item {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    height: 80px;
}

.thumb-item:hover,
.thumb-item.active {
    opacity: 1;
    border-color: var(--color-principal);
    transform: scale(1.05);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenedor principal de imagen */
.main-image-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Controles de imágenes */
.images-controls-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.images-volanta .volanta-text {
    background: var(--color-principal);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.images-buttons {
    display: flex;
    gap: 10px;
}

/* Slider de imágenes */
.main-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-slide.active {
    opacity: 1;
    z-index: 1;
}

.image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.image-info {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-desc {
    font-size: 0.95rem;
    margin: 0;
    flex: 1;
}

.image-counter {
    display: none;
    background: var(--color-principal);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 15px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--color-principal);
    color: white;
    transform: scale(1.1);
}

/* Título de imágenes */
.images-title-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.images-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* ========== IMAGEN POR DEFECTO ========== */
.default-media {
    position: relative;
    width: 100%;
    height: 400px;
    background: #f0f0f0;
}

.default-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 30px;
}

.default-volanta .volanta-text {
    background: var(--color-principal);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 15px;
}

.default-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin: 0;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

/* ========== CONTENIDO DE LA NOTA ========== */
.nota-contenido-moderno {
    padding: 40px;
}

.nota-meta-superior {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.meta-item i {
    color: var(--color-principal);
    font-size: 1.1rem;
}

.nota-copete-moderno {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border-left: 5px solid var(--color-principal);
}

.copete-icon {
    color: var(--color-principal);
    font-size: 2rem;
    line-height: 1;
}

.copete-texto {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #444;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

.separador-moderno {
    display: flex;
    align-items: center;
    margin: 40px 0;
}

.linea-izq,
.linea-der {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-principal));
}

.linea-der {
    background: linear-gradient(90deg, var(--color-principal), transparent);
}

.circulo {
    padding: 0 20px;
    color: var(--color-principal);
    font-size: 0.8rem;
}

.nota-cuerpo-moderno {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    padding: 10px;
}

.nota-cuerpo-moderno img {
    max-width: 100%;
    height: auto;
}

.parrafo-moderno {
    margin-bottom: 1.8em;
    text-align: justify;
}

.subtitulo-moderno {
    color: var(--color-secundario);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5em 0 1.5em 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-principal);
    position: relative;
}

.subtitulo-moderno::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--color-principal);
}

.subtitulo-secundario {
    color: #555;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2em 0 1em 0;
    padding-left: 20px;
    border-left: 4px solid var(--color-principal);
}

.cita-moderna {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    font-style: italic;
    color: #555;
    position: relative;
    overflow: hidden;
}

.cita-moderna::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 8rem;
    color: rgba(217, 0, 0, 0.1);
    font-family: serif;
    line-height: 1;
}

.cita-icono {
    color: var(--color-principal);
    font-size: 1.5rem;
    margin-top: 5px;
}

.cita-contenido {
    flex: 1;
    font-size: 1.2rem;
    line-height: 1.7;
}

.nota-meta-inferior {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.tags-container {
    margin-bottom: 30px;
}

.tags-titulo {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    background: #f0f0f0;
    color: #555;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--color-principal);
    color: white;
    transform: translateY(-2px);
}

.compartir-moderno {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.compartir-titulo {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compartir-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.compartir-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.compartir-btn.facebook {
    background: #3b5998;
    color: white;
}

.compartir-btn.instagram {
    background: #c13584;
    color: white;
}

.compartir-btn.x {
    background: #000;
    color: white;
}

.compartir-btn.linkedin {
    background: #0077b5;
    color: white;
}

.compartir-btn.copy-link {
    background: #6c757d;
    color: white;
}

.compartir-btn.copy-link.copied {
    background: #28a745;
}

.compartir-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.compartir-btn i {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1200px) {

    .video-main-title,
    .images-main-title,
    .default-title {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .images-container {
        min-height: 500px;
    }

    .thumbnails-left {
        width: 100px;
    }

    .thumb-item {
        height: 70px;
    }

    .video-main-title,
    .images-main-title,
    .default-title {
        font-size: 1.8rem;
    }

    .nota-contenido-moderno {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .media-principal {
        min-height: 0;
    }

    .video-container {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 16 / 9;
    }

    .video-section.active,
    .video-wrapper,
    .youtube-player {
        min-height: 0;
    }

    .images-container {
        flex-direction: column;
        min-height: 500px;
    }

    .thumbnails-left {
        width: 100%;
        height: 100px;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thumbnails-wrapper {
        flex-direction: row;
        height: 100%;
    }

    .thumb-item {
        height: 80px;
        width: 100px;
        flex-shrink: 0;
    }

    .video-main-title,
    .images-main-title,
    .default-title {
        font-size: 1.5rem;
    }

    .video-controls-top,
    .images-controls-top {
        padding: 15px;
    }

    .video-title-bottom,
    .images-title-bottom {
        padding: 15px;
    }

    .media-switch-btn,
    .audio-btn,
    .gallery-count {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .volanta-text {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    .slider-controls {
        padding: 0 10px;
    }

    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .nota-contenido-moderno {
        padding: 2px;
    }

    .nota-meta-superior {
        /* flex-direction: column; */
        /* align-items: inherit; */
        gap: 15px;
        /* display: flex; */
        justify-content: space-around;
        margin-top: 10px;
        padding-bottom: 10px;
    }

    .copete-texto {
        font-size: 1.2rem;
    }

    .compartir-botones {
        flex-direction: column;
    }

    .compartir-btn {
        justify-content: center;
    }
}

@media (max-width: 576px) {

    .video-main-title,
    .images-main-title,
    .default-title {
        font-size: 1.3rem;
    }

    .thumb-item {
        height: 70px;
        width: 90px;
    }

    .image-info {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .image-counter {
        margin-left: 0;
    }

    .nota-copete-moderno {
        flex-direction: column;
        padding: 20px;
        margin: 20px 0;
    }

    .copete-icon {
        font-size: 1.5rem;
    }

    .cita-moderna {
        padding: 20px;
        flex-direction: column;
    }
}


/* ========== ESTILOS PARA REPRODUCTOR DE AUDIO ========== */
.audio-section {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 16px;
    padding: 20px 25px;
    margin: 25px auto;
    max-width: 800px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Efecto de onda sutil de fondo */
.audio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-principal), #ff4d4d);
    opacity: 0.8;
}

/* Contenedor del reproductor */
#nota-audio {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    outline: none;
}

/* Personalización de controles nativos */
#nota-audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 8px 15px;
}

#nota-audio::-webkit-media-controls-play-button {
    background-color: var(--color-principal);
    border-radius: 50%;
    color: white;
}

#nota-audio::-webkit-media-controls-play-button:hover {
    background-color: #b30000;
    transform: scale(1.05);
}

#nota-audio::-webkit-media-controls-volume-slider {
    background-color: var(--color-principal);
    border-radius: 10px;
}

#nota-audio::-webkit-media-controls-current-time-display,
#nota-audio::-webkit-media-controls-time-remaining-display {
    color: #333;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

/* Indicador de audio activo */
.audio-section.playing {
    box-shadow: 0 8px 25px rgba(217, 0, 0, 0.2);
    border-color: rgba(217, 0, 0, 0.2);
}

.audio-section.playing::before {
    animation: audioPulse 1.5s infinite alternate;
}

@keyframes audioPulse {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.8;
    }
}

/* Estado cuando está pausado */
.audio-section.paused {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .audio-section {
        margin: 20px 15px;
        padding: 18px 20px;
        border-radius: 12px;
    }

    #nota-audio {
        height: 36px;
    }
}

@media (max-width: 576px) {
    .audio-section {
        margin: 15px 10px;
        padding: 15px;
    }

    #nota-audio::-webkit-media-controls-panel {
        padding: 6px 10px;
    }
}

.audio-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    width: 65px;
    right: 30px;
}

.audio-btn:hover {
    background: var(--color-principal);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 0, 0, 0.2);
}

.audio-btn.playing {
    background: var(--color-principal);
    color: white;
}

.audio-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.video-controls-top .audio-btn.playing,
.images-controls-top .audio-btn.playing {
    animation: audioIconPulse 2s infinite;
}

/* Interior de nota con ranking lateral */
.nota-main-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.nota-detalle-moderno,
.trending-section {
    grid-column: 1;
}

.mas-leidas-lateral {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    min-width: 0;
}

.nota-publicidad-lateral {
    margin-bottom: 22px;
}

.nota-publicidad-lateral > span {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.nota-publicidad-lateral .banner-module-single {
    padding: 0;
}

.nota-publicidad-lateral .banner-module-single::before,
.nota-publicidad-lateral .banner-module-single::after {
    display: none;
}

.nota-publicidad-lateral .banner-container-single {
    padding: 0;
}

.agregar-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: fit-content;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 11px 19px 11px 12px;
    color: #202124;
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid #dadce0;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(60, 64, 67, 0.14);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.agregar-google:hover {
    color: #174ea6;
    background: #fff;
    border-color: #a8c7fa;
    box-shadow: 0 6px 18px rgba(60, 64, 67, 0.2);
    transform: translateY(-2px);
}

.agregar-google:focus-visible {
    outline: 3px solid rgba(66, 133, 244, 0.3);
    outline-offset: 3px;
}

.agregar-google img {
    width: 30px;
    height: 30px;
    padding: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(60, 64, 67, 0.18);
    flex: 0 0 auto;
    object-fit: contain;
}

@media (max-width: 480px) {
    .agregar-google {
        width: min(100%, 330px);
        padding: 10px 16px 10px 11px;
        font-size: 0.82rem;
    }
}

.mas-leidas-sticky {
    position: sticky;
    top: 110px;
    padding: 20px;
    background: #fff;
    border-radius: var(--radio-borde);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mas-leidas-sticky h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px;
    padding-bottom: 12px;
    color: var(--color-principal);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--color-principal);
}

.mas-leidas-lista {
    display: flex;
    flex-direction: column;
}

.mas-leida-item {
    display: grid;
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    color: var(--color-texto);
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.mas-leida-item:last-child {
    border-bottom: 0;
}

.mas-leida-item img {
    width: 85px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
}

.mas-leida-item span {
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 600;
}

.mas-leida-item:hover {
    color: var(--color-principal);
}

@media (max-width: 992px) {
    .nota-main-container {
        display: block;
    }

    .mas-leidas-lateral {
        align-self: auto;
        margin-bottom: 3rem;
    }

    .mas-leidas-sticky {
        position: static;
    }

    .mas-leida-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .mas-leida-item img {
        width: 110px;
        height: 75px;
    }
}

@keyframes audioIconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 0, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(217, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 0, 0, 0);
    }
}
