/* ============================================
   VITAPAW BLOG - Diseño Moderno y Optimizado
   ============================================ */

:root {
    --blog-primary: #ff8ab5;
    --blog-secondary: #4a5568;
    --blog-accent: #667eea;
    --bg-body: #f3f4f6;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.05);
    --card-hover-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: #1f2937;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blog-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--blog-primary);
    text-decoration: none;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--blog-primary) 0%, #d699ff 100%);
    color: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(255, 138, 181, 0.3);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.blog-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.blog-hero .form-control {
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.blog-hero .btn-search {
    border-radius: 50px;
    padding: 0 1.5rem;
    background: white;
    color: var(--blog-primary);
    font-weight: 600;
}

/* Cards de Posts */
.post-card {
    background: white;
    border-radius: 16px;
    border: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.post-card-img-wrapper {
    overflow: hidden;
    height: 220px;
    position: relative;
}

.post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #111827;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}
.card-title a:hover {
    color: var(--blog-primary);
}

.card-text {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge-custom {
    background-color: rgba(255, 138, 181, 0.15);
    color: var(--blog-primary);
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.card-footer {
    border-top: 1px solid #f3f4f6;
    padding: 1rem 1.5rem;
    background: transparent;
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Sidebar */
.sidebar-card {
    background: white;
    border-radius: 16px;
    border: none;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.sidebar-card h5, .sidebar-card .h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--blog-secondary);
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f9fafb;
    transition: color 0.2s;
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--blog-primary); }

/* Paginación */
.pagination .page-link {
    border: none;
    margin: 0 4px;
    border-radius: 10px;
    color: var(--blog-secondary);
    font-weight: 600;
    padding: 0.5rem 1rem;
}
.pagination .page-item.active .page-link {
    background-color: var(--blog-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 138, 181, 0.4);
}

/* Botones de compartir (si los usas) */
.btn-share {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.btn-share:hover { transform: scale(1.1); }
.btn-share-whatsapp { background: #25D366; color: white; }
.btn-share-facebook { background: #1877F2; color: white; }
.btn-share-linkedin { background: #0077B5; color: white; }

/* Ajustes Móviles */
@media (max-width: 768px) {
    .blog-hero { padding: 2rem 1.5rem; border-radius: 0; margin: -1rem -1rem 2rem -1rem; }
    .post-card-img-wrapper { height: 180px; }
}

/* ===================================================
   MEJORAS DE ACCESIBILIDAD Y RENDIMIENTO
   =================================================== */

/* Áreas táctiles más grandes en móviles */
@media (max-width: 576px) {
    .btn, .page-link, .list-group-item, .pagination .page-link {
        padding: 0.75rem 1rem;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .card-footer span {
        font-size: 0.8rem;
    }
}