/* ===== BLOG MODERNO Y OPTIMIZADO ===== */

/* Blog Toolbar Mejorado */
.blog-toolbar {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.blog-search {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--light-color);
    border-radius: 25px;
    font-size: 15px;
    transition: var(--transition);
}

.blog-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.blog-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), #ff8757);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.blog-search button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.blog-filter select {
    padding: 12px 20px;
    border: 2px solid var(--light-color);
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    background: var(--white);
    transition: var(--transition);
}

.blog-filter select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Featured Post Mejorado */
.featured-post {
    background: linear-gradient(135deg, var(--secondary-color), #003d6b);
    color: var(--white);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.featured-post::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.2), transparent);
    border-radius: 50%;
}

.featured-post .post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.featured-post .category-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.featured-post h2 {
    font-size: 32px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.featured-post p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.featured-post .btn-read-more {
    background: var(--white);
    color: var(--secondary-color);
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.featured-post .btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Blog Posts Grid Mejorado */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Blog Card Moderno */
.blog-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.blog-card-bookmark {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.blog-card-bookmark:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.blog-card-bookmark.bookmarked {
    background: var(--primary-color);
    color: var(--white);
}

.blog-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card-title {
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--light-color);
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 13px;
}

.blog-card-author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.blog-card-read-more {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.blog-card-read-more:hover {
    gap: 10px;
}

/* Sidebar Mejorado */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.category-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray);
    transition: var(--transition);
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.category-count {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-color);
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info h4 {
    font-size: 14px;
    color: var(--dark-color);
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-date {
    font-size: 12px;
    color: var(--gray);
}

/* Tags Widget */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    padding: 8px 15px;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--dark-color);
    transition: var(--transition);
    cursor: pointer;
}

.tag-item:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Modal de Artículo Completo */
.blog-post-modal .custom-modal-content {
    max-width: 900px;
    padding: 0;
}

.blog-post-header {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.blog-post-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 40px;
    color: var(--white);
}

.blog-post-header-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
}

.blog-post-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.blog-post-body {
    padding: 40px;
}

.blog-post-body h3 {
    color: var(--dark-color);
    margin: 25px 0 15px;
    font-size: 22px;
}

.blog-post-body p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.blog-post-body ul, 
.blog-post-body ol {
    margin: 15px 0 15px 30px;
    color: var(--gray);
}

.blog-post-body li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.blog-post-share {
    padding: 30px 40px;
    border-top: 2px solid var(--light-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-post-share h4 {
    color: var(--dark-color);
    margin: 0;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.linkedin {
    background: #0077b5;
}

/* Comentarios Section */
.blog-post-comments {
    padding: 30px 40px;
    background: var(--light-color);
}

.comments-list {
    margin-bottom: 30px;
}

.comment-item {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
}

.comment-date {
    font-size: 13px;
    color: var(--gray);
}

.comment-text {
    color: var(--gray);
    line-height: 1.6;
}

.comment-form {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
}

.comment-form h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid var(--light-color);
    border-radius: 8px;
    font-size: 15px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form button {
    background: linear-gradient(135deg, var(--primary-color), #ff8757);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-posts {
        grid-template-columns: 1fr;
    }

    .featured-post h2 {
        font-size: 24px;
    }

    .blog-post-header h1 {
        font-size: 24px;
    }

    .blog-post-body,
    .blog-post-share,
    .blog-post-comments {
        padding: 20px;
    }
}
