/* Blog Tizawebs — alineado con la identidad del sitio principal */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --ink: #071225;
    --ink-soft: #17233a;
    --paper: #f6f7f3;
    --white: #fff;
    --blue: #155eef;
    --blue-dark: #0c43b8;
    --green: #7cb342;
    --yellow: #ffc107;
    --line: rgba(7, 18, 37, .13);
    --muted: #637087;
    --display: "Manrope", sans-serif;
    --body: "DM Sans", sans-serif;
    --container: 1200px;
    --radius: 20px;
    --shadow: 0 20px 50px rgba(7, 18, 37, .08);

    --primary-color: var(--blue);
    --secondary-color: var(--blue-dark);
    --text-color: var(--ink);
    --light-bg: var(--paper);
    --border-color: var(--line);
    --success-color: #16a34a;
    --error-color: #dc2626;
    --font-sans: var(--body);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
    font-family: var(--body);
    color: var(--ink);
    line-height: 1.65;
    background: var(--paper);
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    line-height: 1.12;
    letter-spacing: -.03em;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

/* TOP BAR */
.blog-site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(7, 18, 37, .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.blog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.blog-logo img {
    width: min(168px, 42vw);
    height: auto;
}

.blog-topnav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
}

.blog-topnav a {
    color: rgba(255, 255, 255, .82);
    font: 600 .88rem/1 var(--display);
    transition: color .2s;
}

.blog-topnav a:hover,
.blog-topnav a.is-active {
    color: var(--white);
}

.blog-topnav__cta {
    background: var(--blue);
    border-radius: 999px;
    color: var(--white) !important;
    padding: 12px 18px;
}

.blog-topnav__cta:hover {
    background: var(--blue-dark);
}

.blog-topnav .social-links,
.blog-footer__brand .social-links {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.blog-topnav .social-links__item,
.blog-footer__brand .social-links__item {
    align-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    box-sizing: border-box;
    color: var(--white);
    display: inline-flex;
    flex-shrink: 0;
    height: 32px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    transition: background .25s, border-color .25s, color .25s, transform .25s;
    width: 32px;
}

.blog-topnav .social-links__item svg,
.blog-topnav .social-links__icon,
.blog-footer__brand .social-links__item svg,
.blog-footer__brand .social-links__icon {
    display: block;
    height: 16px;
    max-height: 16px;
    max-width: 16px;
    width: 16px;
}

.blog-footer__brand .social-links__item {
    height: 30px;
    width: 30px;
}

.blog-footer__brand .social-links__item svg,
.blog-footer__brand .social-links__icon {
    height: 14px;
    max-height: 14px;
    max-width: 14px;
    width: 14px;
}

.blog-topnav .social-links__item:hover,
.blog-footer__brand .social-links__item:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.35);
    transform: translateY(-1px);
}

.blog-topnav .social-links__item--facebook:hover,
.blog-footer__brand .social-links__item--facebook:hover {
    background: rgba(24, 119, 242, .16);
    border-color: rgba(24, 119, 242, .45);
    color: #8ec5ff;
}

.blog-topnav .social-links__item--instagram:hover,
.blog-footer__brand .social-links__item--instagram:hover {
    background: rgba(225, 48, 108, .14);
    border-color: rgba(225, 48, 108, .42);
    color: #ffb3d0;
}

.blog-topnav .social-links__item--tiktok:hover,
.blog-footer__brand .social-links__item--tiktok:hover {
    background: rgba(0, 242, 234, .1);
    border-color: rgba(0, 242, 234, .35);
    color: #9efaf6;
}

.blog-footer__brand .social-links {
    margin-top: 16px;
}

.blog-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--white);
    position: relative;
}

.blog-menu-toggle span,
.blog-menu-toggle::before,
.blog-menu-toggle::after {
    content: "";
    position: absolute;
    left: 10px;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: .25s ease;
}

.blog-menu-toggle::before { top: 14px; }
.blog-menu-toggle span { top: 21px; }
.blog-menu-toggle::after { top: 28px; }

.blog-menu-toggle[aria-expanded="true"]::before { top: 21px; transform: rotate(45deg); }
.blog-menu-toggle[aria-expanded="true"] span { opacity: 0; }
.blog-menu-toggle[aria-expanded="true"]::after { top: 21px; transform: rotate(-45deg); }

/* HERO */
.blog-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(124, 179, 66, .18), transparent 40%),
        linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 55%, #0f2f6d 100%);
    color: var(--white);
    padding: clamp(48px, 7vw, 88px) 0;
}

.blog-hero__eyebrow {
    color: var(--yellow);
    font: 700 .75rem/1 var(--display);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.blog-hero__title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    max-width: 16ch;
    margin-bottom: 12px;
}

.blog-hero__subtitle {
    color: #c5cedd;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    max-width: 56ch;
}

/* BLOG NAV */
.blog-nav {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(28px, 4vw, 48px);
}

.blog-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.blog-nav a {
    display: block;
    padding: 16px 0;
    color: var(--muted);
    font: 600 .9rem/1 var(--display);
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.blog-nav a:hover,
.blog-nav a.is-active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* LAYOUT */
.blog-main { flex: 1; margin-bottom: 60px; }

.blog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(24px, 4vw, 40px);
    align-items: start;
}

.blog-content {
    min-width: 0;
}

/* POST CARDS */
.post-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(7, 18, 37, .12);
}

.post-image img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.post-content { padding: 24px 28px; }

.post-category {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--blue);
    font: 700 .72rem/1 var(--display);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.post-card h2 {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    margin-bottom: 10px;
}

.post-card h2 a:hover { color: var(--blue); }

.post-excerpt {
    color: var(--muted);
    margin-bottom: 14px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: .88rem;
    margin-bottom: 14px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font: 700 .88rem/1 var(--display);
}

.read-more::after { content: "→"; transition: transform .2s; }
.read-more:hover::after { transform: translateX(4px); }

/* SINGLE POST */
.post-single {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 48px);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.post-single > h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.post-meta-single {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .92rem;
}

.post-meta-single a { color: var(--blue); font-weight: 600; }

.post-featured {
    margin-bottom: 28px;
    border-radius: calc(var(--radius) - 6px);
    overflow: hidden;
}

.post-featured img { width: 100%; max-height: 480px; object-fit: cover; }

.post-body {
    font-size: 1.05rem;
    color: var(--ink-soft);
}

.post-body h2 { font-size: 1.75rem; margin: 28px 0 12px; }
.post-body h3 { font-size: 1.35rem; margin: 24px 0 10px; }
.post-body h4 { font-size: 1.1rem; margin: 20px 0 10px; }
.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { margin: 0 0 16px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--blue); text-decoration: underline; }
.post-body strong, .post-body b { font-weight: 700; }
.post-body em, .post-body i { font-style: italic; }
.post-body u { text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 12px; margin: 20px 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-body th { background: var(--paper); }
.post-body code { background: var(--paper); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.post-body pre { background: var(--ink); color: #eef2f8; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 20px 0; }
.post-body blockquote {
    border-left: 4px solid var(--blue);
    padding-left: 18px;
    margin: 20px 0;
    color: var(--muted);
    font-style: italic;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.tag-badge {
    display: inline-block;
    color: var(--white);
    padding: 7px 14px;
    border-radius: 999px;
    font: 600 .78rem/1 var(--display);
}

/* SIDEBAR WIDGETS */
.blog-sidebar { display: grid; gap: 20px; align-content: start; }

.widget-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--blue);
    font: 700 .82rem/1 var(--display);
}

.widget-list {
    list-style: none;
    display: grid;
    gap: 4px;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: .92rem;
    transition: background .15s, color .15s;
}

.widget-list a:hover {
    background: var(--paper);
    color: var(--blue);
}

.widget-count {
    flex-shrink: 0;
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    font: 700 .72rem/1.4 var(--display);
    text-align: center;
}

.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tag-color, var(--blue)) 12%, white);
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--blue)) 28%, white);
    color: var(--ink-soft);
    font: 600 .78rem/1 var(--display);
    transition: transform .15s, box-shadow .15s;
}

.widget-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7, 18, 37, .08);
}

.widget-tag .widget-count {
    background: rgba(255, 255, 255, .7);
}

.widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 1rem;
    margin-bottom: 14px;
}

.search-form { display: flex; }

.search-form input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 999px 0 0 999px;
    background: var(--paper);
}

.search-form button {
    padding: 12px 16px;
    border: 0;
    border-radius: 0 999px 999px 0;
    background: var(--blue);
    color: var(--white);
    font-weight: 700;
}

.recent-posts { list-style: none; }

.recent-posts li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.recent-posts li:last-child { border-bottom: 0; }

.recent-posts a { color: var(--blue); font-weight: 600; }

/* BANNERS */
.blog-banner {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
}

.blog-banner__link {
    display: block;
    line-height: 0;
}

.blog-banner__link img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-banner--post-end {
    margin-top: 28px;
    margin-bottom: 28px;
}

/* COMMENTS */
.comments-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow);
}

.comments-section h2 { font-size: 1.5rem; margin-bottom: 18px; }

.comment-count { color: var(--muted); font-weight: 500; }

.comment {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--paper);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-date { color: var(--muted); font-size: .85rem; }

.comment-form {
    margin-top: 24px;
    padding: 22px;
    border-radius: 14px;
    background: var(--paper);
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(21, 94, 239, .12);
}

.required { color: var(--error-color); }

.btn-submit,
.btn,
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
    color: var(--white);
    font: 700 .88rem/1 var(--display);
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.btn-submit:hover,
.btn:hover,
.pagination a:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

/* PAGINATION & ALERTS */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.page-number { color: var(--muted); }

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.no-posts {
    text-align: center;
    color: var(--muted);
    padding: 48px 24px;
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* LISTING PAGES */
.page-section,
.categoria-header,
.tag-header,
.autor-header,
.search-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 36px);
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.page-section h1,
.categoria-header h1,
.tag-header h1,
.search-section h1 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin-bottom: 10px;
}

.page-section > p,
.categoria-header > p,
.tag-header > p,
.search-section > p,
.resultado-count,
.post-meta a {
    color: var(--muted);
}

.category-list,
.archive-list {
    list-style: none;
    display: grid;
    gap: 14px;
}

.category-list li,
.archive-list li {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 22px;
    transition: transform .2s, box-shadow .2s;
}

.category-list li:hover,
.archive-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.category-list a,
.archive-list a {
    font: 700 1rem/1.2 var(--display);
}

.category-list a:hover,
.archive-list a:hover { color: var(--blue); }

.posts-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 32px;
}

.posts-grid .post-card { grid-template-columns: 1fr; }

.search-results h2 { font-size: 1.35rem; margin-bottom: 8px; }

.autor-foto {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.pagination .active {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--blue-dark);
    color: var(--white);
}

/* FOOTER */
.blog-footer {
    margin-top: auto;
    background: var(--ink);
    color: var(--white);
    padding: clamp(40px, 6vw, 64px) 0 24px;
}

.blog-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 28px;
}

.blog-footer__brand p {
    margin-top: 12px;
    color: #aab4c5;
    max-width: 36ch;
}

.blog-footer__title {
    font: 700 .78rem/1 var(--display);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
}

.blog-footer__links {
    list-style: none;
    display: grid;
    gap: 8px;
    color: #c5cedd;
}

.blog-footer__links a:hover { color: var(--white); }

.blog-footer__bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #8d98aa;
    font-size: .88rem;
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .blog-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .blog-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .blog-menu-toggle { display: block; }

    .blog-topnav {
        position: fixed;
        inset: 72px 0 auto 0;
        background: var(--ink);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform .25s ease, opacity .25s ease;
    }

    .blog-topnav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .blog-topnav a { padding: 12px 0; }

    .blog-topnav .social-links {
        padding: 4px 0 8px;
    }

    .blog-nav ul { gap: 6px 16px; }

    .post-meta-single,
    .post-meta { flex-direction: column; gap: 8px; }

    .blog-footer__grid { grid-template-columns: 1fr; }
}
