/* ══════════════════════════════════════════════════════════
   ENS Colombia — Ghost Theme v2
   Réplica exacta del diseño Astro/Tailwind
   ══════════════════════════════════════════════════════════ */

:root {
    /* Paleta ENS — exacta del global.css de Astro */
    --ens-blue-50: #eff6ff;
    --ens-blue-100: #dbeafe;
    --ens-blue-500: #3b82f6;
    --ens-blue-800: #1e40af;
    --ens-blue-900: #1e3a8a;
    --ens-orange-50: #fff7ed;
    --ens-orange-100: #ffedd5;
    --ens-orange-500: #f97316;
    --ens-orange-600: #ea580c;
    --ens-orange-700: #c2410c;
    --ens-yellow-400: #fde047;
    /* Grises */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Tipografías */
    --font-body: 'Roboto Condensed', sans-serif;
    --font-heading: 'Barlow Condensed', sans-serif;
    --font-oswald: 'Oswald', sans-serif;
    --max-width: 1200px;
}

/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 110%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

a {
    color: var(--ens-blue-900);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--ens-orange-600);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
}

/* ══════════════════════════════════════════════════════════
   HEADER — Fondo blanco, barra superior, logo naranja
   ══════════════════════════════════════════════════════════ */
.site-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-topbar {
    height: 4px;
    background: var(--ens-orange-600);
}

/* Cambia a naranja en páginas interiores — Ghost no tiene currentPath,
   así que dejamos azul por defecto. Se puede personalizar via Code Injection. */

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 1rem;
}

.site-logo-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    color: var(--ens-orange-600);
}

.site-logo-link:hover {
    color: var(--ens-orange-600);
    opacity: 0.9;
}

.site-logo {
    height: 50px;
    width: auto;
}

.site-title-text {
    display: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ens-orange-600);
}

@media (min-width: 640px) {
    .site-title-text {
        display: block;
    }
}

/* ── Navegación escritorio ──────────────────────────────── */
.site-nav {
    margin-left: auto;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.site-nav li a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.site-nav li a:hover {
    color: var(--ens-blue-800);
    background: var(--gray-100);
}

.site-nav li.nav-current a {
    color: #fff;
    background: var(--ens-blue-800);
}

/* ── Bandera Colombia ───────────────────────────────────── */
.flag-colombia {
    width: 32px;
    height: 20px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--gray-200);
    flex-shrink: 0;
}

.header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

@media (min-width: 768px) {
    .header-mobile-actions .nav-toggle {
        display: none;
    }
}

/* ── Hamburguesa ────────────────────────────────────────── */
.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
}

.nav-toggle:hover {
    background: var(--gray-100);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s;
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
}

/* ── Menú móvil ─────────────────────────────────────────── */
.mobile-menu {
    background: #fff;
    border-top: 1px solid var(--gray-100);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu.hidden {
    display: none;
}

.mobile-nav ul {
    list-style: none;
    padding: 0.5rem;
}

.mobile-nav li a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-900);
    border-radius: 6px;
}

.mobile-nav li a:hover {
    background: var(--gray-50);
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Ocultar nav escritorio en móvil */
@media (max-width: 767px) {
    .site-nav {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════
   HERO BANNER — Degradado ENS
   ══════════════════════════════════════════════════════════ */
.hero-banner {
    background: var(--ens-blue-900);
    padding: 3rem 1.5rem;
    text-align: center;
}

.hero-content h1 {
    font-family: var(--font-oswald);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-banner {
        padding: 2rem 1rem;
    }
}

/* ══════════════════════════════════════════════════════════
   LAYOUT — Grid con sidebar
   ══════════════════════════════════════════════════════════ */
.content-wrapper {
    max-width: var(--max-width);
    margin: 2.5rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.content-wrapper--single {
    grid-template-columns: 1fr;
    max-width: 820px;
}

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════
   POST CARDS
   ══════════════════════════════════════════════════════════ */
.post-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Featured */
.post-card--featured .post-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ens-orange-600);
    letter-spacing: 0.5px;
}

.post-card-title {
    font-family: var(--font-oswald);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.3;
}

.post-card-title a {
    color: var(--gray-800);
}

.post-card-title a:hover {
    color: var(--ens-blue-900);
}

.post-card-excerpt {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-card-button {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    border: 2px solid var(--gray-800);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.post-card-button:hover {
    background: var(--ens-blue-900);
    border-color: var(--ens-blue-900);
    color: #fff;
}

/* Secondary (horizontal) */
.post-card--secondary {
    display: grid;
    grid-template-columns: 200px 1fr;
}

.post-card--secondary .post-card-image-wrap {
    overflow: hidden;
}

.post-card--secondary .post-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 180px;
}

.post-card--secondary .post-card-title {
    font-size: 1.2rem;
}

.post-card-read-more {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ens-orange-600);
}

.post-card-read-more:hover {
    color: var(--ens-orange-700);
}

@media (max-width: 640px) {
    .post-card--secondary {
        grid-template-columns: 1fr;
    }

    .post-card--secondary .post-card-image {
        max-height: 220px;
    }
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.25rem;
}

.sidebar-widget--social {
    background: var(--ens-blue-900);
    border: none;
    color: #fff;
}

.sidebar-widget--social p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-family: var(--font-oswald);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ens-blue-900);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.sidebar-widget--social .sidebar-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.sidebar-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-800);
    display: block;
    margin-bottom: 0.15rem;
}

.sidebar-item-title:hover {
    color: var(--ens-blue-900);
}

.sidebar-item-date {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ══════════════════════════════════════════════════════════
   SINGLE POST / PAGE
   ══════════════════════════════════════════════════════════ */
.post-full-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-full-content {
    padding: 0 0 2rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2 {
    font-family: var(--font-oswald);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ens-blue-900);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.post-content h3 {
    font-family: var(--font-oswald);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ens-blue-900);
    margin: 1.5rem 0 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content li::marker {
    color: var(--ens-orange-600);
}

.post-content a {
    color: var(--ens-blue-900);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content blockquote {
    border-left: 4px solid var(--ens-orange-600);
    background: var(--gray-50);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.post-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-meta-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ens-orange-600);
    background: var(--ens-orange-50);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.post-date {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ── Paginación ───────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.pagination a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--ens-blue-900);
    padding: 0.5rem 1rem;
    border: 2px solid var(--ens-blue-900);
    border-radius: 4px;
}

.pagination a:hover {
    background: var(--ens-blue-900);
    color: #fff;
}

.pagination span {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════
   FOOTER — Oscuro con borde naranja
   ══════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--gray-900);
    color: #fff;
    margin-top: auto;
    border-top: 4px solid var(--ens-orange-500);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    height: 70px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.85rem;
    color: var(--gray-400);
    line-height: 1.6;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ens-orange-500);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-700);
}

.footer-links nav ul {
    list-style: none;
}

.footer-links nav li {
    margin-bottom: 0.5rem;
}

.footer-links nav a {
    font-size: 0.9rem;
    color: var(--gray-300);
}

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

/* Contacto */
.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.contact-list li a {
    color: var(--gray-300);
    word-break: break-all;
}

.contact-list li a:hover {
    color: #fff;
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--ens-orange-500);
}

.intl-link {
    margin-top: 1rem;
}

.btn-international {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ens-blue-100);
    background: var(--ens-blue-900);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-international:hover {
    background: var(--ens-blue-800);
    color: #fff;
}

/* Social icons — footer */
.footer-contact .social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-800);
    color: var(--gray-300);
    transition: all 0.2s;
}

.social-icon--facebook:hover {
    background: #1877f2;
    color: #fff;
}

.social-icon--instagram:hover {
    background: #e4405f;
    color: #fff;
}

.social-icon--youtube:hover {
    background: #dc2626;
    color: #fff;
}

/* sidebar social icons */
.sidebar .social-icons {
    display: flex;
    gap: 0.75rem;
}

.sidebar .social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.sidebar .social-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--gray-800);
    font-size: 0.85rem;
    color: var(--gray-500);
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════
   GHOST KOENIG EDITOR — Clases requeridas
   ══════════════════════════════════════════════════════════ */
.kg-width-wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

.kg-image-card,
.kg-gallery-card,
.kg-embed-card,
.kg-bookmark-card {
    margin: 1.5rem 0;
}

.kg-image-card img {
    border-radius: 8px;
}

.kg-bookmark-card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: var(--gray-800);
}

.kg-bookmark-content {
    padding: 1rem;
    flex: 1;
}

.kg-bookmark-title {
    font-family: var(--font-oswald);
    font-weight: 700;
    font-size: 1.1rem;
}

.kg-bookmark-description {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kg-bookmark-thumbnail {
    width: 200px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kg-gallery-row {
    display: flex;
    gap: 0.5rem;
    flex: 1 0 100%;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.kg-callout-card {
    border-left: 4px solid var(--ens-orange-600);
    background: var(--gray-50);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 0.75rem;
}

.kg-toggle-card {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.kg-toggle-heading {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-family: var(--font-oswald);
    font-weight: 600;
    background: var(--gray-50);
}

.kg-toggle-content {
    padding: 0 1.25rem 1rem;
}

/* ── Ocultar elementos Ghost no deseados ─────────────── */
.gh-powered-by,
.gh-head-actions {
    display: none !important;
}

/* ── Focus accessibility ─────────────────────────────── */
*:focus-visible {
    outline: 3px solid var(--ens-orange-600);
    outline-offset: 2px;
}