/* ---------- BRAND (morado claro) ---------- */
:root {
    --brand-50: #faf5ff;
    --brand-100: #f3e8ff;
    --brand-200: #e9d5ff;
    --brand-600: #7c3aed;
    --brand-700: #6d28d9;

    /* Alturas de header (coinciden con h-16 y top-20) */
    --header-h-mobile: 4rem;
    /* h-16 */
    --header-h-desktop: 5rem;
    /* top-20 */
}

/* Remapeo rápido de “verdes” a morado (legacy aliases, no toques tu HTML) */
.logo-violet {
    color: var(--brand-600);
}

.bg-violet-light {
    background-color: var(--brand-50);
}

.border-violet-light {
    border-color: var(--brand-200);
}

.text-violet-dark {
    color: var(--brand-700);
}

.hover-violet:hover {
    background-color: var(--brand-100);
    color: var(--brand-600);
}

.text-violet-600 {
    color: var(--brand-600) !important;
}

.text-violet-700 {
    color: var(--brand-700) !important;
}

.bg-violet-50 {
    background-color: var(--brand-50) !important;
}

.border-violet-600 {
    border-color: var(--brand-600) !important;
}

.bg-violet-500 {
    background-color: var(--brand-600) !important;
}

/* logo badge */

/* ---------- SECTION (solo tipografía/espaciados internos) ----------
     El layout (bg, padding, border, sombras, márgenes) lo controlas con Tailwind en el HTML. */
.section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 .5rem;
}

/* ---------- PAGE HEADER (icono más grande y alineado) ---------- */
.page-header {
    margin-bottom: 1rem;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    /* escala fluida sin fijar color */
    font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);
    line-height: 1.2;
    margin: 0;
}

.page-header h1 i {
    font-size: 1.25em;
    line-height: 0;
}

/* icono ≈25% mayor que el texto */
.page-header p {
    margin-top: .5rem;
}

/* ---------- CONTENEDORES Y GRID ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 250px 1fr;
    align-items: start;
}

.grid-2>* {
    min-width: 0;
}

/* evita desbordes/solapes por contenido largo */
@media (max-width:768px) {
    .container {
        padding: 10px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- TABLAS ---------- */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

table,
.content-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

th,
td {
    padding: .75rem 1rem;
    text-align: left;
}

th {
    font-weight: 600;
}

/* sin fijar color de texto */

/* ---------- CODE BLOCK ---------- */
.code-block {
    background: #1f2937;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    color: #d1d5db;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: .875rem;
    line-height: 1.5;
}

/* ---------- LISTAS ---------- */
ul,
ol {
    margin: 1rem 0;
    padding-left: 0.5rem;
}

li {
    margin: .5rem 0;
}

/* ---------- ALERTAS (unificadas) ---------- */
.alert,
.content-alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* success a morado */
.alert-success {
    background: #ede9fe;
    border: 1px solid var(--brand-600);
    color: #4c1d95;
}

/* ---------- BADGES (unificadas) ---------- */
.badge,
.content-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .75rem;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.badge-free {
    background: #d1fae5;
    color: #065f46;
}

.badge-paid {
    background: #fef3c7;
    color: #92400e;
}

.badge-premium {
    background: #e0e7ff;
    color: #3730a3;
}

/* ---------- FEATURES (unificadas) ---------- */
.feature-grid,
.content-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card h4,
.content-feature-card h4 {
    margin-bottom: .5rem;
}

/* sin color fijo */

/* ---------- SUBMENÚ Y MARCAS ---------- */
.submenu,
.mobile-submenu {
    border-left: 1px solid #e5e7eb;
}

.submenu a,
.mobile-submenu a {
    position: relative;
    padding-left: 1.25rem;
}

.menu-item-with-submenu.is-expanded .submenu a::before,
.mobile-menu-item.is-expanded .mobile-submenu a::before {
    content: "–";
    position: absolute;
    left: .5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: .55;
}

.submenu a.is-current::before,
.mobile-submenu a.is-current::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: currentColor;
    position: absolute;
    left: .5rem;
    top: 50%;
    transform: translateY(-50%);
}

.submenu a.is-current,
.mobile-submenu a.is-current {
    color: var(--brand-700);
    background: var(--brand-100);
    border-left: 2px solid var(--brand-600);
    padding-left: calc(1.25rem - 2px);
    font-weight: 600;
}

/* ---------- SEARCH POPOVER ---------- */
.search-popover {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    max-height: 24rem;
    overflow: auto;
    padding: .25rem;
}

.search-item {
    display: block;
    padding: .5rem .75rem;
    border-radius: .5rem;
}

.search-item:hover,
.search-item[aria-selected="true"] {
    background: var(--brand-50);
    color: #111827;
}

.search-item small {
    color: #6b7280;
}

.search-badge {
    font-size: .65rem;
    padding: .15rem .4rem;
    border-radius: 9999px;
    background: var(--brand-100);
    color: var(--brand-700);
    margin-right: .5rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

mark {
    background: var(--brand-100);
    color: inherit;
    padding: 0 .1em;
    border-radius: .2em;
}

/* ---------- MISC ---------- */
.submenu-item {
    transition: all .2s ease;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* utilitaria, no tipografía */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #9ca3af transparent;
    scrollbar-gutter: stable;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

#desktop-sidebar {
    top: var(--header-h-desktop);
    height: calc(100vh - var(--header-h-desktop));
}

/* ---------- LEGACY: content-section ----------
     Si aún existe en alguna página, no reimpone layout ni colores. */
.content-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 .5rem;
}