/* xerus-cms-theme.css - Tema unico para sitio publico + panel admin del
   mini CMS Xerus. Se carga DESPUES de Bootstrap, sin tocarlo. Paleta azul
   + amarillo (index.php/home.php). Sidebar portado desde
   xerus-blue-theme.css (RIS), mismos colores del sitio publico. */

/* 1) TOKENS - sobrescribe variables de Bootstrap + variables propias */
:root,
[data-bs-theme=light] {
    /* --- Paleta CMS: misma familia que index.php/blog.php --- */
    --cms-primary:      #1B69C8;
    --cms-primary-dark: #123F82;
    --cms-secondary:    #2B73D7;
    --cms-navy:         #050D1C;
    --cms-accent:       #FFE14F;
    --cms-accent-dark:  #A9840A;
    --cms-ink:          #26364A;
    --cms-muted:        #5E7086;
    --cms-danger:       #C0524A;
    --cms-danger-bg:    #FBECEA;
    --cms-warning:      #A9840A;
    --cms-warning-bg:   #FFF6E0;
    --cms-success:      #23976F;
    --cms-success-bg:   #E3F3EE;
    --cms-info:         var(--cms-primary);
    --cms-info-bg:      #EAF3FA;
    --cms-bg-page:      #ECF4F7;
    --cms-border:       #E3ECF5;
    --cms-table-border: #ECEEF3;
    --cms-gradient:     linear-gradient(135deg, var(--cms-primary-dark) 0%, var(--cms-secondary) 100%);

    /* --- Bootstrap: color primario -> azul de marca --- */
    --bs-primary: var(--cms-primary);
    --bs-primary-rgb: 27, 105, 200;
    --bs-primary-text-emphasis: var(--cms-primary-dark);
    --bs-primary-bg-subtle: var(--cms-info-bg);
    --bs-primary-border-subtle: #C7E0F0;

    /* --- Bootstrap: tipografia y color de cuerpo --- */
    --bs-body-font-family: 'Inter', -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--cms-ink);
    --bs-body-bg: #FFFFFF;
    --bs-secondary-color: var(--cms-muted);
    --bs-border-color: var(--cms-border);
    --bs-link-color: var(--cms-primary);
    --bs-link-hover-color: var(--cms-primary-dark);

    /* --- Bootstrap: radios (mismo criterio "intermedio" del sitio publico) --- */
    --bs-border-radius: 0.65rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: 0.9rem;
    --bs-border-radius-xl: 1.25rem;

    /* --- Bootstrap: estados semanticos reutilizados en badges --- */
    --bs-success: var(--cms-success);
    --bs-success-bg-subtle: var(--cms-success-bg);
    --bs-warning: var(--cms-warning);
    --bs-warning-bg-subtle: var(--cms-warning-bg);
    --bs-danger: var(--cms-danger);
    --bs-danger-bg-subtle: var(--cms-danger-bg);
    --bs-info: var(--cms-info);
    --bs-info-bg-subtle: var(--cms-info-bg);

    /* Alias genericos: vistas admin migradas usan var(--primary) etc en vez de --cms-*, sin reescribirlas */
    --primary: var(--cms-primary);
    --primary-dark: var(--cms-primary-dark);
    --secondary: var(--cms-secondary);
    --accent: var(--cms-accent);
    --accent-dark: var(--cms-accent-dark);
    --cream: #D5D3C9;
    --tier-neutral: #40474F;
    --dark: var(--cms-primary-dark);
    --text: var(--cms-ink);
    --text-light: var(--cms-muted);
    --light-bg: var(--cms-bg-page);
    --white: #FFFFFF;
    --gradient-primary: var(--cms-gradient);
    --gradient-hero: linear-gradient(135deg, var(--cms-bg-page) 0%, #FFFFFF 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(27, 105, 200, 0.16);
    --shadow-xl: 0 20px 60px rgba(27, 105, 200, 0.22);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2) BASE */
/* Mismo reset que ya usa la landing junto con Bootstrap sin problema -
   se prueba en produccion desde hace rato en views/index.php. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #FFFFFF;
    color: var(--cms-ink);
    overflow-x: hidden;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--cms-primary);
    outline-offset: 2px;
}

/* Layout base: sidebar fijo + contenido con margen equivalente
   (ver seccion 6, .main-content, para el ancho exacto). */
.app-container {
    min-height: 100vh;
}

.content-wrapper {
    padding: 0.75rem 1rem 1.5rem;
}

/* 3) ENCABEZADO DE PAGINA - .page-header-action (usado en las 6 vistas admin) */
.page-header-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--cms-border);
    padding: 8px 24px;
    margin: -0.75rem -1rem 16px;
    box-shadow: 0 2px 8px rgba(18, 63, 130, 0.05);
    min-height: 52px;
    box-sizing: border-box;
}
.page-header-action .page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    row-gap: 2px;
    min-width: 0;
}
.page-header-action .page-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--cms-info-bg);
    color: var(--cms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.page-header-action .page-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}
.page-header-action .page-title-main {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cms-ink);
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-header-action .page-subtitle {
    font-size: 0.75rem;
    color: var(--cms-muted);
    line-height: 1.2;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-header-action .page-subtitle i { font-size: 0.7rem; }
.page-header-action .page-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.page-header-action .action-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    background: var(--cms-info-bg);
    color: var(--cms-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.page-header-action .action-chip.chip-warning { background: var(--cms-warning-bg); color: var(--cms-warning); }
.page-header-action .action-chip.chip-success { background: var(--cms-success-bg); color: var(--cms-success); }

@media (max-width: 768px) {
    .page-header-action { padding: 8px 14px; margin: -0.75rem -0.5rem 12px; }
    .page-header-action .page-title-main { font-size: 0.9rem; }
    .page-header-action .page-subtitle { font-size: 0.7rem; }
    .page-header-action .page-icon { width: 28px; height: 28px; font-size: 0.8rem; }
}

/* 4) CARDS / PANELES */
.card {
    border: 1px solid var(--cms-border);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: 0 4px 16px rgba(18, 63, 130, 0.05);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--cms-border);
    font-weight: 700;
    color: var(--cms-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
}

.card-body { padding: 18px; }

.card-shadow {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card-shadow:hover { box-shadow: var(--shadow-md); }

/* 5) BARRA DE FILTROS / BUSCADOR DE LISTADOS */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--cms-border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.filter-bar .form-control,
.filter-bar .form-select { min-width: 160px; flex: 1 1 160px; }
.filter-bar .filter-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }

/* 6) BOTONES (degradado/acento del sitio publico) */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-primary-custom:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(27, 105, 200, 0.3);
}

.btn-accent-custom {
    background: var(--cms-accent);
    color: var(--cms-primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-accent-custom:hover {
    background: var(--cms-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 225, 79, 0.35);
}

.btn-secondary-custom {
    background: var(--cms-bg-page);
    color: var(--text);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-secondary-custom:hover {
    background: var(--cms-border);
    color: var(--text);
    transform: translateY(-2px);
}

.section-label {
    display: block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    margin-bottom: 8px;
}
.section-label i { color: var(--primary); }

.alert-custom { border-radius: var(--radius-sm); border: none; }
.text-muted-custom { color: var(--cms-muted); font-size: 0.8rem; }

.info-box {
    background: var(--cms-bg-page);
    border: 1px solid var(--cms-border);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.info-box h6 {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cms-border);
}
.info-box p {
    color: var(--cms-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.info-box p:last-child { margin-bottom: 0; }
.info-box p i { color: var(--cms-primary); margin-top: 2px; flex-shrink: 0; }
.info-box p.text-warning { color: var(--cms-warning); }
.info-box p.text-warning i { color: var(--cms-warning); }

/* 7) TABLAS DE LISTADO (posts, slides, categorias, tags, colecciones...) */
.table-custom { border-radius: var(--radius-md); overflow: hidden; }
.table-custom thead { background: var(--cms-bg-page); }
.table-custom thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cms-muted);
    padding: 12px 14px;
    border-bottom: 1px solid var(--cms-border);
    white-space: nowrap;
}
.table-custom tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--cms-table-border);
    font-size: 0.85rem;
    color: var(--cms-ink);
}
.table-custom tbody tr:hover { background-color: var(--cms-info-bg); }
.table-custom tbody tr:last-child td { border-bottom: none; }

.badge-count {
    background: var(--cms-info-bg);
    color: var(--cms-primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-header .badge-count {
    background: var(--cms-primary);
    color: #fff;
}

/* Columna "vistas" con contador compacto */
.badge-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--cms-info-bg);
    color: var(--cms-primary);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    min-width: 56px;
    justify-content: center;
}
.badge-views i { font-size: 0.7rem; }

/* Misma forma que .badge-views, sin el ancho minimo (para "coleccion") */
.badge-collection {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--cms-info-bg);
    color: var(--cms-primary);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

/* Columna "titulo" como link, sin negrita */
.post-title-link {
    color: var(--cms-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    line-height: 1.45;
    transition: var(--transition);
    display: block;
}
.post-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
.post-excerpt-row {
    color: var(--cms-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 2px;
    display: block;
}

/* Badges de estado - base generica + variantes que ya usan varias vistas */
.badge-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-published { background: var(--cms-success-bg); color: var(--cms-success); }
.badge-draft     { background: var(--cms-warning-bg); color: var(--cms-warning); }
.badge-scheduled { background: var(--cms-info-bg);    color: var(--cms-primary); }
.badge-archived  { background: var(--cms-bg-page);    color: var(--cms-muted); }
.badge-collection{ background: var(--cms-info-bg);    color: var(--cms-primary); }
.badge-active    { background: var(--cms-success-bg); color: var(--cms-success); }
.badge-inactive  { background: var(--cms-warning-bg); color: var(--cms-warning); }

/* Badges de ROL de usuario - misma forma de .badge-status, otro nombre
   para no mezclar conceptos (estado de un post vs rol de un usuario). */
.badge-role {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-role-root   { background: var(--cms-danger-bg);  color: var(--cms-danger); }
.badge-role-admin  { background: var(--cms-warning-bg); color: var(--cms-warning); }
.badge-role-author { background: var(--cms-info-bg);    color: var(--cms-primary); }


/* Botones de accion circulares, coloreados por tipo (tabla de filas) */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.action-buttons .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: var(--transition);
}
.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
/* Solidos y vividos, igual que .btn-accent-custom / .btn-danger que ya
   usa categories.php - no el fondo pastel tenue que tenian antes. */
.action-buttons .btn-view      { background: var(--cms-primary);  color: #fff; }
.action-buttons .btn-edit      { background: var(--cms-accent);   color: var(--cms-primary-dark); }
.action-buttons .btn-publish   { background: var(--cms-success);  color: #fff; }
.action-buttons .btn-unpublish { background: #8a97a8;             color: #fff; }
.action-buttons .btn-delete    { background: var(--cms-danger);   color: #fff; }
.action-buttons .btn-view:hover      { filter: brightness(1.12); color: #fff; }
.action-buttons .btn-edit:hover      { background: var(--cms-accent-dark); color: #fff; }
.action-buttons .btn-publish:hover   { filter: brightness(1.12); color: #fff; }
.action-buttons .btn-unpublish:hover { filter: brightness(1.12); color: #fff; }
.action-buttons .btn-delete:hover    { filter: brightness(1.12); color: #fff; }

.empty-state { padding: 60px 20px; text-align: center; }
.empty-state i { font-size: 4rem; color: var(--cms-border); }
.empty-state h4 { color: var(--dark); font-weight: 600; margin-top: 16px; }
.empty-state p { color: var(--text-light); margin-top: 8px; }

/* 8) SIDEBAR (.xerus-pill/.pill-*) - portado desde xerus-blue-theme.css, colores del sitio publico */
:root {
    --cms-sidebar-curve:  14px;
    --cms-sidebar-gutter: 22px;
}

.xerus-pill {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 68px;
    /* Mismos azules que --gradient-primary, orientado vertical para el sidebar */
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--secondary) 100%);
    border-radius: 0;
    box-shadow: 2px 0 16px rgba(18, 63, 130, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1030;
    transition: width 0.28s ease, transform 0.28s ease;
}
.xerus-pill.expanded { width: 250px; }
.xerus-pill { --cms-sidebar-gutter: 14px; --cms-sidebar-curve: 11px; }
.xerus-pill.expanded { --cms-sidebar-gutter: 22px; --cms-sidebar-curve: 14px; }

/* Encabezado: logo + titulo */
.pill-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.xerus-pill:not(.expanded):not(.mobile-open) .pill-header { justify-content: center; padding: 16px 0; }
.pill-brand { display: flex; align-items: center; gap: 12px; overflow: hidden; min-width: 0; }
.pill-logo {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: flex; align-items: center; justify-content: center;
}
.pill-logo img { width: 20px; height: 20px; object-fit: contain; }
.logo-fallback {
    display: none;
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    font-weight: 700; color: #ffffff; font-size: 0.95rem;
    border-radius: 50%;
}
.pill-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    width: 0;
    transition: opacity 0.18s ease;
}
.xerus-pill.expanded .pill-title { opacity: 1; width: auto; }

/* Boton de colapsar - circulo flotante, hermano del sidebar (este tiene
   overflow:hidden y lo recortaria si viviera adentro). */
.sidebar-toggle {
    position: fixed !important;
    top: 26px !important;
    left: 68px !important;
    margin-left: -14px !important;
    width: 28px !important; height: 28px !important;
    border-radius: 50% !important;
    background: var(--cms-primary) !important;
    color: #ffffff !important;
    border: 3px solid var(--cms-bg-page, #ECF4F7) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65rem !important;
    z-index: 1031 !important;
    box-shadow: 0 3px 8px rgba(27, 105, 200, 0.45) !important;
    cursor: pointer;
    transition: left 0.28s ease, transform 0.2s ease;
}
.sidebar-toggle:hover {
    background: var(--cms-primary-dark) !important;
    border-color: var(--cms-primary-dark) !important;
    transform: scale(1.08);
}
.sidebar-toggle i,
.sidebar-toggle:hover i {
    color: #ffffff !important;
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}
.xerus-pill.expanded ~ .sidebar-toggle { left: 250px !important; }
.xerus-pill.expanded ~ .sidebar-toggle i { transform: rotate(0deg); }
@media (max-width: 992px) {
    .sidebar-toggle { display: none !important; }
}

/* Navegacion */
.pill-nav {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: auto;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.pill-nav::-webkit-scrollbar { width: 2px; }
.pill-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
.pill-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.48); }

.pill-nav ul {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 2px var(--cms-sidebar-gutter) 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pill-item { position: relative; }

.pill-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, margin 0.2s ease;
}
.pill-icon {
    width: 24px; height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.02rem;
    color: inherit;
    transition: color 0.2s ease;
}
.pill-label {
    font-size: 0.70rem;
    font-weight: 500;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.18s ease;
}
.xerus-pill.expanded .pill-label { opacity: 1; width: auto; }

.pill-link:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }

.xerus-pill.expanded .pill-link:hover:not(.active) {
    border-radius: 999px 0 0 999px;
    margin-right: calc(var(--cms-sidebar-gutter) * -1);
}
.xerus-pill:not(.expanded):not(.mobile-open) .pill-nav ul { padding-left: 0; padding-right: var(--cms-sidebar-gutter); }
.xerus-pill:not(.expanded):not(.mobile-open) .pill-link { justify-content: center; gap: 0; padding: 6px 0; }

/* Item activo: relleno amarillo de acento (no azul claro como en el RIS) */
.pill-link.active {
    background: var(--cms-accent);
    color: var(--cms-primary-dark);
    border-radius: 999px 0 0 999px;
    margin-right: calc(var(--cms-sidebar-gutter) * -1);
}
.pill-link.active .pill-icon { color: var(--cms-primary-dark); }
.pill-link.active::before,
.pill-link.active::after {
    content: "";
    position: absolute;
    right: calc(var(--cms-sidebar-gutter) * -1);
    width: var(--cms-sidebar-curve);
    height: var(--cms-sidebar-curve);
    background: transparent;
}
.pill-link.active::before {
    top: calc(var(--cms-sidebar-curve) * -1);
    border-bottom-right-radius: var(--cms-sidebar-curve);
    box-shadow: calc(var(--cms-sidebar-curve) / 2) calc(var(--cms-sidebar-curve) / 2) 0 calc(var(--cms-sidebar-curve) / 2) var(--cms-accent);
}
.pill-link.active::after {
    bottom: calc(var(--cms-sidebar-curve) * -1);
    border-top-right-radius: var(--cms-sidebar-curve);
    box-shadow: calc(var(--cms-sidebar-curve) / 2) calc(var(--cms-sidebar-curve) / -2) 0 calc(var(--cms-sidebar-curve) / 2) var(--cms-accent);
}

/* Pie: usuario + salir */
.pill-footer { flex-shrink: 0; width: 100%; padding: 10px 10px 14px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.pill-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 999px; }
.pill-avatar {
    width: 28px; height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--cms-accent);
    color: var(--cms-primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}
.pill-user-info { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; opacity: 0; width: 0; min-width: 0; transition: opacity 0.18s ease; }
.xerus-pill.expanded .pill-user-info { opacity: 1; width: auto; }
.pill-user-name { font-size: 0.76rem; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-user-role { font-size: 0.66rem; color: rgba(255, 255, 255, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill-logout-btn {
    flex-shrink: 0;
    width: 0;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem;
    text-decoration: none;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.18s ease, width 0.18s ease, background 0.15s ease, color 0.15s ease;
}
.xerus-pill.expanded .pill-logout-btn { opacity: 1; width: 28px; }
.pill-logout-btn:hover { background: var(--cms-danger); color: #ffffff; }

/* Ajuste del contenido principal (escritorio) */
.main-content {
    margin-left: 68px;
    width: calc(100% - 68px);
    transition: margin-left 0.28s ease, width 0.28s ease;
}
.xerus-pill.expanded ~ .main-content { margin-left: 250px; width: calc(100% - 250px); }

/* Boton flotante movil + fondo oscuro */
.pill-toggle-mobile {
    display: none;
    position: fixed;
    top: 14px;
    right: 14px;
    left: auto;
    width: 42px; height: 42px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: var(--cms-primary);
    box-shadow: 0 6px 18px rgba(5, 13, 28, 0.22);
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    z-index: 1050;
}
.pill-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 13, 28, 0.4);
    z-index: 1025;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.pill-backdrop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 992px) {
    .pill-toggle-mobile { display: flex; }
    .pill-backdrop { display: block; }
    .xerus-pill {
        width: 250px;
        transform: translateX(-100%);
        box-shadow: 10px 0 34px rgba(5, 13, 28, 0.22);
    }
    .xerus-pill.mobile-open { transform: translateX(0); }
    .xerus-pill .pill-label,
    .xerus-pill .pill-user-info,
    .xerus-pill .pill-title,
    .xerus-pill .pill-logout-btn { opacity: 1; width: auto; }
    .main-content { margin-left: 0 !important; width: 100% !important; padding-top: 64px; }
    .page-header-action { margin-top: 0; }
}

/* 9) SITIO PUBLICO (CSS real de home.php, sin duplicar :root/reset/body de la seccion 1-2) */

        /* ============================================ */
        /* NAVBAR - Premium con efecto de linea inferior */
        /* ============================================ */
        .navbar-main {
            background: var(--primary-dark);
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: var(--transition);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }

        .navbar-main.scrolled {
            box-shadow: 0 4px 30px rgba(0, 0, 0, 0.18);
        }

        .navbar-brand img {
            height: 26px;
            transition: var(--transition);
            filter: brightness(0) invert(1);
        }

        .navbar-brand img:hover {
            transform: scale(1.03);
        }

        /* ===== ESTILOS DE NAV LINKS ===== */
        .nav-item {
            position: relative;
        }

        .nav-link-custom {
            color: rgba(255, 255, 255, 0.88) !important;
            font-weight: 500;
            font-size: 0.82rem;
            padding: 6px 16px !important;
            border-radius: 0;
            transition: var(--transition);
            letter-spacing: 0.2px;
            text-decoration: none !important;
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: transparent !important;
        }

        .nav-link-custom::after {
            content: '';
            position: absolute;
            bottom: 0px;
            left: 50%;
            width: 0;
            height: 1.5px;
            background: var(--accent);
            border-radius: 4px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateX(-50%);
        }

        .nav-link-custom:hover::after,
        .nav-link-custom.active::after {
            width: 70%;
        }

        .nav-link-custom:hover {
            color: #fff !important;
            text-decoration: none !important;
            background: transparent !important;
        }

        .nav-link-custom.active {
            color: var(--accent) !important;
            font-weight: 600;
            text-decoration: none !important;
            background: transparent !important;
        }

        .nav-link-custom:hover i {
            transform: translateY(-1.5px) scale(1.08);
            transition: var(--transition);
        }

        .nav-link-custom i {
            transition: var(--transition);
            font-size: 1.05rem;
        }

        .nav-link-admin {
            color: rgba(255, 255, 255, 0.85) !important;
            padding: 6px 14px !important;
            border-radius: 50px;
            font-weight: 500;
            font-size: 0.82rem;
            transition: var(--transition);
            border: 1px solid rgba(255, 255, 255, 0.25);
            text-decoration: none !important;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .nav-link-admin:hover {
            border-color: var(--accent);
            color: var(--accent) !important;
            background: rgba(255, 255, 255, 0.06);
            text-decoration: none !important;
        }

        .navbar-toggler-custom {
            border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
            padding: 8px 12px;
            border-radius: var(--radius-sm);
            transition: var(--transition);
            background: rgba(255, 255, 255, 0.1);
        }

        .navbar-toggler-custom .navbar-toggler-icon {
            filter: brightness(0) invert(1);
        }

        .navbar-toggler-custom:hover {
            border-color: var(--accent) !important;
        }

        .navbar-toggler-custom:focus {
            box-shadow: 0 0 0 4px rgba(255, 225, 79, 0.25);
            border-color: var(--accent);
        }

        @media (max-width: 992px) {
            .navbar-collapse {
                background: var(--primary-dark);
                padding: 20px 24px;
                border-radius: var(--radius-md);
                margin-top: 12px;
                box-shadow: var(--shadow-lg);
                border: 1px solid rgba(255, 255, 255, 0.1);
            }

            .nav-link-custom {
                padding: 10px 16px !important;
                border-radius: 0;
            }

            .nav-link-custom::after {
                bottom: 0;
            }

            .nav-link-admin {
                text-align: center;
                margin-top: 8px;
                display: flex;
                justify-content: center;
                border: none;
                background: rgba(255, 255, 255, 0.08);
            }

            .navbar-nav {
                gap: 2px;
            }
        }

        @media (max-width: 576px) {
            .navbar-main {
                padding: 8px 0;
            }

            .nav-link-custom {
                font-size: 0.85rem;
                padding: 8px 14px !important;
            }

            .navbar-brand img {
                height: 32px;
            }
        }

        /* ============================================ */
        /* STICKY BUTTONS */
        /* ============================================ */
        .sticky-container {
            position: fixed;
            top: 50%;
            right: 20px;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 999;
        }

        .sticky-btn {
            padding: 10px 16px;
            border-radius: 50px;
            color: #fff;
            font-weight: 600;
            text-decoration: none;
            display: flex;
            gap: 8px;
            align-items: center;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
            transition: var(--transition);
            font-size: 0.8rem;
            border: none;
            cursor: pointer;
            min-width: 120px;
            justify-content: center;
        }

        .sticky-btn:hover {
            transform: scale(1.05) translateX(-4px);
            color: #fff;
        }

        .sticky-whatsapp {
            background: #25D366;
        }

        .sticky-demo {
            background: var(--gradient-primary);
        }

        @media (max-width: 768px) {
            .sticky-container {
                display: none;
            }
        }

        /* ============================================ */
        /* BOTON VOLVER ARRIBA */
        /* ============================================ */
        .scroll-top-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--gradient-primary);
            color: #fff;
            border: none;
            box-shadow: 0 4px 20px rgba(27, 105, 200, 0.35);
            font-size: 1.4rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px);
            z-index: 998;
            cursor: pointer;
            text-decoration: none;
        }

        .scroll-top-btn.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .scroll-top-btn:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(27, 105, 200, 0.45);
            color: #fff;
        }

        @media (max-width: 768px) {
            .scroll-top-btn {
                width: 42px;
                height: 42px;
                font-size: 1.2rem;
                bottom: 20px;
                right: 20px;
            }
        }

        /* ============================================ */
        /* HERO - Oscuro, tipografia grande, con callouts */
        /* ============================================ */
        .hero-section {
            position: relative;
            overflow: hidden;
            background: linear-gradient(160deg, #050D1C 0%, var(--primary-dark) 100%);
        }

        /* Blobs animados de fondo: formas borrosas en degradado, detras del contenido */
        .hero-blob {
            position: absolute;
            border-radius: 42% 58% 65% 35% / 55% 45% 55% 45%;
            filter: blur(60px);
            z-index: 0;
            pointer-events: none;
            animation: heroBlobMorph 14s ease-in-out infinite alternate;
        }

        .hero-blob-1 {
            top: -12%;
            left: -8%;
            width: 480px;
            height: 480px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            opacity: 0.35;
        }

        .hero-blob-2 {
            bottom: -18%;
            right: 8%;
            width: 420px;
            height: 420px;
            background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
            opacity: 0.16;
            animation-delay: -7s;
        }

        @keyframes heroBlobMorph {
            0% {
                border-radius: 42% 58% 65% 35% / 55% 45% 55% 45%;
                transform: translate(0, 0) scale(1);
            }
            50% {
                border-radius: 60% 40% 35% 65% / 45% 55% 45% 55%;
                transform: translate(20px, -15px) scale(1.08);
            }
            100% {
                border-radius: 35% 65% 55% 45% / 60% 40% 60% 40%;
                transform: translate(-15px, 10px) scale(0.97);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .hero-blob {
                animation: none;
            }
        }

        .hero-flex {
            display: flex;
            align-items: stretch;
            min-height: 460px;
            position: relative;
        }

        .hero-text-col {
            flex: 1 1 54%;
            display: flex;
            align-items: center;
            position: relative;
            z-index: 2;
            padding: 36px 24px 60px clamp(24px, 6vw, 100px);
        }

        .hero-text-col > div {
            max-width: 560px;
        }

        .hero-carousel .carousel-item {
            /* Bootstrap needs the slide itself to size like the others while transitioning */
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 225, 79, 0.12);
            color: var(--accent);
            padding: 5px 16px;
            border-radius: 50px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 20px;
        }

        .hero-badge::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--accent);
            flex-shrink: 0;
        }

        .hero-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 3.4rem;
            font-weight: 800;
            line-height: 1.08;
            letter-spacing: -0.5px;
            color: #fff;
            margin-bottom: 18px;
        }

        .hero-title .highlight {
            color: var(--accent);
        }

        .hero-description {
            font-size: 1.05rem;
            line-height: 1.7;
            color: rgba(255, 255, 255, 0.6);
            max-width: 480px;
            margin-bottom: 32px;
        }

        .hero-buttons {
            display: flex;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
        }

        .btn-hero-primary {
            background: var(--accent);
            color: var(--primary-dark);
            padding: 14px 32px;
            border-radius: 50px;
            font-weight: 700;
            text-decoration: none;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 20px rgba(255, 225, 79, 0.25);
        }

        .btn-hero-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 35px rgba(255, 225, 79, 0.35);
            color: var(--primary-dark);
        }

        /* Columna visual: circulo decorativo + numero/palabra gigante de fondo
           + callouts apuntando a puntos del producto, como en la referencia */
        .hero-visual-col {
            flex: 1 1 46%;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding-right: clamp(90px, 9vw, 160px);
        }

        .hero-visual-bigtext {
            position: absolute;
            top: 50%;
            left: 3%;
            transform: translateY(-50%);
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: clamp(2.5rem, 6vw, 4rem);
            font-weight: 800;
            color: rgba(255, 255, 255, 0.08);
            letter-spacing: 4px;
            z-index: 0;
            pointer-events: none;
            white-space: nowrap;
        }

        /* Modificador para un segundo watermark (ej. "PACS") en otra posicion */
        .hero-visual-pacs {
            left: 65%;
        }

        .hero-visual-col img {
            position: relative;
            z-index: 1;
            height: 74%;
            max-height: 340px;
            width: auto;
            max-width: 70%;
            object-fit: contain;
            filter: drop-shadow(0 25px 45px rgba(0, 0, 0, 0.45));
        }

        .hero-visual-placeholder {
            position: relative;
            z-index: 1;
            text-align: center;
            color: rgba(255, 255, 255, 0.9);
        }

        .hero-visual-placeholder i {
            font-size: 5rem;
            color: rgba(255, 255, 255, 0.2);
        }

        /* Callouts: linea + etiqueta. Posiciones en % relativas a .hero-visual-col, ajustar segun banner */
        .hero-callout {
            position: absolute;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.75);
            max-width: 150px;
            line-height: 1.3;
        }

        .hero-callout::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--accent);
            flex-shrink: 0;
            box-shadow: 0 0 0 4px rgba(255, 225, 79, 0.15);
        }

        .hero-callout.callout-top {
            top: 10%;
            left: 0%;
            flex-direction: row-reverse;
            text-align: right;
        }

        .hero-callout.callout-bottom {
            bottom: 10%;
            right: 18%;
        }

        /* Control inferior: flechas + puntos, centrados debajo del hero */
        .hero-carousel-controls {
            position: absolute;
            left: 50%;
            bottom: 18px;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 14px;
            z-index: 3;
        }

        .hero-arrow-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            flex-shrink: 0;
        }

        .hero-arrow-btn:hover {
            background: var(--accent);
            color: var(--primary-dark);
            border-color: var(--accent);
        }

        .hero-carousel .carousel-indicators {
            position: static;
            margin: 0;
            gap: 8px;
        }

        .hero-carousel .carousel-indicators button {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.25);
            border: none;
            transition: var(--transition);
        }

        .hero-carousel .carousel-indicators button.active {
            background: var(--accent);
            transform: scale(1.3);
        }

        /* ============================================ */
        /* TRUSTED BY */
        /* ============================================ */
        .trusted-section {
            padding: 22px 0;
            background: #fff;
            border-top: 1px solid rgba(0,0,0,0.04);
            border-bottom: 1px solid rgba(0,0,0,0.04);
        }

        .trusted-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-light);
        }

        /* Marquee: track con logos duplicados x2, anima a -50% para loop continuo */
        .trusted-marquee {
            overflow: hidden;
            -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
        }

        .trusted-track {
            display: flex;
            width: max-content;
            animation: trusted-scroll 24s linear infinite;
        }

        .trusted-track:hover {
            animation-play-state: paused;
        }

        @keyframes trusted-scroll {
            from { transform: translateX(0); }
            to { transform: translateX(-50%); }
        }

        @media (prefers-reduced-motion: reduce) {
            .trusted-track {
                animation: none;
            }
        }

        .trusted-logos {
            display: flex;
            gap: 48px;
            align-items: center;
            flex-shrink: 0;
            padding-right: 48px;
        }

        .trusted-logos img {
            height: 48px;
            width: auto;
            transition: var(--transition);
        }

        .trusted-logos img:hover {
            transform: scale(1.06);
        }

        /* ============================================ */
        /* BLOG POSTS */
        /* ============================================ */
        .blog-section {
            padding: 70px 0;
            background: var(--light-bg);
        }

        .section-header {
            text-align: center;
            margin-bottom: 40px;
        }

        /* Overhang real = margin-top(130) - padding-top card(70) = 60px, no 130px */
        .services-section .section-header {
            margin-bottom: 80px;
        }

        .section-header .badge-label {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 225, 79, 0.14);
            color: var(--accent-dark);
            padding: 4px 16px;
            border-radius: 50px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 10px;
        }

        .section-header h2 {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--dark);
            margin-bottom: 14px;
        }

        .section-header p {
            color: var(--text-light);
            max-width: 520px;
            margin: 0 auto;
        }

        .section-header .section-intro {
            max-width: 720px;
            margin: 14px auto 0;
            font-size: 0.92rem;
            line-height: 1.7;
        }

        .post-card {
            background: #fff;
            border-radius: 28px;
            overflow: hidden;
            transition: var(--transition);
            height: 100%;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(0,0,0,0.04);
        }

        .post-card:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-lg);
        }

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

        .post-card .post-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }

        .post-card:hover .post-image img {
            transform: scale(1.04);
        }

        .post-card .post-category {
            position: absolute;
            top: 14px;
            left: 14px;
            background: var(--accent);
            color: var(--primary-dark);
            padding: 4px 14px;
            border-radius: 50px;
            font-size: 0.7rem;
            font-weight: 700;
        }

        .post-card .post-body {
            padding: 20px;
        }

        .post-card .post-meta {
            display: flex;
            align-items: center;
            gap: 14px;
            font-size: 0.75rem;
            color: var(--text-light);
            margin-bottom: 10px;
        }

        .post-card .post-meta .author {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .post-card .post-title {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .post-card .post-title a {
            color: var(--dark);
            text-decoration: none;
            transition: var(--transition);
        }

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

        .post-card .post-excerpt {
            color: var(--text-light);
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 14px;
        }

        .post-card .post-footer {
            padding: 14px 20px;
            border-top: 1px solid rgba(0,0,0,0.04);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .post-card .post-footer .read-more {
            color: var(--primary);
            font-weight: 600;
            text-decoration: none;
            font-size: 0.85rem;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .post-card .post-footer .read-more:hover {
            color: var(--primary-dark);
            gap: 10px;
        }

        .post-card .post-footer .read-time {
            font-size: 0.75rem;
            color: var(--text-light);
        }

        /* Paginacion: botones circulares en el mismo estilo que las flechas
           del carrusel del hero, no el azul generico de Bootstrap. */
        .blog-section .pagination {
            gap: 8px;
        }

        .blog-section .page-item .page-link {
            width: 40px;
            height: 40px;
            aspect-ratio: 1 / 1;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50% !important;
            border: 1px solid rgba(0,0,0,0.08);
            color: var(--text);
            font-weight: 600;
            font-size: 0.85rem;
            padding: 0;
            transition: var(--transition);
        }

        .blog-section .page-item .page-link:hover {
            background: var(--light-bg);
            color: var(--primary);
            border-color: var(--primary);
        }

        .blog-section .page-item.active .page-link {
            background: var(--gradient-primary);
            border-color: transparent;
            color: #fff;
            box-shadow: 0 4px 14px rgba(27, 105, 200, 0.3);
        }

        .blog-section .page-item.disabled .page-link {
            opacity: 0.4;
            pointer-events: none;
        }

        /* Flechas prev/next en amarillo de acento, igual que en el hero */
        .blog-section .page-item.page-arrow .page-link {
            background: var(--accent);
            border-color: var(--accent);
            color: var(--primary-dark);
        }

        .blog-section .page-item.page-arrow .page-link:hover {
            background: var(--accent-dark);
            border-color: var(--accent-dark);
            color: #fff;
        }

        /* Flecha deshabilitada: visible en azul (no amarillo), no desaparece */
        .blog-section .page-item.page-arrow.disabled .page-link {
            background: var(--gradient-primary);
            border-color: transparent;
            color: #fff;
            opacity: 1;
        }

        /* ============================================ */
        /* PLANS - Compactos */
        /* ============================================ */
        .pricing-section {
            padding: 0 0 70px 0;
            background: #fff;
        }

        /* Separacion banner-cards: sin esto el borde recto se sentia pegado */
        .pricing-section > .container {
            margin-top: 45px;
        }

        /* Banner solido sin curva - linea plana, mismo espaciado que .services-section */
        .pricing-banner {
            background: var(--gradient-primary);
            padding: 60px 0 70px;
        }

        .pricing-banner .container {
            position: relative;
            z-index: 1;
        }

        /* Reset: sin esto, margin-bottom(40) + padding banner(70) + margin cards(45) se suman */
        .pricing-banner .section-header {
            margin-bottom: 0;
        }

        .pricing-banner .section-header h2 {
            color: #fff;
        }

        .pricing-banner .section-header p {
            color: rgba(255, 255, 255, 0.75);
        }

        /* Card: media (top) + header (eyebrow/title) + body (description/price/features) + footer (pinned action) */
        .pricing-card {
            display: flex;
            flex-direction: column;
            background: #fff;
            border-radius: var(--radius-md);
            overflow: hidden;
            text-align: center;
            transition: var(--transition);
            height: 100%;
            border: 1px solid rgba(0,0,0,0.06);
            position: relative;
            box-shadow: var(--shadow-sm);
        }

        .pricing-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }

        .pricing-card.featured {
            box-shadow: var(--shadow-lg);
        }

        /* Card media: full-bleed band sharing the card's top corner radius.
           Contiene icono + nombre del plan (el "header" vive aqui, sobre el color). */
        .pricing-card .plan-media {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 14px;
            padding: 24px;
            background: var(--tier-neutral);
        }

        .pricing-card.enterprise .plan-media {
            background: var(--accent);
        }

        .pricing-card.featured .plan-media {
            background: var(--gradient-primary);
        }

        .pricing-card .plan-icon {
            width: 46px;
            height: 46px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-md);
            background: #fff;
            font-size: 1.35rem;
            color: var(--tier-neutral);
            box-shadow: var(--shadow-sm);
        }

        .pricing-card.enterprise .plan-icon,
        .pricing-card.featured .plan-icon {
            color: var(--primary-dark);
        }

        .pricing-card .plan-media .plan-name {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 1.2rem;
            font-weight: 700;
            color: #fff;
            margin: 0;
        }

        /* Card body: description, price, metadata row of features */
        .pricing-card .plan-body {
            padding: 8px 24px 24px;
            flex: 1;
        }

        .pricing-card .plan-description {
            color: var(--text);
            font-size: 0.85rem;
            line-height: 1.5;
            margin-bottom: 10px;
        }

        .pricing-card .plan-longtext {
            color: var(--text-light);
            font-size: 0.82rem;
            line-height: 1.6;
            margin-bottom: 18px;
        }

        .pricing-card .plan-price {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 2.2rem;
            font-weight: 800;
            color: var(--dark);
            margin-bottom: 4px;
        }

        .pricing-card .plan-price span {
            font-size: 0.9rem;
            font-weight: 400;
            color: var(--text-light);
        }

        .pricing-card .plan-price-custom {
            font-size: 1.15rem;
            font-weight: 700;
        }

        .plan-features {
            margin-top: 16px;
            text-align: left;
        }

        .plan-feature-text {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            color: var(--text);
            font-size: 0.85rem;
            line-height: 1.4;
            padding: 5px 0;
            text-align: left;
        }

        .plan-feature-text i {
            color: var(--secondary);
            font-size: 1rem;
            margin-top: 2px;
            flex-shrink: 0;
        }

        /* Card footer: pinned to the bottom with margin-top:auto so equal-height
           cards in the grid never grow a "chin" of dead space above the action */
        .pricing-card .plan-footer {
            margin-top: auto;
            padding: 0 24px 24px;
        }

        .pricing-card .btn-plan {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 28px;
            border-radius: 50px;
            font-weight: 700;
            text-decoration: none;
            transition: var(--transition);
            width: 100%;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
        }

        /* Cada boton lleva el color de su propia tarjeta desde el reposo,
           no solo al hover - un CTA apagado por defecto no se nota. */
        .pricing-card .btn-plan {
            background: var(--tier-neutral);
            color: #fff;
            box-shadow: 0 4px 16px rgba(64, 71, 79, 0.25);
        }

        .pricing-card .btn-plan:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(64, 71, 79, 0.35);
            color: #fff;
        }

        .pricing-card.featured .btn-plan {
            background: var(--gradient-primary);
            color: #fff;
            box-shadow: 0 4px 20px rgba(27, 105, 200, 0.3);
        }

        .pricing-card.featured .btn-plan:hover {
            box-shadow: 0 8px 30px rgba(27, 105, 200, 0.4);
        }

        .pricing-card.enterprise .btn-plan {
            background: var(--accent);
            color: var(--primary-dark);
            box-shadow: 0 4px 20px rgba(255, 225, 79, 0.3);
        }

        .pricing-card.enterprise .btn-plan:hover {
            box-shadow: 0 8px 30px rgba(255, 225, 79, 0.4);
            color: var(--primary-dark);
        }

        /* ============================================ */
        /* STATS */
        /* ============================================ */
        .stats-section {
            padding: 50px 0;
            background: var(--dark);
        }

        .stat-item {
            text-align: center;
        }

        .stat-item .stat-number {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 2.4rem;
            font-weight: 800;
            color: #fff;
            font-variant-numeric: tabular-nums;
        }

        .stat-item .stat-number .accent {
            color: var(--accent);
        }

        .stat-item .stat-label {
            color: rgba(255,255,255,0.6);
            font-size: 0.9rem;
            font-weight: 500;
        }

        /* ============================================ */
        /* SERVICES */
        /* ============================================ */
        .services-section {
            padding: 60px 0 70px;
            background: var(--gradient-primary);
        }

        /* Sobre fondo oscuro el encabezado necesita texto claro; el resto
           de secciones con .section-header siguen en su version clara. */
        .services-section .section-header h2 {
            color: #fff;
        }

        .services-section .section-header p {
            color: rgba(255, 255, 255, 0.7);
        }

        .services-section .section-header .section-intro {
            color: rgba(255, 255, 255, 0.55);
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 32px;
        }

        /* Card asimetrica con icono flotante que sale del borde superior */
        .service-card {
            display: flex;
            flex-direction: column;
            height: 100%;
            background: #fff;
            border-radius: 28px;
            padding: 70px 28px 30px;
            text-align: center;
            position: relative;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(0,0,0,0.04);
            transition: var(--transition);
        }

        .service-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }

        /* Imagen flotante (no icono): misma logica que card_xerus.html
           -> .card-image img, elevada con margin-top negativo + drop-shadow */
        .service-card .service-card-image {
            margin-top: -130px;
            margin-bottom: 20px;
            text-align: center;
        }

        /* auto + max-width/max-height: escala sin importar orientacion de la imagen */
        .service-card .service-card-image img {
            width: auto;
            height: auto;
            max-width: 270px;
            max-height: 230px;
            filter: drop-shadow(0 22px 26px rgba(18, 63, 130, 0.32));
        }

        .service-card.tone-dark .service-card-image img {
            filter: drop-shadow(0 22px 26px rgba(18, 63, 130, 0.38));
        }

        .service-card h4 {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 4px;
            font-size: 1.1rem;
        }

        .service-card .service-category {
            text-align: center;
            color: var(--text-light);
            font-size: 0.8rem;
            margin-bottom: 14px;
        }

        /* De aqui para abajo, alineado a la izquierda (mas legible con texto largo) */
        .service-card .service-tagline {
            text-align: left;
            font-weight: 700;
            color: var(--dark);
            font-size: 0.92rem;
            line-height: 1.4;
            margin-bottom: 8px;
        }

        .service-card .service-text {
            text-align: left;
            color: var(--text-light);
            font-size: 0.85rem;
            line-height: 1.6;
            margin-bottom: 16px;
        }

        /* Toggle "+" para contenido extra: colapsado por defecto para que
           esta card mida lo mismo que las otras dos; se expande al click. */
        .service-card .service-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 100%;
            background: none;
            border: none;
            padding: 0;
            margin-bottom: 16px;
            color: var(--primary);
            font-weight: 700;
            font-size: 0.85rem;
            text-align: left;
            cursor: pointer;
            transition: var(--transition);
        }

        .service-card .service-toggle:hover {
            color: var(--primary-dark);
        }

        .service-card .service-toggle i {
            font-size: 1rem;
            transition: transform 0.25s ease;
        }

        .service-card .service-toggle[aria-expanded="true"] i {
            transform: rotate(45deg);
        }

        .service-card .service-extra {
            display: none;
        }

        .service-card .service-extra.is-open {
            display: block;
        }

        .service-card .service-subblock {
            text-align: left;
            margin-bottom: 14px;
            padding-bottom: 14px;
            border-bottom: 1px dashed rgba(0,0,0,0.08);
        }

        .service-card .service-subblock strong {
            display: block;
            color: var(--dark);
            font-size: 0.9rem;
            margin-bottom: 4px;
        }

        .service-card .service-subblock p {
            color: var(--text-light);
            font-size: 0.82rem;
            line-height: 1.5;
            margin: 0;
        }

        .service-card .service-features-label {
            text-align: left;
            font-weight: 700;
            font-size: 0.78rem;
            color: var(--text);
            text-transform: uppercase;
            letter-spacing: 0.4px;
            margin-bottom: 8px;
        }

        .service-card .service-features {
            list-style: none;
            padding: 0;
            margin: 0 0 20px;
            text-align: left;
        }

        .service-card .service-features li {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            font-size: 0.82rem;
            line-height: 1.5;
            color: var(--text);
            padding: 4px 0;
        }

        .service-card .service-features li i {
            color: var(--secondary);
            font-size: 0.95rem;
            margin-top: 2px;
            flex-shrink: 0;
        }

        .service-card .btn-service {
            margin-top: auto;
            padding-top: 6px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--primary);
            font-weight: 700;
            font-size: 0.88rem;
            text-decoration: none;
            align-self: flex-start;
            transition: var(--transition);
        }

        .service-card .btn-service:hover {
            gap: 10px;
            color: var(--primary-dark);
        }

        /* ============================================ */
        /* CLIENTES */
        /* ============================================ */
        .clientes-section {
            padding: 70px 0;
            background: #fff;
        }

        .clientes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
        }

        .cliente-card {
            background: #fff;
            border: 1px solid rgba(0,0,0,0.06);
            border-radius: 28px;
            padding: 24px;
            min-height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow-sm);
            transition: var(--transition);
        }

        .cliente-card:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }

        .cliente-card img {
            max-width: 100%;
            max-height: 50px;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        /* ============================================ */
        /* CTA */
        /* ============================================ */
        .cta-section {
            padding: 70px 0;
            background: var(--gradient-primary);
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .cta-section::before {
            content: '';
            position: absolute;
            top: -40%;
            right: -15%;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
            border-radius: 50%;
        }

        .cta-section h2 {
            font-family: 'Plus Jakarta Sans', sans-serif;
            font-size: 2.4rem;
            font-weight: 800;
            color: #fff;
            margin-bottom: 14px;
            position: relative;
            z-index: 1;
        }

        .cta-section p {
            color: rgba(255,255,255,0.8);
            font-size: 1.05rem;
            max-width: 520px;
            margin: 0 auto 28px;
            position: relative;
            z-index: 1;
        }

        .btn-cta {
            background: #fff;
            color: var(--primary);
            padding: 14px 44px;
            border-radius: 50px;
            font-weight: 700;
            text-decoration: none;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
        }

        .btn-cta:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 35px rgba(0,0,0,0.18);
            color: var(--primary);
        }

        /* ============================================ */
        /* FOOTER */
        /* ============================================ */
        .footer-section {
            background: var(--dark);
            color: rgba(255,255,255,0.7);
            padding: 50px 0 30px;
        }

        .footer-section h6 {
            color: #fff;
            font-weight: 600;
            margin-bottom: 16px;
            font-size: 0.95rem;
        }

        .footer-section a {
            color: rgba(255,255,255,0.5);
            text-decoration: none;
            transition: var(--transition);
            font-size: 0.9rem;
        }

        .footer-section a:hover {
            color: #fff;
        }

        .footer-section .footer-logo img {
            height: 32px;
            filter: brightness(0) invert(1);
            margin-bottom: 14px;
        }

        .footer-section .footer-social {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }

        .footer-section .footer-social a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255,255,255,0.05);
            transition: var(--transition);
            color: rgba(255,255,255,0.5);
        }

        .footer-section .footer-social a:hover {
            background: var(--primary);
            color: #fff;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255,255,255,0.06);
            padding-top: 20px;
            margin-top: 32px;
            text-align: center;
            font-size: 0.85rem;
        }

        /* ============================================ */
        /* MODAL */
        /* ============================================ */
        .demo-modal {
            max-width: 840px;
        }

        @media (min-width: 1400px) {
            .demo-modal {
                max-width: 1280px;
            }
        }

        .modal-body iframe {
            height: 90vh;
            border: none;
        }

        .modal-content {
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
            border-radius: var(--radius-md);
            border: none;
        }

        /* ============================================ */
        /* RESPONSIVE */
        /* ============================================ */
        @media (max-width: 992px) {
            .services-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .hero-flex {
                flex-direction: column;
                min-height: auto;
            }

            .hero-text-col {
                padding: 40px 24px 24px;
            }

            .hero-text-col > div {
                max-width: none;
            }

            .hero-visual-col {
                flex: none;
                width: 100%;
                min-height: 320px;
            }

            .hero-visual-bigtext,
            .hero-callout {
                display: none;
            }

            .hero-carousel-controls {
                bottom: 14px;
            }

            .hero-title {
                font-size: 2.4rem;
            }

            .section-header h2 {
                font-size: 1.8rem;
            }

            .cta-section h2 {
                font-size: 2rem;
            }

            .pricing-card.featured {
                transform: scale(1);
            }

            .pricing-card.featured:hover {
                transform: translateY(-4px);
            }
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 1.8rem;
            }

            .hero-description {
                font-size: 0.95rem;
            }

            .hero-buttons {
                flex-direction: column;
                align-items: stretch;
            }

            .hero-buttons .btn-hero-primary {
                text-align: center;
                justify-content: center;
            }

            .hero-visual-col {
                min-height: 260px;
            }

            .hero-visual-col img {
                height: 80%;
                max-height: 220px;
            }

            .post-card .post-image {
                height: 160px;
            }

            .stat-item .stat-number {
                font-size: 1.8rem;
            }

            .cta-section h2 {
                font-size: 1.6rem;
            }

            .cta-section .btn-cta {
                padding: 12px 32px;
                font-size: 0.9rem;
            }

            .section-header h2 {
                font-size: 1.4rem;
            }

            .pricing-card .plan-media {
                padding: 20px 16px;
            }

            .pricing-card .plan-body {
                padding: 8px 16px 16px;
            }

            .pricing-card .plan-footer {
                padding: 0 16px 20px;
            }

            .pricing-card .plan-price {
                font-size: 1.8rem;
            }

            .trusted-logos {
                gap: 16px;
                padding-right: 16px;
            }

            .trusted-logos img {
                height: 36px;
            }
        }

        @media (max-width: 576px) {
            .hero-text-col {
                padding: 28px 16px 20px;
            }

            .hero-title {
                font-size: 1.5rem;
            }

            .hero-visual-col {
                min-height: 220px;
            }

            .hero-carousel-controls {
                bottom: 10px;
                gap: 10px;
            }

            .hero-arrow-btn {
                width: 30px;
                height: 30px;
            }

            .hero-carousel .carousel-indicators button {
                width: 8px;
                height: 8px;
            }

            .post-card .post-image {
                height: 140px;
            }

            .services-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .services-section .section-header {
                margin-bottom: 55px;
            }

            .service-card {
                padding: 62px 20px 24px;
            }

            .service-card .service-card-image {
                margin-top: -100px;
            }

            .service-card .service-card-image img {
                max-width: 190px;
                max-height: 165px;
            }
        }

/* 10) BLOG (vista publica, views/blog.php) - header + sidebar, no estaban en home.php */
.blog-header-section {
    padding: 24px 0 20px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.blog-header-section h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
}
.blog-header-section h1 .highlight { color: var(--accent); }
.blog-header-section p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    max-width: 520px;
    margin: 0 auto 14px;
    position: relative;
    z-index: 1;
}

.header-search { max-width: 420px; margin: 0 auto; position: relative; z-index: 1; }
.header-search .input-group {
    background: #fff;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: none;
    transition: var(--transition);
}
.header-search .input-group:focus-within { box-shadow: 0 0 0 3px rgba(255, 225, 79, 0.4); }
.header-search .form-control {
    border: none;
    padding: 8px 18px;
    font-size: 0.82rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    height: 40px;
}
.header-search .form-control:focus { box-shadow: none; }
.header-search .btn {
    background: var(--accent);
    border: none;
    padding: 8px 18px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 0 50px 50px 0;
    transition: var(--transition);
    height: 40px;
    display: flex;
    align-items: center;
}
.header-search .btn:hover { filter: brightness(0.95); }

.sidebar-widget {
    background: #fff;
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid rgba(0,0,0,0.04);
}
.sidebar-widget h5 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(27, 105, 200, 0.08);
}
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget ul li { padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    transition: var(--transition);
}
.sidebar-widget ul li a:hover { color: var(--primary); }
.sidebar-widget .badge-count {
    background: rgba(27, 105, 200, 0.08);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
}
.sidebar-recent-post { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.sidebar-recent-post:last-child { border-bottom: none; }
.sidebar-recent-post img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.sidebar-recent-post .post-info { flex: 1; }
.sidebar-recent-post .post-info a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}
.sidebar-recent-post .post-info a:hover { color: var(--primary); }
.sidebar-recent-post .post-info small { color: var(--text-light); font-size: 0.65rem; }

.tag-badge {
    background: rgba(27, 105, 200, 0.10);
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin: 3px;
    border: 1px solid rgba(27, 105, 200, 0.22);
    transition: var(--transition);
}
.tag-badge:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 105, 200, 0.30);
}
.tag-badge .tag-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
}
.tag-badge:hover .tag-count { background: #fff; color: var(--primary); }

@media (max-width: 768px) {
    .blog-header-section { padding: 20px 0 16px; }
}

/* 11) POST INDIVIDUAL (views/post.php) - colores actualizados del indigo viejo al azul actual */
.post-container { padding: 40px 0 60px; }

.post-content { font-size: 1.1rem; line-height: 1.9; color: var(--text); }
.post-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--dark);
    margin-top: 32px;
    margin-bottom: 16px;
}
.post-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    color: var(--dark);
    margin-top: 24px;
    margin-bottom: 12px;
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin-bottom: 18px; padding-left: 24px; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 20px 0; }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    color: var(--text-light);
    font-style: italic;
    margin: 20px 0;
}
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-content table th,
.post-content table td { border: 1px solid var(--cms-border); padding: 10px 14px; }
.post-content table th { background: var(--light-bg); font-weight: 600; }

.post-meta { font-size: 0.9rem; color: var(--text-light); }
.post-meta i { margin-right: 4px; }

.featured-image {
    max-height: 450px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 16px;
}
.btn-back:hover { color: var(--primary); }

.badge-category {
    background: var(--cms-info-bg);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.badge-category:hover { background: var(--gradient-primary); color: #fff; }

.badge-tag {
    background: rgba(0,0,0,0.04);
    color: var(--text);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin: 2px;
}
.badge-tag:hover { background: var(--primary); color: #fff; }

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    background: transparent;
    cursor: pointer;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--cms-info-bg); }
.share-btn-facebook:hover { border-color: #1877F2; color: #1877F2; background: rgba(24, 119, 242, 0.06); }
.share-btn-whatsapp:hover { border-color: #25D366; color: #25D366; background: rgba(37, 211, 102, 0.06); }

@media (max-width: 768px) {
    .post-container { padding: 24px 0 40px; }
    .featured-image { max-height: 260px; }
    .post-content { font-size: 1rem; }
    .post-content h2 { font-size: 1.4rem; }
}