/* colors palette
#040404 - Negro casi puro para texto principal
#DEDEDE - Gris claro para fondos
#77747B - Gris medio para elementos secundarios
#4F4F4C - Gris oscuro para textos secundarios
#7B7B7B - Gris medio adicional para elementos decorativos
*/

/* Variables base que serán sobrescritas por dark-mode.css */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #040404;
  --text-secondary: #4F4F4C;
  --text-muted: #77747B;
  --border-color: #7B7B7B;
  --accent-color: #040404;
  --accent-hover: #4F4F4C;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animaciones de entrada para elementos principales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Aplicar animaciones a elementos del home */
.container {
    animation: fadeIn 0.6s ease-out;
}

section.container {
    animation: fadeInUp 0.8s ease-out;
}

/* Hero section animaciones */
.titulo_hero {
    animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

.lead {
    animation: slideInFromLeft 0.8s ease-out 0.4s both;
}

.btn {
    animation: fadeInUp 0.8s ease-out 0.6s both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animaciones para imágenes */
img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: clip !important; /* Fix for Chrome overflow warning */
}

img:hover {
    transform: scale(1.02);
}

/* Animaciones para cards y artículos */
.bg-white,
.list-group-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}
/*
.bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}
    */

.list-group-item:hover {
    transform: translateX(5px);
    background-color: var(--bg-secondary) !important;
}

/* Títulos con animación escalonada */
h2 {
    animation: slideInFromLeft 0.6s ease-out both;
}

.titulo_noticia_principal {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.titulo_noticia_principal:hover {
    color: var(--accent-color) !important;
}

.titulo_noticia_secundaria {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.titulo_noticia_secundaria:hover {
    color: var(--accent-color) !important;
}

/* Delays escalonados para elementos de lista */
.list-group-item:nth-child(1) { animation-delay: 0.1s; }
.list-group-item:nth-child(2) { animation-delay: 0.2s; }
.list-group-item:nth-child(3) { animation-delay: 0.3s; }
.list-group-item:nth-child(4) { animation-delay: 0.4s; }

/* Animaciones para secciones de noticias */
section.mb-4 {
    animation: fadeInUp 0.8s ease-out both;
}

section.mb-4:nth-of-type(1) { animation-delay: 0.2s; }
section.mb-4:nth-of-type(2) { animation-delay: 0.4s; }
section.mb-4:nth-of-type(3) { animation-delay: 0.6s; }

/* Efectos hover para enlaces */
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a.text-decoration-none:hover {
    text-decoration: none !important;
    opacity: 0.8;
}

/* Separadores con animación */
hr {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reducir animaciones en dispositivos que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

h1, h2, h3.font-semibold {
    font-family: "Merriweather", serif;
    color: var(--text-primary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out both;
}

.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--text-muted), transparent);
    margin: 2rem auto;
    width: 100%;
    max-width: 1280px;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 1.2s ease-out 1s both;
}

h2 {
    font-family: "Merriweather", serif;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInFromLeft 0.6s ease-out both;
}

.titulo_noticia_principal {
    font-family: "Merriweather", serif;
    font-size: 25px;
    line-height: 34px;
    color: var(--text-primary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.titulo_noticia_principal:hover {
    color: var(--accent-color) !important;
}

.texto_noticia_principal {
    font-size: 20px;
    line-height: 21px;
    color: var(--text-secondary);
    margin: 12px 0 0 0;
    padding: 0;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.titulo_noticia_secundaria {
    font-family: "Merriweather", serif;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.titulo_noticia_secundaria:hover {
    color: var(--accent-color) !important;
}

.titulo_hero {
    font-size: 2rem;
    color: var(--text-primary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

.article_body {
    font-size: 19px;
    line-height: 32px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-family: "Merriweather", serif;
    word-wrap: break-word;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.article_head {
    font-size: 24px;
    line-height: 35px;
    color: var(--text-primary);
    font-weight: 300;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Enlaces y elementos interactivos */
a {
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--text-secondary);
    transform: translateX(2px);
}

/* Elementos de navegación */
.nav-link {
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--text-muted);
    transform: translateY(-1px);
}

/* Bordes y separadores */
hr {
    border-color: var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s both;
}

article p img{
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    overflow: clip !important; /* Fix for Chrome overflow warning */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

article p img:hover {
    transform: scale(1.02);
}

/* Clase para habilitar transiciones después de la carga */
.transitions-enabled * {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras para elementos específicos */
.bg-white {
    background-color: var(--bg-card) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}
/*
.bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}
*/
.text-muted {
    color: var(--text-muted) !important;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-dark {
    color: var(--text-primary) !important;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Asegurar que no haya recuadros feos en los elementos de lista */
.list-group-item {
    background-color: var(--bg-card);
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}

.list-group-item:hover {
    background-color: var(--bg-secondary) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Delays escalonados para elementos de lista */
.list-group-item:nth-child(1) { animation-delay: 0.1s; }
.list-group-item:nth-child(2) { animation-delay: 0.2s; }
.list-group-item:nth-child(3) { animation-delay: 0.3s; }
.list-group-item:nth-child(4) { animation-delay: 0.4s; }

/* Mejorar la apariencia de las cards */

[data-theme="dark"] .card,
[data-theme="dark"] .bg-white {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Footer Styles - Letras e iconos blancos en modo light */
footer.bg-dark h5,
footer.bg-dark p,
footer.bg-dark a,
footer.bg-dark i {
    color: #ffffff !important;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer.bg-dark a:hover {
    color: #f8f9fa !important;
}

footer.bg-dark a:hover i {
    color: #f8f9fa !important;
}