/* ==========================================================
   COMO HEMOS CAMBIADO
   CSS COMPLETO PARA ENTRAR / REGISTRO / MI CUENTA
   Incluye TODO el CSS principal + estilos específicos de cuenta.
   No depende de @import.
   ========================================================== */

/* ==========================================================
   COMO HEMOS CAMBIADO
   CSS principal optimizado para escritorio, tablet y móvil
   ========================================================== */

:root {
    --bg: #fffaf7;
    --card: #ffffff;
    --text: #26222a;
    --muted: #726b78;
    --brand: #e35d8b;
    --brand-hover: #c94472;
    --brand-dark: #8b1e2d;
    --brand2: #8b5cf6;
    --soft: #fde7ef;
    --soft-2: #fff7fb;
    --line: #f0dce5;
    --dark: #2a1722;
    --shadow: 0 10px 30px rgba(40, 24, 35, .08);
    --shadow-hover: 0 16px 38px rgba(40, 24, 35, .12);
    --radius: 24px;
    --radius-sm: 14px;
    --content: 1180px;
}


/* ==========================================================
   BASE
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img,
video,
iframe,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
textarea,
select {
    font: inherit;
}

.wrap {
    width: min(var(--content), calc(100% - 36px));
    margin-inline: auto;
    min-width: 0;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(227, 93, 139, .28);
    outline-offset: 3px;
}


/* ==========================================================
   CABECERA
   ========================================================== */

.topbar {
    background: var(--dark);
    color: #fff;
    font-size: 13px;
    padding: 7px 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.topbar-note {
    opacity: .82;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-grid {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 230px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: #fff;
    font-weight: 800;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.desktop-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.desktop-nav a {
    color: #3b3340;
    font-size: 14px;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 8px 13px;
    background: var(--brand);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 8px 18px 18px;
    background: #fff;
    border-top: 1px solid var(--line);
}

.mobile-nav.open,
.mi-mobile-menu.open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
}


/* ==========================================================
   MENÚ SEO PRO
   ========================================================== */

.mi-header-pro {
    z-index: 60;
}

.mi-desktop-menu {
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.mi-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.mi-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 999px;
    color: #3b3340;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.mi-nav-item.has-dropdown > .mi-nav-link::after {
    content: "⌄";
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}

.mi-nav-link:hover,
.mi-nav-item:hover > .mi-nav-link,
.mi-nav-item:focus-within > .mi-nav-link {
    background: var(--soft);
    color: var(--dark);
    text-decoration: none;
}

.mi-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    width: min(640px, 92vw);
    padding-top: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition:
        opacity .16s ease,
        transform .16s ease,
        visibility .16s ease;
}

.mi-nav-item:hover .mi-dropdown,
.mi-nav-item:focus-within .mi-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.mi-dropdown-card {
    position: relative;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 55px rgba(42, 23, 34, .16);
}

.mi-dropdown-card::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    transform: translateX(-50%) rotate(45deg);
}

.mi-dropdown-main {
    display: block;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--soft-2), #f2ecff);
    color: var(--dark);
}

.mi-dropdown-main:hover {
    background: var(--soft);
    text-decoration: none;
}

.mi-dropdown-main strong,
.mi-dropdown-link strong {
    display: block;
}

.mi-dropdown-main small,
.mi-dropdown-link small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.mi-dropdown-list,
.mi-dropdown-list-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 8px;
}

.mi-dropdown-group,
.mi-dropdown-group-compact {
    min-width: 0;
    padding: 0;
    border: 1px solid rgba(240, 220, 229, .75);
    border-radius: 16px;
    background: #fff;
}

.mi-dropdown-group:hover,
.mi-dropdown-group-compact:hover {
    border-color: var(--line);
    background: var(--soft-2);
}

.mi-dropdown-link,
.mi-dropdown-group-compact .mi-dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: 16px;
    color: #332936;
}

.mi-dropdown-link:hover,
.mi-dropdown-group-compact .mi-dropdown-link:hover {
    background: transparent;
    text-decoration: none;
}

.mi-dropdown-group-compact .mi-dropdown-link strong {
    font-size: 14px;
    line-height: 1.2;
}

.mi-dropdown-group-compact small {
    display: none !important;
}

.mi-dropdown-sublinks,
.mi-dropdown-sublinks-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: -4px;
    padding: 0 12px 10px;
    line-height: 1.25;
}

.mi-dropdown-sublinks a,
.mi-dropdown-sublinks-compact a {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6f6070;
    font-size: 12px;
    font-weight: 700;
}

.mi-dropdown-sublinks a:not(:last-child)::after,
.mi-dropdown-sublinks-compact a:not(:last-child)::after {
    content: "·";
    padding: 0 6px;
    color: #b28aa0;
}

.mi-dropdown-sublinks a:hover,
.mi-dropdown-sublinks-compact a:hover {
    background: transparent;
    color: var(--brand);
    text-decoration: none;
}

.mi-mobile-menu {
    box-shadow: 0 18px 35px rgba(42, 23, 34, .10);
}

.mi-mobile-home {
    font-weight: 900 !important;
}

.mi-mobile-group {
    border-bottom: 1px solid var(--line);
}

.mi-mobile-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mi-mobile-row > a {
    flex: 1;
    min-width: 0;
    border-bottom: 0 !important;
}

.mi-mobile-subtoggle {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--brand);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.mi-mobile-subtoggle[aria-expanded="true"] {
    background: var(--soft);
    transform: rotate(45deg);
}

.mi-mobile-submenu {
    padding: 0 10px 10px 22px;
    background: var(--bg);
}

.mi-mobile-submenu a {
    padding: 10px 12px !important;
    border-bottom: 1px dashed var(--line) !important;
    font-size: 15px;
    white-space: normal;
}

.mi-mobile-see-all {
    color: var(--brand) !important;
    font-weight: 900 !important;
}

.mi-mobile-third {
    padding-left: 24px !important;
    color: #574b59 !important;
    font-size: 14px !important;
}


/* ==========================================================
   HERO Y BUSCADOR
   ========================================================== */

.hero {
    padding: 46px 0 28px;
}

.hero-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, #ffeaf3);
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
}

.hero p {
    max-width: 850px;
    color: var(--muted);
    font-size: 18px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 24px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: 0;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-hover);
    text-decoration: none;
}


/* ==========================================================
   GRIDS Y TARJETAS
   ========================================================== */

.grid {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.section {
    padding: 26px 0;
}

.section h2 {
    margin: 0 0 16px;
    font-size: 30px;
    line-height: 1.2;
}

.card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.card-body {
    padding: 18px;
}

.post-card {
    height: 100%;
}

.post-card > a {
    display: block;
    overflow: hidden;
}

.post-card img,
.post-card .featured-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin: 0;
    border-radius: 0;
    background: #f4e8ee;
    object-fit: cover;
    transition: transform .25s ease;
}

.post-card:hover img {
    transform: scale(1.025);
}

.post-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.post-card h3 a {
    color: var(--text);
}

.post-card h3 a:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

.post-card p,
.muted {
    color: var(--muted);
}


/* ==========================================================
   PÍLDORAS, MIGAS Y TAXONOMÍAS
   ========================================================== */

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #3b3340;
    font-weight: 700;
}

.pill:hover {
    background: var(--soft-2);
    text-decoration: none;
}

.pill small {
    color: var(--muted);
    font-weight: 600;
}

.breadcrumbs {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 0;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.breadcrumbs a {
    color: var(--muted);
}

.crumb-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crumb-mini a {
    display: block;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: #3b3340;
    font-weight: 700;
}

.crumb-mini a::before {
    content: "› ";
    color: var(--brand);
    font-weight: 900;
}


/* ==========================================================
   ARTÍCULO
   ========================================================== */

.article {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.post-clean .article {
    max-width: 980px;
    margin: 0 auto;
    padding-bottom: 34px;
}

.article h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
}

.article-content {
    min-width: 0;
    font-size: 18px;
    overflow-wrap: break-word;
}

.article-content h2 {
    margin-top: 34px;
    font-size: 30px;
    line-height: 1.25;
}

.article-content h3 {
    margin-top: 28px;
    font-size: 24px;
    line-height: 1.3;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 18px;
}

.article-content .aligncenter {
    margin-right: auto;
    margin-left: auto;
}

.article-content iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 5px solid var(--brand);
    border-radius: 14px;
    background: var(--soft-2);
    color: #4a3d49;
}

.article-content a {
    font-weight: 700;
}

.featured-img {
    display: block;
    width: 100%;
    max-height: 540px;
    margin: 20px 0;
    border-radius: 24px;
    object-fit: cover;
}

.post-summary {
    padding: 14px 16px;
    border-left: 5px solid var(--brand);
    border-radius: 14px;
    background: var(--soft-2);
    font-size: 19px;
}

.post-tax-block {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.post-tax-block h2,
.related-bottom h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.post-clean .post-tax-block.compact-tax {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--bg);
}

.post-clean .post-tax-block.compact-tax h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.post-clean .related-bottom {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.tag-list .tag-link {
    background: var(--bg);
}

.tag-link {
    border-style: dashed;
}

.tag-link:hover {
    background: var(--soft);
    text-decoration: none;
}

.tag-link::after {
    content: " · buscar";
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}


/* ==========================================================
   SIDEBAR
   ========================================================== */

.sidebar {
    position: sticky;
    top: 100px;
}

.side-box {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.side-box h3 {
    margin-top: 0;
}

.side-box .pill {
    padding: 8px 10px;
    font-size: 13px;
}


/* ==========================================================
   PAGINACIÓN PRO
   Pensada para la función render_pagination compacta
   ========================================================== */

.pagination,
.pagination-pro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 30px auto 0;
    padding: 10px 0 4px;
}

.pagination > a,
.pagination > span,
.pagination-pro > a,
.pagination-pro > span {
    box-sizing: border-box;
}

.pagination > a:not(.pagination-arrow),
.pagination > span:not(.pagination-dots),
.pagination-pro > a:not(.pagination-arrow),
.pagination-pro > span:not(.pagination-dots) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

.pagination > a:not(.pagination-arrow):hover,
.pagination-pro > a:not(.pagination-arrow):hover {
    border-color: var(--brand);
    background: var(--soft-2);
    color: var(--brand-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.pagination .active,
.pagination-pro .active {
    border-color: var(--brand) !important;
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(227, 93, 139, .20);
}

.pagination .pagination-arrow,
.pagination-pro .pagination-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.pagination .pagination-arrow:hover,
.pagination-pro .pagination-arrow:hover {
    border-color: var(--brand);
    background: var(--soft-2);
    color: var(--brand-dark);
    text-decoration: none;
}

.pagination .pagination-dots,
.pagination-pro .pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    font-weight: 800;
}


/* ==========================================================
   FAQ
   ========================================================== */

.faq details {
    margin: 10px 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.faq summary {
    font-weight: 800;
    cursor: pointer;
}


/* ==========================================================
   ARTÍCULOS RELACIONADOS PRO
   Imagen uniforme + título
   ========================================================== */

.related-pro {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e8e8e8;
}

.related-pro > h2 {
    margin: 0 0 24px;
    color: #202124;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
}

.related-pro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.related-pro-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .055);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.related-pro-card:hover {
    border-color: #ddd;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .09);
    transform: translateY(-3px);
}

.related-pro-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f1f1;
}

.related-pro-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.related-pro-card:hover .related-pro-image img {
    transform: scale(1.035);
}

.related-pro-body {
    padding: 17px 18px 19px;
}

.related-pro-body h3 {
    margin: 0;
    padding: 0;
    font-size: 1.04rem;
    font-weight: 750;
    line-height: 1.4;
}

.related-pro-body h3 a {
    color: #202124;
    text-decoration: none;
}

.related-pro-body h3 a:hover {
    color: var(--brand-dark);
    text-decoration: none;
}


/* ==========================================================
   FOOTER ANTIGUO / COMPATIBILIDAD
   ========================================================== */

.site-footer {
    margin-top: 50px;
    padding: 34px 0;
    background: var(--dark);
    color: #fff;
}

.site-footer p {
    color: #e8dce3;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.site-footer a {
    display: block;
    margin-top: 8px;
    color: #fff;
}


/* ==========================================================
   ADMIN
   ========================================================== */

.admin-bar {
    margin: 12px 0;
    padding: 10px;
    border: 1px solid #ffe69c;
    border-radius: 12px;
    background: #fff3cd;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1080px) and (min-width: 901px) {

    .brand {
        min-width: 190px;
    }

    .brand small {
        display: none;
    }

    .mi-nav-link {
        padding: 9px 8px;
        font-size: 13px;
    }

    .mi-desktop-menu {
        gap: 1px;
    }
}


@media (max-width: 900px) {

    .wrap {
        width: min(100% - 28px, var(--content));
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-toggle[aria-expanded="true"] {
        background: var(--dark);
    }

    .header-grid {
        min-height: 68px;
    }

    .brand {
        min-width: 0;
    }

    .brand small {
        display: none;
    }

    .topbar-note {
        display: none;
    }

    .mobile-nav a:hover,
    .mi-mobile-row > a:hover {
        background: var(--soft-2);
        text-decoration: none;
    }

    .main-layout {
        display: block;
    }

    .sidebar {
        position: static;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        padding: 24px 0;
    }

    .hero-card {
        padding: 24px;
        border-radius: 22px;
    }

    .search-box {
        flex-direction: column;
    }

    .article {
        padding: 20px;

        border-radius: 22px;
    }

    .article-content {
        font-size: 17px;
    }

    .post-clean .article {
        max-width: none;
    }

    .post-tax-block h2,
    .related-bottom h2 {
        font-size: 22px;
    }

    .post-summary {
        font-size: 17px;
    }



    .tag-link::after {
        content: "";
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .related-pro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 640px) {

    .wrap {
        width: calc(100% - 22px);
    }

    .topbar {
        font-size: 12px;
    }

    .header-grid {
        gap: 12px;
    }

    .brand-mark {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .brand strong {
        font-size: 16px;
        line-height: 1.2;
    }

    .mobile-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 7px 10px;
    }

    .hero-card {
        padding: 20px;
    }

    .hero h1 {
        font-size: clamp(29px, 9vw, 40px);
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 22px 0;
    }

    .section h2 {
        font-size: 25px;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .post-card h3 {
        font-size: 18px;
    }

    .article {
        padding: 17px;
        border-radius: 18px;
    }

    .article h1 {
        font-size: clamp(28px, 8vw, 36px);
    }

    .article-content {
        font-size: 16.5px;
    }

    .article-content h2 {
        margin-top: 30px;
        font-size: 25px;
    }

    .article-content h3 {
        margin-top: 24px;
        font-size: 21px;
    }

    .featured-img {
        margin: 16px 0;
        border-radius: 16px;
    }

    .breadcrumbs {
        padding: 14px 0;
        font-size: 13px;
    }

    /*
     * PAGINACIÓN:
     * flechas compactas y botones táctiles.
     * Con el PHP compacto no se sale de pantalla.
     */
    .pagination,
    .pagination-pro {
        flex-wrap: nowrap;
        gap: 4px;
        margin-top: 24px;
        padding: 8px 0 2px;
    }

    .pagination > a:not(.pagination-arrow),
    .pagination > span:not(.pagination-dots),
    .pagination-pro > a:not(.pagination-arrow),
    .pagination-pro > span:not(.pagination-dots) {
        width: 34px;
        min-width: 34px;
        height: 40px;
        border-radius: 10px;
        font-size: 13px;
    }

    .pagination .pagination-arrow,
    .pagination-pro .pagination-arrow {
        flex: 0 0 38px;
        width: 38px;
        min-width: 38px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 10px;
        font-size: 20px;
    }

    .pagination .pagination-arrow-text,
    .pagination-pro .pagination-arrow-text {
        display: none;
    }

    .pagination .pagination-dots,
    .pagination-pro .pagination-dots {
        flex: 0 0 16px;
        width: 16px;
        height: 40px;
        font-size: 15px;
    }

    /*
     * Relacionados: 2 columnas en móvil.
     * Mantiene buen tamaño de imagen sin ocupar demasiado.
     */
    .related-pro {
        margin-top: 38px;
        padding-top: 26px;
    }

    .related-pro > h2 {
        margin-bottom: 18px;
        font-size: 1.42rem;
    }

    .related-pro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .related-pro-card {
        border-radius: 12px;
    }

    .related-pro-image {
        aspect-ratio: 4 / 3;
    }

    .related-pro-body {
        padding: 11px 11px 13px;
    }

    .related-pro-body h3 {
        font-size: .92rem;
        line-height: 1.35;
    }
}


/* ==========================================================
   MÓVILES MUY PEQUEÑOS
   ========================================================== */

@media (max-width: 380px) {

    .wrap {
        width: calc(100% - 18px);
    }

    .pagination,
    .pagination-pro {
        gap: 3px;
    }

    .pagination > a:not(.pagination-arrow),
    .pagination > span:not(.pagination-dots),
    .pagination-pro > a:not(.pagination-arrow),
    .pagination-pro > span:not(.pagination-dots) {
        width: 31px;
        min-width: 31px;
        height: 38px;
        font-size: 12px;
    }

    .pagination .pagination-arrow,
    .pagination-pro .pagination-arrow {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        height: 38px;
        min-height: 38px;
    }

    .pagination .pagination-dots,
    .pagination-pro .pagination-dots {
        flex-basis: 14px;
        width: 14px;
        height: 38px;
    }

    .related-pro-grid {
        grid-template-columns: 1fr;
    }

    .related-pro-image {
        aspect-ratio: 16 / 9;
    }

    .related-pro-body {
        padding: 14px 15px 16px;
    }

    .related-pro-body h3 {
        font-size: 1rem;
    }
}


/* ==========================================================
   ACCESIBILIDAD / MOVIMIENTO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.admin-post-count {
    margin-left: 5px;
    padding: 2px 6px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;

    vertical-align: middle;
}

.admin-count-ok {
    background: #eaf7ee;
    color: #24723b;
}

.admin-count-medium {
    background: #fff4d8;
    color: #976600;
}

.admin-count-low {
    background: #feecec;
    color: #b42318;
}

/* ==========================================================
   SEO EDITORIAL EN TARJETAS Y CATEGORÍAS
   ========================================================== */

.post-card-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 10px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .045em;
    text-transform: uppercase;
    text-decoration: none;
}

.post-card-category:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.section-heading-row {
    margin-bottom: 18px;
}

.section-heading-row h2 {
    margin-bottom: 0;
}

.section-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.category-topics,
.other-sector-topics,
.category-popular,
.category-latest,
.category-seo-copy {
    min-width: 0;
}

.category-hero {
    margin-bottom: 8px;
}

.sector-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.sector-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.sector-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.sector-card-image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4e8ee;
}

.sector-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.sector-card:hover .sector-card-image img {
    transform: scale(1.035);
}

.sector-card-body {
    padding: 14px 15px 16px;
}

.sector-card-body h3 {
    margin: 0 0 9px;
    font-size: 16px;
    line-height: 1.35;
}

.sector-card-body h3 a {
    color: var(--text);
    text-decoration: none;
}

.sector-card-body h3 a:hover {
    color: var(--brand-dark);
}

/* El número de artículos solo aparece si PHP detecta sesión admin. */
.admin-post-count {
    margin-left: 5px;

    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
}

.admin-count-ok { background: #eaf7ee; color: #24723b; }
.admin-count-medium { background: #fff4d8; color: #976600; }
.admin-count-low { background: #feecec; color: #b42318; }

@media (max-width: 900px) {
    .sector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .sector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .sector-card {
        border-radius: 14px;
    }

    .sector-card-body {
        padding: 11px 12px 13px;
    }

    .sector-card-body h3 {
        font-size: 14px;
    }

    .post-card-category {
        font-size: 11px;
    }
}

/* ===== CUENTA DE LECTOR ===== */
.den-account-page{
    padding:44px 0 64px;
}
.den-account-shell{
    width:min(100% - 32px, 1080px);
    margin:0 auto;
}
.den-account-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(280px,360px);
    gap:28px;
    align-items:start;
}
.den-account-card{
    background:#fff;
    border:1px solid var(--line,#eadfd2);
    border-radius:22px;
    padding:28px;
    box-shadow:0 18px 48px rgba(42,23,34,.07);
}
.den-account-card h1,
.den-account-card h2{
    margin-top:0;
}
.den-account-eyebrow{
    display:inline-block;
    margin-bottom:8px;
    color:var(--brand-dark,#6b4a31);
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.den-account-lead{
    margin:0 0 24px;
    color:var(--muted,#6f675f);
    line-height:1.7;
}
.den-account-field{
    margin-bottom:17px;
}
.den-account-field label{
    display:block;
    margin-bottom:7px;
    font-weight:800;
}
.den-account-field input[type="text"],
.den-account-field input[type="email"],
.den-account-field input[type="password"]{
    width:100%;
    min-height:48px;
    padding:11px 13px;
    border:1px solid var(--line,#ddd);
    border-radius:12px;
    background:#fff;
    color:var(--text,#24211d);
    font:inherit;
}
.den-account-field input:focus{
    outline:2px solid rgba(146,113,88,.16);
    border-color:var(--brand,#927158);
}
.den-account-check{
    display:flex;
    align-items:flex-start;
    gap:9px;
    margin:15px 0;
    line-height:1.45;
}
.den-account-check input{
    margin-top:4px;
}
.den-account-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:11px 18px;
    border:0;
    border-radius:12px;
    background:var(--brand-dark,#6b4a31);
    color:#fff;
    font:inherit;
    font-weight:900;
    text-decoration:none;
    cursor:pointer;
}
.den-account-btn:hover{
    color:#fff;
    filter:brightness(.96);
}
.den-account-btn-light{
    background:#f5ede4;
    color:var(--brand-dark,#6b4a31);
}
.den-account-btn-light:hover{
    color:var(--brand-dark,#6b4a31);
}
.den-account-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:20px;
}
.den-account-alert{
    margin:0 0 18px;
    padding:12px 14px;
    border-radius:12px;
    line-height:1.5;
}
.den-account-alert-error{
    background:#fff0f0;
    border:1px solid #efcaca;
    color:#842029;
}
.den-account-alert-success{
    background:#effaf3;
    border:1px solid #bee3cb;
    color:#176b3a;
}
.den-account-alert ul{
    margin:0;
    padding-left:20px;
}
.den-account-side{
    background:var(--soft-2,#fbf7f2);
}
.den-account-side ul{
    margin:0;
    padding-left:20px;
    line-height:1.8;
}
.den-account-meta{
    margin:0;
    padding:0;
    list-style:none;
}
.den-account-meta li{
    padding:10px 0;
    border-bottom:1px solid var(--line,#eadfd2);
}
.den-account-meta li:last-child{
    border-bottom:0;
}
.den-account-meta strong{
    display:block;
    margin-bottom:2px;
}
.den-account-small{
    color:var(--muted,#6f675f);
    font-size:13px;
}
.den-account-hp{
    position:absolute !important;
    left:-9999px !important;
    width:1px !important;
    height:1px !important;
    overflow:hidden !important;
}
@media(max-width:760px){
    .den-account-page{
        padding:24px 0 44px;
    }
    .den-account-grid{
        grid-template-columns:1fr;
    }
    .den-account-card{
        padding:21px;
        border-radius:18px;
    }
}