/*
 Theme Name:   Corsocius Child
 Theme URI:    https://corsocius.com/
 Description:  Astra Child Theme para Corsocius
 Author:       Ángel Grimaldo
 Author URI:   https://angelgrimaldo.com
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, responsive-layout
 Text Domain:  corsocius-child
*/

/* === Estilos para el contenido del Blog (single.php) === */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #053351;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
}

.entry-content p {
    margin-bottom: 1.5em;
    line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content a {
    color: #004EDC;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #00E398;
}

/* === Estilos para los Widgets de la Sidebar === */
.widget {
    margin-bottom: 2rem;
}

#secondary h2.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #053351;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00E398;
}

.widget ul {
    list-style: none;
    padding-left: 0;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

.widget ul li a {
    color: #004EDC;
    text-decoration: none;
}

.widget ul li a:hover {
    text-decoration: underline;
}

/* === Unificar estilos de títulos en widgets de bloques === */
#secondary .widget .wp-block-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #053351;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00E398;
}

/* === Estilos para el botón "Leer más" del Blog === */
.btn-read-more {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: white !important;
    font-weight: bold;
    text-decoration: none !important;
    border-radius: 9999px;
    background: linear-gradient(to right, #01B97B, #017CB2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-read-more:hover {
    filter: brightness(110%);
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* === Mejoras Visuales del Blog con Colores de Marca === */
.blog-title {
    color: #035EC3;
}

.post-card {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.post-card:hover {
    border-color: #04A3AA;
}

.entry-title a {
    color: #035EC3;
    transition: color 0.3s ease;
}

.cat-links a {
    background-color: #07B79F;
    color: white !important;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-decoration: none !important;
    font-weight: bold;
    margin-right: 0.25rem;
    display: inline-block;
    margin-bottom: 0.25rem;
    transition: background-color 0.3s ease;
}

.cat-links a:hover {
    background-color: #04A3AA;
}

/* === Corrección para eliminar los puntos del menú === */
header .menu,
header .menu ul,
header .menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === Estilos para el Tiempo de Lectura === */
.reading-time-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
}

/* === Estilos para Artículos Relacionados === */
.related-posts-title {
    border-bottom: 2px solid #07B79F;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* === Estilos para la Tabla de Contenidos === */
.toc-container {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #04A3AA;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #035EC3;
    margin-bottom: 1rem;
}

.toc-container ol {
    list-style: decimal;
    margin-left: 1.5rem;
    padding-left: 0;
}

.toc-container ol li {
    margin-bottom: 0.5rem;
}

.toc-container ol li a {
    color: #035EC3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-container ol li a:hover {
    color: #07B79F;
    text-decoration: underline;
}

/* === Estilos para los botones de compartir === */
.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.share-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.linkedin-bg {
    background-color: #0077b5;
}

.facebook-bg {
    background-color: #1877f2;
}

.twitter-bg {
    background-color: #1da1f2;
}

.whatsapp-bg {
    background-color: #25d366;
}

/* === Estilos para la navegación entre posts === */
.post-navigation {
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    max-width: 50%;
}

.post-navigation a {
    display: block;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    border-color: #04A3AA;
    background-color: #f9fafb;
}

.post-navigation .nav-title-meta {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
    display: block;
    font-weight: 700;
    color: #035EC3;
}

.post-navigation .nav-next {
    text-align: right;
}

/* === Estilos para el borde con gradiente en widgets === */
.widget-gradient-border {
    background: linear-gradient(to bottom, #035EC3, #07B79F);
    padding: 2px;
    border-radius: 1rem;
}

/* === Estilos para el Widget del Banner CTA === */
.widget_cta_banner_widget .cta-banner-widget {
    border-radius: 0.75rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
}

.widget_cta_banner_widget .cta-banner-content {
    padding: 2rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    color: white;
    width: 100%;
}

.widget_cta_banner_widget .widget-title {
    border-bottom: none;
    color: white;
    font-size: 1.75rem;
    line-height: 1.2;
}

.widget_cta_banner_widget p {
    font-size: 1.1rem;
    margin: 0;
}

.widget_cta_banner_widget .cta-button {
    display: inline-block;
    background-color: #ef4444;
    color: white !important;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 0.5rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    text-decoration: none !important;
}

.widget_cta_banner_widget .cta-button:hover {
    background-color: #dc2626;
}

/* === Estilos para el Widget de Perfiles Sociales === */
.social-profiles-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white !important;
    text-decoration: none !important;
    font-size: 1.2rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.social-profile-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.instagram-bg {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.youtube-bg {
    background-color: #FF0000;
}

/* === Estilos para el Banner CTA Fijo (Sticky) === */
.widget_cta_banner_widget {
    position: -webkit-sticky;
    /* Para Safari */
    position: sticky;
    top: 20px;
    /* Espacio desde la parte superior del viewport */
}
/* === Correcciones de Estilo para el Footer en WordPress === */

/* Forzar el color blanco en los títulos del footer */
footer h3 {
    color: white !important;
}

/* Forzar el redondeo en los campos del formulario del footer */
footer form input[type="text"],
footer form input[type="email"],
footer form input[type="tel"] {
    border-radius: 9999px !important;
}
/* === Estilos para el Banner CTA del Blog === */
.cta-background-blog {
    background-size: cover;
    background-position: center;
    position: relative; /* Necesario para la capa de superposición */
    z-index: 1;
}

/* Capa oscura para mejorar la legibilidad del texto */
.cta-background-blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 31, 68, 0.6); /* Tono azul oscuro semitransparente */
    z-index: -1;
}

/* Asegurar que el texto sea blanco y tenga buena legibilidad */
.cta-background-blog h2, .cta-background-blog p {
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Sombra de texto sutil */
}
/* === Estilos para el Filtro de Categorías === */
.category-filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.category-filter a {
    display: block;
    padding: 0.5rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-filter a:hover,
.category-filter a.active {
    background-color: #035EC3;
    color: white;
    border-color: #035EC3;
}

/* === NUEVO Diseño para Artículo Destacado (Mejorado) === */
.featured-post-card-new {
    position: relative;
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    align-items: flex-end;
    /* Alinea el contenido abajo */
}

.featured-post-card-new .featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.4s ease;
}

.featured-post-card-new:hover .featured-image {
    transform: scale(1.05);
}

.featured-post-card-new::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Gradiente más oscuro para mayor contraste */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 70%);
    z-index: 2;
}

.featured-post-card-new .featured-content {
    position: relative;
    z-index: 3;
    padding: 2rem;
    color: white;
}

.featured-post-card-new .entry-title a {
    color: white !important;
    text-decoration: none;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.featured-post-card-new .entry-title a:hover {
    text-decoration: underline;
}

/* Píldora para la fecha */
.featured-post-card-new .entry-meta .posted-on {
    background-color: rgba(0, 0, 0, 0.3);
    /* Fondo oscuro semitransparente */
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
}


/* === Estilos para el Filtro de Categorías (Actualizado) === */
.category-filter a:hover,
.category-filter a.active {
    background-color: #00E398;
    color: #001F44;
    /* Texto oscuro para mejor contraste */
    border-color: #00E398;
}

/* === Mejora de Hover para Tarjetas Normales === */
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
/* === Correcciones para el Menú Móvil del Blog === */

/* Eliminar los puntos (viñetas) de la lista */
#mobile-menu nav ul,
#mobile-menu nav li {
    list-style: none !important;
}

/* Forzar el estilo de los enlaces para que coincida con el original */
#mobile-menu nav a {
    color: white !important;
    font-size: 1.875rem !important; /* text-3xl */
    font-weight: 700 !important; /* font-bold */
}
/* === Estilos para el botón flotante de WhatsApp === */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}