/*
Theme Name: Panggea
Theme URI: https://panggea.com
Author: Panggea
Author URI: https://panggea.com
Description: Tema del blog de Panggea con el look & feel de panggea.com — el autopilot comercial para distribución B2B.
Version: 1.0.6
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: panggea
*/

:root {
    --brand: #6f5ce5;
    --brand-300: #a99cf2;
    --brand-600: #5b48d6;
    --brand-700: #4a39b8;
    --mint: #2ee6c8;
    --night: #0b0a1a;
    --night-soft: #16142e;
    --night-line: #2b2850;
    --ink: #0e1020;
    --body: #494f5e;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-soft: #f7f7fb;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
    background: var(--bg);
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

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

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Header (réplica del nav de panggea.com) ──────────── */

.nav-v2 {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-v2.scrolled {
    background: rgba(11, 10, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 28px; width: auto; display: block; }

.nav-center { display: flex; align-items: center; gap: 28px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.75);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.nav-link:hover { color: #ffffff; background: none; }
.nav-link .chev { opacity: 0.6; }

.nav-group { position: relative; }

.nav-dropdown {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 100%;
    width: 288px;
    padding-top: 12px;
    transition: opacity 0.15s ease;
}
.nav-group:hover .nav-dropdown { visibility: visible; opacity: 1; }

.nav-dropdown-panel {
    border-radius: 12px;
    border: 1px solid var(--night-line);
    background: var(--night-soft);
    padding: 8px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.nav-dropdown-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}
.nav-dropdown-panel a:hover { background: rgba(255, 255, 255, 0.05); color: #ffffff; }
.nav-dropdown-panel svg { flex-shrink: 0; opacity: 0.7; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--night);
    transition: transform 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.9); color: var(--night); }

.nav-burger {
    display: none;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.85);
    padding: 6px;
    cursor: pointer;
}
.nav-burger:hover { background: none; }
.nav-burger .nav-burger-close { display: none; }
.nav-burger[aria-expanded="true"] .nav-burger-open { display: none; }
.nav-burger[aria-expanded="true"] .nav-burger-close { display: block; }

.nav-mobile {
    /* Solo existe en móvil y solo cuando el burger lo abre: el atributo
       `hidden` debe ganar SIEMPRE a cualquier display de esta hoja. */
    display: none;
    background: var(--night-soft);
    border-bottom: 1px solid var(--night-line);
    padding: 12px 24px 20px;
    flex-direction: column;
    gap: 4px;
}
.nav-mobile[hidden] { display: none !important; }
.nav-mobile a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 8px;
    border-radius: 8px;
}
.nav-mobile a:hover { background: rgba(255, 255, 255, 0.05); color: #ffffff; }
.nav-mobile a.nav-cta { margin-top: 10px; align-self: flex-start; color: var(--night); }

/* ── Hero del blog ────────────────────────────────────── */

.blog-hero {
    position: relative;
    overflow: hidden;
    background: var(--night);
    color: #ffffff;
    /* 64px extra: el header es fijo y transparente sobre el hero */
    padding: 120px 0 64px;
}

/* Aurora backdrop — clon del hero de la landing: rejilla de puntos + dos
   blobs difuminados animados que asoman tras el header transparente. */
.hero-aurora { position: absolute; inset: 0; pointer-events: none; }

.night-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#ffffff12 1px, #0000 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(80% 60% at 50% 35%, #000 30%, #0000 75%);
    -webkit-mask-image: radial-gradient(80% 60% at 50% 35%, #000 30%, #0000 75%);
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    animation: aurora 14s ease-in-out infinite alternate;
}

.aurora-brand {
    top: -10rem;
    left: 8%;
    width: 32rem;
    height: 32rem;
    background: rgba(74, 57, 184, 0.4);
}

.aurora-mint {
    right: -8rem;
    top: 6rem;
    width: 26rem;
    height: 26rem;
    background: rgba(46, 230, 200, 0.15);
    animation-delay: -7s;
}

.hero-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 10rem;
    background: linear-gradient(to bottom, transparent, var(--night));
}

.blog-hero .wrap-wide { position: relative; }

@keyframes aurora {
    0%   { opacity: 0.55; transform: translate(0) scale(1); }
    50%  { opacity: 0.8;  transform: translate(4rem, -2rem) scale(1.15); }
    100% { opacity: 0.55; transform: translate(-3rem, 2rem) scale(0.95); }
}

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

.blog-hero h1 { color: #ffffff; font-size: 44px; margin: 0 0 8px; }
.blog-hero p { color: #b9bad1; font-size: 18px; margin: 0; max-width: 560px; }

/* ── Listado de posts ─────────────────────────────────── */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 48px 0 64px;
}

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(14, 16, 32, 0.10);
    transform: translateY(-2px);
}

.card .thumb { aspect-ratio: 16/9; background: var(--bg-soft); display: block; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card .card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card .meta { color: var(--muted); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

.card h2 { font-size: 21px; margin: 0; }
.card h2 a { color: var(--ink); }
.card h2 a:hover { color: var(--brand-600); }

.card .excerpt { color: var(--body); font-size: 15px; margin: 0; flex: 1; }

.card .more { color: var(--brand-600); font-weight: 600; font-size: 15px; }
.card .more:hover { color: var(--brand); }

/* ── Entrada / página ─────────────────────────────────── */

.entry-header { padding: 120px 0 8px; }
.entry-header h1 { font-size: 38px; }
.entry-header .meta { color: var(--muted); font-size: 14px; font-weight: 500; }

.entry-content { padding: 8px 0 48px; }

.entry-content h2 { font-size: 28px; margin-top: 1.6em; }
.entry-content h3 { font-size: 22px; margin-top: 1.4em; }

.entry-content blockquote {
    margin: 1.5em 0;
    padding: 4px 24px;
    border-left: 4px solid var(--brand);
    background: var(--bg-soft);
    border-radius: 0 12px 12px 0;
    color: var(--ink);
}

.entry-content pre {
    background: var(--night-soft);
    color: #e6e6f2;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
}

.entry-content code { font-size: 0.92em; }

.entry-content img { border-radius: 12px; }

.entry-content .wp-block-image figcaption { color: var(--muted); font-size: 14px; text-align: center; }

.entry-tags { padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px; }

.entry-tags a {
    background: #f0eefc;
    color: var(--brand-700);
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}
.entry-tags a:hover { background: var(--brand); color: #ffffff; }

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 56px;
    border-top: 1px solid var(--line);
    font-weight: 600;
    font-size: 15px;
}

/* ── Paginación ───────────────────────────────────────── */

.pagination { display: flex; justify-content: center; gap: 6px; padding-bottom: 64px; }

.pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--body);
    font-weight: 600;
    font-size: 15px;
}

.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand-600); }

/* ── Footer (réplica del footer de panggea.com) ───────── */

.footer-v2 {
    position: relative;
    overflow: hidden;
    background: var(--night);
    margin-top: 32px;
}

.footer-glow {
    position: absolute;
    top: -8rem;
    left: 50%;
    height: 16rem;
    width: 40rem;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(74, 57, 184, 0.25);
    filter: blur(64px);
    pointer-events: none;
}

.footer-grid {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 64px 32px;
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(5, 1fr); } }

.footer-brand img { height: 28px; width: auto; display: block; }
.footer-brand p { margin: 16px 0 0; max-width: 20rem; font-size: 14px; line-height: 1.43; color: rgba(255, 255, 255, 0.5); }

.footer-grid h4 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.4);
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* line-height 20px como el text-sm de la landing: sin esto los enlaces
   heredan el 1.7 del body y el interespaciado se abre. */
.footer-grid ul a { font-size: 14px; line-height: 1.43; color: rgba(255, 255, 255, 0.65); }
.footer-grid ul a:hover { color: #ffffff; }
.footer-grid ul li { line-height: 1.43; }

.footer-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.1); }

.footer-bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 32px;
}

.footer-bottom p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.4); }

.footer-meta { display: flex; align-items: center; gap: 20px; }
.footer-meta a { font-size: 12px; color: rgba(255, 255, 255, 0.4); }
.footer-meta a:hover { color: rgba(255, 255, 255, 0.7); }
.footer-meta img { height: 20px; width: auto; object-fit: contain; opacity: 0.7; }

/* ── Comentarios y widgets básicos ────────────────────── */

.comments-area { padding-bottom: 64px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--line); padding: 20px 0; }

input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
}

input:focus, textarea:focus { outline: 2px solid var(--brand-300); border-color: var(--brand); }

button, input[type="submit"] {
    background: var(--brand);
    color: #ffffff;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: var(--brand-600); }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    width: 1px; height: 1px; overflow: hidden;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
    .blog-hero h1 { font-size: 32px; }
    .entry-header h1 { font-size: 28px; }
    .nav-center, .nav-login { display: none; }
    .nav-burger { display: block; }
    .nav-inner { padding: 0 20px; }
    .nav-mobile:not([hidden]) { display: flex; }
}
