/*=============== JUMBOTRON SECTION ===============*/
.jumbotron {
    position: relative;
    width: 100%;
    height: 500px; 
    overflow: hidden;
    padding-top: var(--header-height);
    text-align: center;
}

.jumbotron__image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.jumbotron__image {
    display: block; 
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2.5s ease;
}

.jumbotron__image-container:hover .jumbotron__image {
    transform: scale(1.1);
}

.jumbotron__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(94,53,177, 0.4);
    z-index: 1;
}

.jumbotron__title {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: var(--white-color);
    font-size: 4rem;
    font-weight: var(--font-semi-bold);
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
    max-width: 90%;
    padding: 0 1rem;
    box-sizing: border-box;
}

/*=============== BLOG CONTENT SECTION (Artículos y Sidebar) ===============*/
.blog-content {
    background: url('images/purple-texture.jpg') center center / cover no-repeat;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    word-spacing: 0px;
}

.blog-content__container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-main {
    flex: 3;
    min-width: 600px;
}

.blog-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.blog-card {
    background-color: var(--white-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 1rem;
    position: relative;
}

.blog-card__image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
}

.blog-card__image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(94,53,177, 0.75);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-semi-bold);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.7s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.blog-card__image-wrapper:hover .blog-card__image {
    transform: scale(1.05);
}

.blog-card__image-wrapper:hover .blog-card__image-overlay {
    opacity: 1;
}

.blog-card__content {
    padding: 1.5rem;
}

.blog-card__title {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--black-color);
    text-align: center;
}

.blog-card__meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.blog-card__meta .fa-heart {
    color: #ccc;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.blog-card__meta .fa-heart.liked {
    color: #4d3ce7ce;
}

.blog-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.blog-card__read-more {
    display: block;
    font-size: 0.95rem;
    color: hsl(260, 100%, 82%);
    text-decoration: none;
    font-weight: var(--font-semi-bold);
    margin-top: 1.5rem;
    text-align: left;
}

.blog-card__read-more:hover {
    text-decoration: underline;
}
/* Estilos para el botón de me gusta */
.blog-card__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.blog-card__like-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color-light); /* O el color que uses por defecto para texto */
    transition: color 0.3s ease;
}

.blog-card__like-button:hover {
    color: var(--primary-color); /* Un color para el hover, por ejemplo */
}

/* Estilos para el icono del corazón */
.blog-card__like-button .fa-heart {
    font-size: 1.2rem; /* Tamaño del icono */
}

/* Estilo cuando el corazón está "marcado" como me gusta */
.blog-card__like-button .fa-heart.liked {
    color: #FF0000; /* Color rojo para el corazón cuando le has dado me gusta */
}

/*=============== SIDEBAR ===============*/
.blog-sidebar {
    flex: 1; /* Ocupa menos espacio que la sección principal */
    min-width: 280px; /* Ancho mínimo para la barra lateral */
    background-color: var(--white-color);
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    height: fit-content; /* Ajusta la altura al contenido */
}

.search-bar {
    display: flex;
    margin-bottom: 2rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-bar button {
    background-color: var(--black-color);
    color: var(--white-color);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #5e35b1; /* Púrpura oscuro */
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 1.5rem;
    color: var(--black-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid hsl(260, 100%, 82%);
    padding-bottom: 0.5rem;
}

.categories-list,
.recent-posts-list {
    list-style: none;
    padding: 0;
}

.categories-list li,
.recent-posts-list li {
    margin-bottom: 0.75rem;
}

.categories-list a,
.recent-posts-list a {
    color: var(--black-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.categories-list a:hover,
.recent-posts-list a:hover {
    color: hsl(260, 100%, 82%);
    text-decoration: underline;
}

/*=============== SEARCH RESULTS ===============*/
.search-results h2 {
    font-size: 2rem;
    color: var(--black-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-results__item {
    background-color: #f9f9f9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 5px solid hsl(260, 100%, 82%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.search-results__item h4 a {
    font-size: 1.2rem;
    color: var(--black-color);
    text-decoration: none;
    font-weight: var(--font-semi-bold);
}

.search-results__item h4 a:hover {
    color: hsl(260, 100%, 82%);
    text-decoration: underline;
}

.search-results__item p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.back-to-articles-button {
    display: block;
    margin: 2rem auto 0 auto;
    padding: 0.75rem 1.5rem;
    background-color: var(--black-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.back-to-articles-button:hover {
    background-color: #5e35b1;
}
/*=============== ESTILOS PARA ARTÍCULOS INDIVIDUALES ===============*/
.article__image {
    max-width: 100%; /* Asegura que no desborde en pantallas pequeñas */
    height: auto; /* Mantiene la proporción */
    margin-bottom: 1.5rem; /* Espacio debajo de la imagen */
}

.article__float-left {
    float: left; /* La imagen flotará a la izquierda */
    max-width: 350px; /* Ancho máximo de 200px */
    height: auto;
    margin-right: 1.5rem; /* Espacio a la derecha de la imagen para el texto */
    margin-bottom: 1rem; /* Espacio debajo de la imagen */
    border-radius: var(--border-radius); /* Opcional: para que se vea como en las tarjetas */
    box-shadow: var(--shadow-sm); /* Opcional: para que se vea como en las tarjetas */
}
.article__float-center {
    display: block;
    margin: 0 auto;
    max-width: 750px; /* Ancho máximo de 200px */
    height: auto;
    margin-bottom: 1rem; /* Espacio debajo de la imagen */
    border-radius: var(--border-radius); /* Opcional: para que se vea como en las tarjetas */
    box-shadow: var(--shadow-sm); /* Opcional: para que se vea como en las tarjetas */
}

/* Opcional: Limpiar el float si hay elementos posteriores que no deben flotar */
.blog-card__excerpt::after {
    content: "";
    display: table;
    clear: both;
}

/* Ajustes para el texto dentro del excerpt para que el float funcione bien */
.blog-card__excerpt p {
    text-align: justify; /* Justifica el texto para una apariencia más limpia */
    margin-bottom: 1rem; /* Espacio entre párrafos */
}

.blog-card__excerpt h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.blog-card__excerpt strong {
    font-weight: var(--font-bold);
}
@media screen and (max-width: 1118px) {
    .jumbotron__title {
        font-size: 3rem;
    }

    .blog-content__container {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .blog-main {
        width: 90%;
        min-width: unset;
    }

    .blog-articles {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .blog-sidebar {
        width: 90%;
        padding: 1rem;
    }
         .jumbotron__title {
         font-size: 3rem;
     }
     .jumbotron {
         height: 300px;
         padding-top: var(--header-height);
     }
}

@media screen and (max-width: 768px) {
    .jumbotron__title {
        font-size: 2.5rem;
    }

    .blog-card__image-wrapper {
        height: 180px;
    }

    .blog-card__title {
        font-size: 1.3rem;
    }

    .blog-card__meta {
        font-size: 0.8rem;
    }

    .blog-card__excerpt {
        font-size: 0.9rem;
    }

    .blog-card__read-more {
        font-size: 0.8rem;
    }

    .search-bar input,
    .search-bar button {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .sidebar-section h3 {
        font-size: 1.3rem;
    }

    .categories-list a,
    .recent-posts-list a {
        font-size: 0.9rem;
    }
    .article__float-left {
        float: none;
        display: block;
        margin: 0 auto 1rem auto;
        max-width: 100%;
    }
    .article__float-center {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .jumbotron__title {
        font-size: 2rem;
    }

    .blog-card__image-wrapper {
        height: 150px;
    }
}