/* CSS ADICIONAL PARA SECCIÓN DE BLOG */

/* Ajustes específicos para blog */
body {
    background-color: #f8f9fa;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
}

/* ============================================
   HERO DEL BLOG
   ============================================ */

.blog-hero {
    background:
        linear-gradient(
            135deg,
            rgba(60, 20, 90, 0.78),
            rgba(120, 70, 150, 0.65)
        ),
        url('/img/blog/blog-hero.jpg');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    padding: 4rem 0;
    padding-top: calc(4rem + 80px);

    color: white;
    text-align: center;

    min-height: 320px;

    display: flex;
    align-items: center;
}


/* ============================================
   AJUSTE PARA MÓVILES
   ============================================ */

@media (max-width: 768px) {
    .blog-hero {
        min-height: 300px;
        padding-top: calc(3rem + 70px);
        padding-bottom: 3rem;

        background-position: center;
    }

    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }
}

/* Títulos de sección con línea decorativa */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Tarjetas de blog */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: none;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(106, 13, 173, 0.15);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
}

.blog-content {
    padding: 2rem;
}

.blog-content {
    padding: 2rem;
}

.blog-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.read-more:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

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

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.sidebar h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.recent-post {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.recent-post:last-child {
    border-bottom: none;
}

.recent-post:hover {
    background-color: #f8f9fa;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 10px;
}

.recent-post-title {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
}

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

.recent-post-date {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.category-tag {
    display: inline-block;
    background-color: #f8f9fa;
    color: var(--text-light);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
}

/* Barra de búsqueda */
.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #eee;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--secondary-color);
}

/* Newsletter */
.newsletter-signup {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.newsletter-input {
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 25px;
    width: 100%;
    margin-bottom: 1rem;
    outline: none;
}

.btn-newsletter {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-newsletter:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Paginación */
.pagination {
    justify-content: center;
    margin-top: 3rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    margin: 0 0.2rem;
    border-radius: 10px;
}

.page-link:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 2rem 0;
    }

    .blog-content {
        padding: 1.5rem;
    }

    .sidebar {
        margin-top: 2rem;
    }
}

/* ========== BOTONES DE ACCIÓN ========== */
.action-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.blog-card:hover .action-buttons {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.edit-btn {
    background: rgba(176, 141, 16, 0.9);
    color: white;
}

.edit-btn:hover {
    background: #ed9302;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.delete-btn {
    background: rgba(168, 26, 10, 0.9);
    color: white;
}

.delete-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Tooltips personalizados */
.action-btn[data-tooltip] {
    position: relative;
}

.action-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-top: 5px;
    z-index: 1000;
}

.action-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.8);
    margin-top: 1px;
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        opacity: 1;
        transform: translateY(0);
    }

    .blog-image {
        min-height: 200px;
    }

    .blog-content {
        padding: 20px;
    }
}

/* PARA EL FILTRO POR CATEGORIA */
.category-tag.active {
    background-color: #0d6efd;
    color: white;
    border-radius: 20px;
    padding: 3px 10px;
}
