/* Estilos para la página Blog */

/* Hero de página */
.page-hero {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Contenido del Blog */
.blog-content {
    padding: 60px 0;
}

.blog-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Posts Container */
.posts-container {
    width: 100%;
}

/* Featured Post */
.featured-post {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.featured-image {
    height: 400px;
    position: relative;
}

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

.post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.featured-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    gap: 20px;
    color: var(--gray-dark);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.post-meta i {
    margin-right: 5px;
}

.featured-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.featured-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.read-more:hover {
    color: #124a6a;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-post {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

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

.post-image {
    height: 200px;
    position: relative;
}

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

.post-content {
    padding: 20px;
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.4;
}

.post-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 5px;
}

.page-link, 
.page-next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.page-link:hover:not(.active),
.page-next:hover {
    background-color: #f0f0f0;
}

.page-next {
    color: var(--primary-color);
}

.dots {
    margin: 0 5px;
}

/* Blog Sidebar */
.blog-sidebar {
    width: 100%;
}

/* Sidebar Widgets */
.sidebar-widget {
    background-color: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
}

.widget-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Search Widget */
.search-widget {
    padding: 0;
    overflow: hidden;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-form input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

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

.search-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-form button:hover {
    background-color: #124a6a;
}

/* Categories Widget */
.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    transition: color 0.3s;
}

.category-list a:hover {
    color: var(--primary-color);
}

.category-list span {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

/* Popular Posts Widget */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-post {
    display: flex;
    gap: 15px;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

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

.popular-post-content h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-post-content h4 a {
    color: var(--text-color);
    transition: color 0.3s;
}

.popular-post-content h4 a:hover {
    color: var(--primary-color);
}

.popular-post-content .post-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: #f5f5f5;
    padding: 6px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: all 0.3s;
}

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

/* Subscribe Widget */
.subscribe-widget p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.subscribe-form input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.subscribe-form .btn {
    display: inline-block;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .blog-grid-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .featured-content h2 {
        font-size: 1.8rem;
    }
    
    .featured-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Estilos para la página de artículo individual del blog */
.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--gray-dark);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.article-meta i {
    margin-right: 5px;
}

.article-featured-image {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

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

.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px;
    color: var(--primary-color);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 20px;
    color: var(--primary-color);
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    background-color: #f8f9fa;
    margin: 30px 0;
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
}

.article-content .image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-top: -20px;
    margin-bottom: 30px;
}

.article-tags {
    margin: 40px 0;
}

.article-tags .tag {
    margin-right: 10px;
    margin-bottom: 10px;
}

.article-share {
    margin-bottom: 40px;
}

.article-share h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s;
}

.share-button.facebook {
    background-color: #3b5998;
}

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

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

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

.share-button:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.article-author {
    background-color: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
}

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

.author-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.author-info p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    gap: 15px;
}

.author-social-icon {
    color: var(--primary-color);
    transition: all 0.3s;
}

.author-social-icon:hover {
    color: #124a6a;
    transform: translateY(-3px);
}

.related-posts {
    margin: 60px 0;
}

.related-posts h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
}

.post-navigation a {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s;
}

.post-navigation a:hover {
    color: #124a6a;
}

.post-navigation a.prev i {
    margin-right: 10px;
}

.post-navigation a.next i {
    margin-left: 10px;
}

.comments-section {
    margin-bottom: 60px;
}

.comments-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.comment {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.comment-text {
    line-height: 1.7;
    margin-bottom: 10px;
}

.comment-reply {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-reply:hover {
    color: #124a6a;
}

.comment-form {
    background-color: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.comment-form h3 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2.2rem;
    }
    
    .article-featured-image {
        height: 300px;
    }
    
    .article-author {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .comment {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .comment-header {
        flex-direction: column;
        gap: 5px;
    }
}