/* Tailwind CSS CDN warning fix - for production use proper installation */
/* This is development/demo version only */
body {
    font-family: 'Inter', sans-serif;
}
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    transform: translateY(-5px);
    /* Color de Sombra cambiado a Rosa */
    box-shadow: 0 10px 15px -3px rgba(233, 69, 96, 0.1), 0 4px 6px -2px rgba(233, 69, 96, 0.05);
}
.tag {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.tag.active {
    /* Color de Fondo cambiado a Rosa */
    background-color: #e94560;
    color: #1e293b; /* slate-800 */
}
.dark .tag.active {
    color: #ffffff;
}
.loader {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal transitions */
#modal {
    transition: opacity 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out;
    opacity: 0;
    backdrop-filter: blur(0px);
}
#modal.flex {
    opacity: 1;
    backdrop-filter: blur(4px);
}
#modal > div {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.95) translateY(20px);
    opacity: 0;
}
#modal.flex > div {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Reading mode transitions */
#modal-sidebar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
}
.reading-mode #modal-sidebar {
    width: 0 !important;
    opacity: 0;
    transform: translateX(100%);
    overflow: hidden;
}

article {
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.reading-mode article {
    max-width: 65ch; /* Optimal reading width */
}

/* Smooth content fade */
.content-fade-in {
    animation: fadeInContent 0.4s ease-out forwards;
}
@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced modal transitions */
#modal {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    backdrop-filter: blur(0px);
}
#modal.flex {
    opacity: 1;
    backdrop-filter: blur(8px);
}
#modal > div {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.96) translateY(40px);
    opacity: 0;
}
#modal.flex > div {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Content transitions */
#modal-body-content, #modal-faq-content, #modal-faq-mobile {
    transition: opacity 0.2s ease-in-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Table of Contents styles */
#modal-faq-content nav a, #mobile-section-content nav a {
    display: block;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}
#modal-faq-content nav a:hover, #mobile-section-content nav a:hover {
    background-color: rgb(241 245 249); /* slate-100 */
    /* Color de hover cambiado a Rosa Oscuro */
    color: #c7304f; 
    transform: translateX(4px);
}
.dark #modal-faq-content nav a:hover, .dark #mobile-section-content nav a:hover {
    background-color: rgb(51 65 85); /* slate-700 */
    /* Color de hover cambiado a Rosa Claro */
    color: #f06a8a;
}

/* Header transitions */
#modal .sticky {
    transition: background-color 0.2s ease-in-out, backdrop-filter 0.2s ease-in-out;
}

/* Button transitions */
.read-more-btn, .expand-keywords, .collapse-keywords {
    transition: all 0.2s ease-in-out;
}
.read-more-btn:hover {
    transform: translateY(-1px);
}
.expand-keywords:hover, .collapse-keywords:hover {
    transform: scale(1.05);
}

/* Navigation buttons transitions */
#nav-content, #nav-faq, #toggle-reading-mode {
    transition: color 0.2s ease-in-out, transform 0.1s ease-in-out;
}
#nav-content:hover, #nav-faq:hover, #toggle-reading-mode:hover {
    transform: translateY(-1px);
}

/* Card animations */
.card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease-in-out;
}
.card:hover {
    transform: translateY(-8px);
    /* Color de Sombra cambiado a Rosa */
    box-shadow: 0 20px 25px -5px rgba(233, 69, 96, 0.1), 
                0 10px 10px -5px rgba(233, 69, 96, 0.04);
}

/* Grid animations */
#newsletter-grid {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
#newsletter-grid.loaded {
    opacity: 1;
}
#newsletter-grid .card {
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media container transitions */
#modal-video-container {
    transition: padding 0.3s ease-in-out, margin 0.3s ease-in-out;
}

/* Light Theme Prose */
.prose-custom { 
    color: #374151; 
    line-height: 1.8;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}
.prose-custom.prose-lg {
    font-size: 18px;
    line-height: 1.8;
}
.prose-custom.prose-sm {
    font-size: 14px;
    line-height: 1.7;
}
.prose-custom h1, .prose-custom h2, .prose-custom h3, .prose-custom h4, .prose-custom h5, .prose-custom h6 { 
    color: #111827; 
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    transition: color 0.2s ease-in-out;
}
.prose-custom h1 { 
    font-size: 2.5rem; 
    /* Color de borde cambiado a Rosa */
    border-bottom: 3px solid #e94560; 
    padding-bottom: 0.75rem; 
    margin-top: 0;
    transition: border-color 0.2s ease-in-out, font-size 0.3s ease-in-out;
}
.prose-custom h2 { 
    font-size: 1.875rem; 
    /* Color de borde cambiado a Rosa Claro */
    border-bottom: 2px solid #f06a8a; 
    padding-bottom: 0.5rem;
    transition: border-color 0.2s ease-in-out, font-size 0.3s ease-in-out;
}
.prose-custom h3 { 
    font-size: 1.5rem; 
    /* Color cambiado a Rosa */
    color: #e94560;
    transition: color 0.2s ease-in-out, font-size 0.3s ease-in-out;
}
.prose-custom h4 { 
    font-size: 1.25rem; 
    /* Color cambiado a Rosa Oscuro */
    color: #c7304f;
    transition: color 0.2s ease-in-out, font-size 0.3s ease-in-out;
}
.prose-custom p { 
    margin-bottom: 1.5rem;
    transition: margin 0.2s ease-in-out;
}
.prose-custom ul, .prose-custom ol { 
    margin-bottom: 1.5rem; 
    padding-left: 1.75rem;
    transition: margin 0.2s ease-in-out, padding 0.2s ease-in-out;
}
.prose-custom li { 
    margin-bottom: 0.75rem;
    transition: margin 0.2s ease-in-out;
}
.prose-custom a { 
    /* Color de enlace cambiado a Cian */
    color: #00f5d4; 
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}
.prose-custom a:hover { 
    /* Color de hover cambiado a Cian Claro */
    color: #60fff0; 
}
.prose-custom strong { 
    /* Color cambiado a Rosa Oscuro */
    color: #b92846; 
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}
.prose-custom blockquote { 
    /* Color de borde cambiado a Rosa */
    border-left: 4px solid #e94560; 
    color: #4b5563; 
    margin: 2rem 0;
    padding-left: 1.5rem;
    font-style: italic;
    /* Color de fondo cambiado a Rosa muy claro */
    background-color: #fdf5f7;
    padding: 1.5rem;
    border-radius: 0.75rem;
    font-size: 1.1em;
    transition: all 0.3s ease-in-out;
}
.prose-custom code { 
    /* Color de código cambiado a Cian Oscuro */
    color: #00b49b; 
    background-color: #f3f4f6; 
    padding: 0.25em 0.5em; 
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.2s ease-in-out;
}
.prose-custom pre { 
    background-color: #f3f4f6; 
    color: #374151;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    overflow-x: auto;
    transition: all 0.3s ease-in-out;
}
.prose-custom pre code {
    background-color: transparent;
    padding: 0;
}

/* Reading mode */
.reading-mode #modal-sidebar {
    display: none !important;
}
.reading-mode article {
    max-width: 65ch; /* Optimal reading width */
}

/* Media container in new layout */
#modal-video-container:not(:empty) {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 2rem;
    margin-bottom: 0;
}
.dark #modal-video-container:not(:empty) {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Dark Theme Prose */
.dark .prose-custom { color: #d1d5db; }
.dark .prose-custom h1, .dark .prose-custom h2, .dark .prose-custom h3, .dark .prose-custom h4, .dark .prose-custom h5, .dark .prose-custom h6 { color: #f9fafb; }
.dark .prose-custom h1 { border-bottom-color: #e94560; } /* Rosa */
.dark .prose-custom h2 { border-bottom-color: #f06a8a; } /* Rosa Claro */
.dark .prose-custom h3 { color: #f06a8a; } /* Rosa Claro */
.dark .prose-custom h4 { color: #f06a8a; } /* Rosa Claro */
.dark .prose-custom a { color: #00f5d4; } /* Cian */
.dark .prose-custom a:hover { color: #60fff0; } /* Cian Claro */
.dark .prose-custom strong { color: #f06a8a; } /* Rosa Claro */
.dark .prose-custom blockquote { 
    border-left-color: #e94560; /* Rosa */
    color: #9ca3af;
    background-color: #1f2937;
}
.dark .prose-custom code { color: #00f5d4; background-color: #374151; } /* Cian */
.dark .prose-custom pre { background-color: #1f2937; color: #d1d5db; }

audio {
    filter: invert(0.1);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
audio:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.dark audio {
    filter: invert(0.9) sepia(0.1) saturate(0.8) hue-rotate(180deg);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
}
.dark audio:hover {
    /* Color de borde hover cambiado a Rosa */
    border-color: #e94560;
    /* Color de sombra hover cambiado a Rosa */
    box-shadow: 0 4px 8px rgba(233, 69, 96, 0.2);
}

/* Audio player in cards */
.media-container audio {
    margin: 0;
    width: 100%;
}

/* Audio player in full size modal */
#modal-video-container audio {
    max-width: 100%;
    margin: 0 auto;
}

/* Toast notifications */
#toast {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Card highlight effect for direct links */
.card-highlighted {
    position: relative;
    animation: highlight-pulse 3s ease-in-out;
    /* Color de borde cambiado a Rosa */
    border: 3px solid #e94560 !important;
    /* Color de sombra cambiado a Rosa */
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4), 0 10px 30px rgba(233, 69, 96, 0.2) !important;
    transform: scale(1.02) !important;
    z-index: 10;
}

.card-highlighted::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    /* Gradiente cambiado a Rosa */
    background: linear-gradient(45deg, #e94560, #f06a8a, #e94560, #f06a8a);
    border-radius: 12px;
    z-index: -1;
    animation: glow-border 3s ease-in-out;
}

.card-highlighted::after {
    content: '📍 Boletín seleccionado';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    /* Color de fondo cambiado a Rosa */
    background: #e94560;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: badge-appear 3s ease-in-out;
}

@keyframes highlight-pulse {
    0% { 
        /* Color de borde cambiado a Rosa */
        border-color: #e94560;
        /* Color de sombra cambiado a Rosa */
        box-shadow: 0 0 20px rgba(233, 69, 96, 0.4), 0 10px 30px rgba(233, 69, 96, 0.2);
        transform: scale(1.02);
    }
    50% { 
        /* Color de borde cambiado a Rosa Claro */
        border-color: #f06a8a;
        /* Color de sombra cambiado a Rosa Claro */
        box-shadow: 0 0 30px rgba(240, 106, 138, 0.6), 0 15px 40px rgba(240, 106, 138, 0.3);
        transform: scale(1.03);
    }
    100% { 
        /* Color de borde cambiado a Rosa */
        border-color: #e94560;
        /* Color de sombra cambiado a Rosa */
        box-shadow: 0 0 20px rgba(233, 69, 96, 0.4), 0 10px 30px rgba(233, 69, 96, 0.2);
        transform: scale(1.02);
    }
}

@keyframes glow-border {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes badge-appear {
    0% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-10px) scale(0.8); 
    }
    20% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0) scale(1); 
    }
    80% { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-10px) scale(0.8); 
    }
}

/* Dark theme adjustments for highlighted card */
.dark .card-highlighted::after {
    /* Color de fondo cambiado a Rosa Claro */
    background: #f06a8a;
    color: #111827;
}

/* Share button in cards */
.share-btn {
    transition: all 0.2s ease-in-out;
    opacity: 0.7;
}
.share-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}


/* Ocultar etiqueta “Boletín seleccionado” sin afectar borde ni resplandor */
.card-highlighted::after,
.dark .card-highlighted::after {
    content: none !important;
}


/* Suavizar el fondo interior de la tarjeta resaltada sin alterar el borde ni el resplandor */
.card-highlighted {
    /* Color de fondo cambiado a Rosa muy claro */
    background-color: #fdf5f7 !important;
}

/* Ajuste correspondiente para el tema oscuro */
.dark .card-highlighted {
    /* Color de fondo cambiado a Rosa oscuro */
    background-color: #3d2329 !important;
}
