/* Estilos del Blog */

/* Hero del Blog */
.blog-hero {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-lighter));
    color: white;
    padding: 6rem 0 3rem;
    text-align: center;
}

.blog-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.category-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-tag.active,
.category-tag:hover {
    background: white;
    color: var(--color-primary);
}

/* Featured Post */
.featured-post {
    padding: 4rem 0;
}

.featured-post-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.featured-post-image {
    position: relative;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-cta);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.featured-post-content {
    padding: 2rem;
}

.featured-post-content h2 a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post-content h2 a:hover {
    color: var(--color-primary);
}

/* Post Cards */
.blog-posts {
    padding: 4rem 0;
    background: var(--color-gray-100);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

/* Newsletter */
.blog-newsletter {
    padding: 4rem 0;
    background: var(--color-gray-100);
    text-align: center;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
}

/* Artículo Individual */
.blog-post {
    padding: 6rem 0;
}

.post-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.post-hero-image {
    margin-bottom: 3rem;
}

.post-hero-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.table-of-contents {
    background: var(--color-gray-100);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.author-bio {
    margin: 4rem auto;
    max-width: 800px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2rem;
    background: var(--color-gray-100);
    border-radius: 12px;
}

.author-bio img {
    width: 76px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero-content h1 {
        font-size: 2rem;
    }

    .featured-post-card {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
        padding: 0 1rem;
    }

    .post-header {
        padding: 0 1rem;
    }

    .post-content {
        padding: 0 1rem;
    }

    .author-bio {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Estilos para la lista de artículos del blog */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.post-card {
    background: var(--color-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.post-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-categories {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.post-category {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-excerpt {
    color: var(--color-text);
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-200);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author span {
    font-size: 0.875rem;
    color: var(--color-text);
    opacity: 0.8;
}

.post-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.post-date,
.post-read-time {
    font-size: 0.875rem;
    color: var(--color-text);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-info {
        align-items: flex-start;
    }
}

/* Estilos para la barra de búsqueda */
.blog-search {
    padding: 2rem 0;
    background: var(--color-gray-100);
    border-bottom: 1px solid var(--color-gray-200);
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--color-background);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-icon {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text);
    opacity: 0.5;
}

.search-wrapper input {
    flex: 1;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--color-text);
    background: transparent;
}

.search-wrapper input:focus {
    outline: none;
}

.search-wrapper input::placeholder {
    color: var(--color-text);
    opacity: 0.5;
}

.search-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: var(--color-primary-dark);
}

.search-tags {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-tags span {
    color: var(--color-text);
    opacity: 0.7;
    font-size: 0.875rem;
}

.search-tags a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-background);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.search-tags a:hover {
    background: var(--color-primary);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-search {
        padding: 1.5rem 1rem;
    }

    .search-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .search-wrapper input {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid var(--color-gray-200);
        border-radius: 6px;
    }

    .search-button {
        width: 100%;
    }

    .search-tags {
        justify-content: center;
        text-align: center;
    }

    .search-tags span {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}