:root {
    --primary: #ff1577;
    --bg: #0a0a0a;
    --card: #111111;
    --border: #222222;
    --sidebar-w: 200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg);
    color: white;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

/* --- SIDEBAR --- */
.sidebar-public {
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    height: 100vh; /* Ocupa el 100% de la ventana */
    position: fixed;
    left: 0;
    top: 0;
    padding: 30px 20px;
    transition: var(--transition);

    /* ESTO ES VITAL */
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
}

.sidebar-menu {
    flex: 1 0 auto; /* Obliga al menú a crecer y ocupar el espacio sobrante */
}

.sidebar-footer {
    margin-top: auto !important; /* Empuja el div al final del flex */
    padding: 10px 0 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

/* Aseguramos que el enlace dentro del footer se vea bien */
.sidebar-footer .menu-item {
    margin: 0;
    width: 100%;
}

.sidebar-header { margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: 1px; }
.logo-text span { color: var(--primary); }

.menu-label { font-size: 10px; letter-spacing: 2px; color: #444; font-weight: 700; margin: 20px 0 5px; text-transform: uppercase; }
.menu-label-right { font-size: 10px; letter-spacing: 2px; color: #444; font-weight: 700; margin: 5px 0 5px; text-transform: uppercase; }

.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px;
    color: #888; text-decoration: none; border-radius: 10px; font-size: 14px; transition: 0.3s;
}
.menu-item:hover, .menu-item.active { background: #1a1a1a; color: var(--primary); }
.menu-item.active { background: var(--primary); color: white; }

.vuelta-inicio {
    display: flex; align-items: center; gap: 12px; padding: 12px 15px;
    color: #888; text-decoration: none; border-radius: 10px; font-size: 14px; transition: 0.3s;
}
.vuelta-inicio:hover, .vuelta-inicio.active { color: var(--primary); }
.vuelta-inicio.active { background: var(--primary); color: white; }

.version {
    font-size: x-small;
    margin-top: 10px;
    color: rgba(255, 255, 255, .3);
}

.view-controls { display: flex; gap: 10px; }
.view-controls .menu-item { flex: 1; justify-content: center; }

.select-categorias {
    width: 100%; background: #1a1a1a; border: 1px solid var(--border);
    color: white; padding: 12px; border-radius: 10px; outline: none; cursor: pointer;
}

/* --- MAIN CONTENT & ALINEACIÓN --- */
.main-content { margin-left: var(--sidebar-w); padding: 50px 60px; min-height: 100vh; }
.brand-header h1 { font-size: 42px; font-weight: 800; margin: 0; }
.brand-header h1 span { color: var(--primary); }
.brand-header p { color: #666; margin-top: 5px; }

.dashboard-view { 
    display: flex; 
    gap: 40px; 
    margin-top: 40px; 
    align-items: flex-start; /* Alinea columnas arriba */
}

.posts-area { flex: 0 0 75%; }
.widgets-area { flex: 0 0 25%; }

/* --- CARDS (IMAGEN CUADRADA) --- */
.post-card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 15px; 
    overflow: hidden; 
    transition: 0.3s; 
}

/* --- MODO GRID (3 POR FILA) --- */
.post-grid-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Forzado a 3 por fila */
    gap: 20px; 
}
.post-grid-grid .card-img { 
    aspect-ratio: 1 / 1; /* Imagen cuadrada */
    height: auto; 
    background-size: cover; 
    background-position: center; 
    position: relative; 
}

/* --- MODO LISTA (Imagen Izquierda, Texto Derecha) --- */
.post-grid-list { display: flex; flex-direction: column; gap: 20px; }
.post-grid-list .post-card { display: flex; align-items: center; }
.post-grid-list .card-img { 
    flex: 0 0 180px; /* Tamaño fijo cuadrado */
    height: 180px; 
    background-size: cover;
    background-position: center;
    position: relative;
}
.post-grid-list .card-body { flex: 1; padding: 20px; }

.card-tag { position: absolute; top: 10px; left: 10px; background: var(--primary); font-size: 9px; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.card-body h3 a { color: white; text-decoration: none; font-size: 15px;  transition: 0.3s; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { color: #777; font-size: 13px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- WIDGETS --- */
.popular-link { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.popular-link a { color: #999; text-decoration: none; font-size: 13px; flex: 1; margin-right: 10px; transition: 0.3s; }
.popular-link a:hover { color: white; }
.popular-link span { color: var(--primary); font-size: 11px; font-weight: 700; }

/* --- RESPONSIVE HAMBURGUESA IZQUIERDA --- */

/* Estilos para el botón hamburguesa animado */
.menu-toggle {
    display: none; /* Oculto en escritorio */
    position: fixed;
    top: 20px;
    right: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1200;
    transition: 0.3s;
    
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* LA TRANSFORMACIÓN A "X" */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Aparece en móvil */
    }

    .sidebar-public { 
        left: auto; /* Anulamos el left de escritorio */
        right: -100%; /* Escondida a la derecha */
        width: 75%; /* Un poco más ancha para mejor lectura en móvil */
        box-shadow: -20px 0 50px rgba(0,0,0,0.5); /* Sombra hacia la izquierda */
        border-right: none;
        border-left: 1px solid var(--border);
        z-index: 1150;
    }

    .sidebar-public.active { 
        right: 0; /* Entra desde la derecha */
        left: auto; 
    }

    .main-content { 
        margin-left: 0; 
        padding: 100px 20px 40px; 
    }
    
    /* ... (el resto de tus estilos responsive se mantienen igual) ... */
}


.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1100; display: none; opacity: 0; transition: 0.3s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

@media (max-width: 1100px) {
    .post-grid-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    
    
    .main-content { margin-left: 0; padding: 100px 20px 40px; }
    .dashboard-view { flex-direction: column; }
    .posts-area, .widgets-area { flex: 0 0 100%; }
    .post-grid-grid { grid-template-columns: 1fr; }
    .post-grid-list .post-card { flex-direction: column; align-items: stretch; }
    .post-grid-list .card-img { flex: 0 0 250px; height: 250px; }
    .menu-label-mb {margin-top: 60px;}
    .version {
    font-size: smaller;
    
}
.view-controls-wrapper {
    display: none;
}
}

.empty-msg { text-align: center; padding: 60px; background: var(--card); border-radius: 20px; color: #444; border: 2px dashed var(--border); }

.card-date {
    display: block;
    
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-date i {
    margin-right: 5px;
    color: var(--primary); /* El color rosa que usas */
}

/* --- WIDGET PUBLICIDAD --- */
.promo-card {
    background: linear-gradient(145deg, #111, #1a1a1a);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid var(--border);
    text-align: center;
}

.promo-card h4 {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 10px;
}

.promo-card p {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.btn-promo-wa {
    display: inline-block;
    background: #25d366; /* Verde WhatsApp */
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.3s;
    margin-bottom: 20px;
}

.btn-promo-wa:hover {
    transform: translateY(-3px);
    
    color: white;
}

/* =========================================
   ESTILOS POST INDIVIDUAL (SINGLE POST)
   ========================================= */
.post-view { background: #050505; }




.post-full-header {
    height: 50vh; min-height: 450px; background-size: cover; background-position: center;
    display: flex; align-items: flex-end; padding-bottom: 80px;
}

.header-inner { max-width: 900px; margin: 0 auto; padding: 0 20px; width: 100%; }
.post-title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin: 20px 0; color: white; }
.post-meta-info { display: flex; gap: 30px; align-items: center; color: var(--text-muted); font-size: 13px; }
.post-meta-info .stars { color: var(--primary); }

.post-main-content {
    max-width: 850px; margin: -50px auto 0; background: var(--background);
    padding: 60px; border-radius: 30px 30px 0 0; position: relative;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
}

/* PAGINACIÓN */
.post-pagination {
    margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border-color);
    display: grid; grid-template-columns: 1fr 60px 1fr; gap: 20px; align-items: center;
}

.post-pagination-up {
    
    display: none; grid-template-columns: 1fr 60px 1fr; gap: 20px; align-items: center;
}

.pag-btn { text-decoration: none; display: flex; flex-direction: column; }
.pag-btn span { font-size: 11px; text-transform: uppercase; color: var(--primary); font-weight: 800; margin-bottom: 5px; }
.pag-btn strong { color: white; font-size: 15px; transition: 0.3s; }
.pag-btn.next { text-align: right; }
.pag-btn:hover strong { color: var(--primary); }

.pag-home {
    width: 50px; height: 50px; border: 1px solid var(--border-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: 0.3s; text-decoration: none;
}
.pag-home:hover { border-color: var(--primary); color: var(--primary); }

.share-section { margin-top: 50px; text-align: center; }
.share-btns { display: flex; justify-content: center; gap: 15px; margin-top: 15px; }
.btn-s { 
    width: 45px; height: 45px; border-radius: 12px; border: 1px solid var(--border-color);
    background: none; color: white; cursor: pointer; transition: 0.3s; display: flex;
    align-items: center; justify-content: center; text-decoration: none;
}
.btn-s:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); }

@media (max-width: 768px) {
    .post-title { font-size: 2.2rem; }
    .post-main-content { padding: 30px 20px; margin-top: -30px; }
    .post-pagination { grid-template-columns: 1fr 1fr; }
    .pag-home { display: none; }
} 

/* Botón Cargar Más */
.load-more-container { text-align: center; margin-top: 40px; }
.btn-load-more {
    background: #1a1a1a; color: white; border: 1px solid var(--border);
    padding: 12px 25px; border-radius: 30px; cursor: pointer; font-family: inherit;
    font-weight: 600; font-size: 13px; transition: 0.3s;
}
.btn-load-more:hover { border-color: var(--primary); color: var(--primary); }