/*
Theme Name: INFORJUP
Description: Tema hijo de Astra con la identidad del Instituto Iberoamericano de Formación Jurídica y Política. Azul marino y dorado institucional.
Template: astra
Version: 1.1.2
Author: INFORJUP
Text Domain: inforjup
*/

/* ============ Identidad INFORJUP ============ */
:root {
    --ijp-navy: #1B2A4A;
    --ijp-navy-dark: #12203A;
    --ijp-gold: #C9A227;
    --ijp-gold-light: #D4AF37;
    --ijp-cream: #F7F5F0;
    --ijp-text: #3A4356;

    /* Paleta global de Astra */
    --ast-global-color-0: #C9A227; /* color de tema: dorado */
    --ast-global-color-1: #A8871F; /* hover */
    --ast-global-color-2: #1B2A4A; /* titulares: azul marino */
    --ast-global-color-3: #3A4356; /* texto */
    --ast-global-color-4: #E8E4DA; /* bordes */
    --ast-global-color-5: #F7F5F0; /* fondo suave */
    --ast-global-color-6: #FFFFFF;
    --ast-global-color-7: #12203A;
    --ast-global-color-8: #0C1626;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--ijp-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--ijp-navy);
}

/* Marca tipo lapidario (estilo del logotipo) */
.ijp-wordmark {
    font-family: 'Cinzel', 'Playfair Display', serif;
    letter-spacing: 0.06em;
}

/* Barra superior */
.ijp-topbar {
    background: var(--ijp-navy-dark);
    color: #C7CEDC;
    font-size: 0.82rem;
    padding: 7px 24px;
}
.ijp-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ijp-topbar a { color: #E9D9A8; text-decoration: none; }
.ijp-topbar a:hover { color: var(--ijp-gold-light); }
.ijp-topbar-sep { margin: 0 8px; color: #5A6A8C; }
.ijp-topbar-lema {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #AEB9CE;
}
@media (max-width: 640px) { .ijp-topbar-lema { display: none; } }

/* Logo */
.custom-logo, .site-logo-img img {
    max-height: 62px !important;
    width: auto !important;
}
.ast-site-identity { display: flex; align-items: center; gap: 14px; }

/* Menú compacto para que quepa el botón en una sola fila */
.main-header-menu { justify-content: flex-end; row-gap: 6px; }
.main-header-menu .menu-item > .menu-link {
    padding: 0 10px;
    font-size: 0.93rem;
}

/* Botón de menú Inscríbete (estilo botón Miembros del ICDP) */
.ijp-menu-btn { display: flex; align-items: center; }
.ijp-menu-btn a {
    background: var(--ijp-gold) !important;
    color: var(--ijp-navy-dark) !important;
    border-radius: 4px;
    padding: 9px 18px !important;
    line-height: 1.2 !important;
    font-weight: 600;
    margin-left: 6px;
}
.ijp-menu-btn a:hover {
    background: var(--ijp-gold-light) !important;
    color: var(--ijp-navy-dark) !important;
}

/* Pre-footer azul (estilo ICDP) */
.ijp-prefooter {
    background: var(--ijp-navy);
    color: #D9DEE9;
    padding: 56px 24px 40px;
    border-top: 3px solid var(--ijp-gold);
}
.ijp-prefooter-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.ijp-prefooter h4 {
    color: var(--ijp-gold);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.ijp-prefooter ul { list-style: none; padding: 0; margin: 0; }
.ijp-prefooter li { margin-bottom: 9px; font-size: 0.93rem; }
.ijp-prefooter a { color: #D9DEE9; text-decoration: none; }
.ijp-prefooter a:hover { color: var(--ijp-gold-light); }
@media (max-width: 820px) { .ijp-prefooter-inner { grid-template-columns: 1fr; gap: 24px; } }

/* Cabecera */
.main-header-bar, .ast-primary-header-bar {
    border-bottom: 3px solid var(--ijp-gold);
}
.site-title a, .site-title a:hover {
    font-family: 'Cinzel', serif;
    color: var(--ijp-navy);
    letter-spacing: 0.05em;
}
.site-description { color: var(--ijp-text); }

/* Botones */
.wp-block-button__link, .ast-button, button, input[type=submit] {
    background-color: var(--ijp-gold);
    color: var(--ijp-navy-dark);
    font-weight: 600;
    border-radius: 4px;
}
.wp-block-button__link:hover, .ast-button:hover {
    background-color: var(--ijp-gold-light);
    color: var(--ijp-navy-dark);
}
.ijp-btn-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--ijp-gold);
    color: var(--ijp-gold);
}
.ijp-btn-outline .wp-block-button__link:hover {
    background: var(--ijp-gold);
    color: var(--ijp-navy-dark);
}

/* Hero portada — Palacio de Justicia con velo azul marino (fallback sin JS) */
.ijp-hero {
    background:
        linear-gradient(160deg, rgba(27, 42, 74, 0.88) 0%, rgba(18, 32, 58, 0.90) 60%, rgba(12, 22, 38, 0.94) 100%),
        url('/wp-content/uploads/2026/07/inforjup-palacio-justicia.jpg') center 35% / cover no-repeat;
    padding: 120px 24px;
    text-align: center;
}

/* ============ Carrusel hero (ancho completo de la ventana) ============ */
html, body { overflow-x: hidden; }
.ijp-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--ijp-navy-dark);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
}
/* La portada arranca pegada a la cabecera, sin colchones del tema */
.home .site-content, .home #content { padding-top: 0; }
.home .entry-content { margin-top: 0; }
.home .entry-content > .wp-block-html:first-child { margin-top: 0; }
.home article, .home .ast-article-single { padding-top: 0 !important; padding-bottom: 0 !important; }
.ijp-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.1s ease, visibility 1.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ijp-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.ijp-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
}
.ijp-slide.is-active .ijp-slide-bg { animation: ijpZoom 15s ease-out forwards; }
@keyframes ijpZoom { from { transform: scale(1); } to { transform: scale(1.1); } }
.ijp-slide-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(27,42,74,0.85) 0%, rgba(18,32,58,0.87) 55%, rgba(12,22,38,0.93) 100%);
}
.ijp-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 860px;
    padding: 96px 72px;
}
.ijp-slide-content .ijp-kicker {
    color: var(--ijp-gold-light);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.92rem;
    margin-bottom: 18px;
}
.ijp-slide-content h1, .ijp-slide-content h2 {
    color: #FFFFFF;
    font-size: clamp(1.9rem, 4.4vw, 3.3rem);
    line-height: 1.15;
    margin: 0 0 18px;
}
.ijp-slide-content p.ijp-slide-sub {
    color: #D9DEE9;
    font-size: 1.08rem;
    margin: 0 auto 30px;
    max-width: 700px;
}
.ijp-slide-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ijp-btn-gold, .ijp-btn-ghost {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ijp-btn-gold { background: var(--ijp-gold); color: var(--ijp-navy-dark) !important; }
.ijp-btn-gold:hover { background: var(--ijp-gold-light); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.ijp-btn-ghost { border: 2px solid var(--ijp-gold); color: var(--ijp-gold-light) !important; }
.ijp-btn-ghost:hover { background: var(--ijp-gold); color: var(--ijp-navy-dark) !important; transform: translateY(-2px); }

.ijp-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    color: #FFFFFF;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
}
.ijp-slider-arrow:hover { background: var(--ijp-gold); color: var(--ijp-navy-dark); border-color: var(--ijp-gold); }
.ijp-arrow-prev { left: 18px; }
.ijp-arrow-next { right: 18px; }
.ijp-slider-dots {
    position: absolute;
    bottom: 22px; left: 0; right: 0;
    z-index: 3;
    display: flex; gap: 10px; justify-content: center;
}
.ijp-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.ijp-dot.is-active { background: var(--ijp-gold); transform: scale(1.25); }
@media (max-width: 640px) {
    .ijp-slider { min-height: 520px; }
    .ijp-slide-content { padding: 72px 40px; }
    .ijp-slider-arrow { display: none; }
}

/* ============ Iconos de tarjetas ============ */
.ijp-card-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.12);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.ijp-card-icon svg { width: 34px; height: 34px; }

/* Hover de tarjetas */
.ijp-card { transition: transform .25s ease, box-shadow .25s ease; }
.ijp-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(18, 32, 58, 0.14); }

/* ============ Aparición al hacer scroll ============ */
.ijp-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.ijp-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ Cabecera fija ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: #FFFFFF;
    box-shadow: 0 2px 14px rgba(18, 32, 58, 0.08);
}
.ijp-hero h1 {
    color: #FFFFFF;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    max-width: 900px;
    margin: 0 auto 16px;
}
.ijp-hero .ijp-kicker {
    color: var(--ijp-gold-light);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin-bottom: 18px;
}
.ijp-hero p { color: #D9DEE9; max-width: 720px; margin: 0 auto 28px; font-size: 1.1rem; }

/* Franja dorada decorativa */
.ijp-gold-rule {
    width: 84px; height: 3px;
    background: var(--ijp-gold);
    margin: 12px auto 24px;
}

/* Tarjetas */
.ijp-card {
    background: #FFFFFF;
    border: 1px solid var(--ijp-cream);
    border-top: 4px solid var(--ijp-gold);
    border-radius: 6px;
    padding: 32px 26px;
    box-shadow: 0 8px 24px rgba(18, 32, 58, 0.07);
    height: 100%;
}
.ijp-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.ijp-card p { font-size: 0.97rem; margin-bottom: 0; }

/* Secciones */
.ijp-section { padding: 72px 24px; }
.ijp-section-soft { background: var(--ijp-cream); }
.ijp-section-navy { background: var(--ijp-navy); }
.ijp-section-navy h2, .ijp-section-navy h3 { color: #FFFFFF; }
.ijp-section-navy p { color: #D9DEE9; }
.ijp-eyebrow {
    color: var(--ijp-gold);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Lema del escudo */
.ijp-motto {
    font-family: 'Cinzel', serif;
    color: var(--ijp-gold);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Listas con check dorado */
.ijp-checks { list-style: none; padding-left: 0; }
.ijp-checks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.ijp-checks li::before {
    content: "\2713";
    position: absolute; left: 0;
    color: var(--ijp-gold);
    font-weight: 700;
}

/* Imágenes de contenido */
.wp-block-image img {
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(18, 32, 58, 0.12);
}
.ijp-img-frame img { border-top: 4px solid var(--ijp-gold); }

/* Noticias en portada */
.ijp-news .wp-block-latest-posts.is-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
    padding-left: 0;
}
.ijp-news .wp-block-latest-posts.is-grid > li {
    width: 300px;
    max-width: 100%;
    margin: 0;
    background: #FFFFFF;
    border-radius: 6px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(18, 32, 58, 0.08);
}
.ijp-news .wp-block-latest-posts__featured-image img {
    border-radius: 6px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
    max-height: 190px;
}
.ijp-news .wp-block-latest-posts > li > a {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ijp-navy);
    display: block;
    margin-top: 10px;
}
.ijp-news .wp-block-latest-posts__post-date {
    color: var(--ijp-gold);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

/* Formulario del boletín */
.tnp-form .tnp-field input[type=text],
.tnp-form .tnp-field input[type=email] {
    border: 1px solid var(--ijp-cream);
    border-radius: 4px;
    padding: 12px 14px;
}
.tnp-form .tnp-submit {
    background-color: var(--ijp-gold) !important;
    color: var(--ijp-navy-dark) !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 12px 26px;
    border: none;
}

/* Pie */
.site-footer, .ast-footer-copyright {
    background: var(--ijp-navy-dark);
    color: #C7CEDC;
}
.site-footer a { color: var(--ijp-gold-light); }
