:root {
    --bg-crema: #f6f2ea;
    --jcf-azul: #282d6b;
    --jcf-rosa: #ea5a80;
    --jcf-naranja: #f29e29;
    --jcf-celeste: #49b9e7;
    --blanco: #ffffff;
    --negro-pro: #000000;
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; }

body { background-color: var(--bg-crema); margin: 0; font-family: 'Helvetica', Arial, sans-serif; scroll-behavior: smooth; overflow-x: hidden; position: relative; }

/* Fondo desenfocado (efecto aurora) con los colores de marca, detrás de todo el contenido */
body::before {
    content: "";
    position: fixed;
    top: -120px;
    left: -120px;
    right: -120px;
    bottom: -120px;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 18%, rgba(73, 185, 231, 0.28), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(234, 90, 128, 0.24), transparent 40%),
        radial-gradient(circle at 50% 55%, rgba(242, 158, 41, 0.18), transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(40, 45, 107, 0.16), transparent 42%),
        radial-gradient(circle at 8% 88%, rgba(234, 90, 128, 0.14), transparent 40%);
    filter: blur(90px);
    pointer-events: none;
}

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

/* Header */
header { background: var(--blanco); padding: 10px 5%; border-bottom: 2px solid #eee; position: sticky; top: 0; z-index: 100; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; flex-wrap: nowrap; gap: 10px; }
.logo-nav-group { display: flex; align-items: center; gap: 15px; min-width: 0; }
.small-logo { height: 40px; flex-shrink: 0; }
.main-menu { display: flex; align-items: center; }
.main-menu a { text-decoration: none; color: var(--jcf-azul); font-weight: bold; margin-right: 15px; font-size: 12px; white-space: nowrap; }
.main-menu a:last-child { margin-right: 0; }
.social-icons { display: flex; align-items: center; flex-shrink: 0; }
.social-icons img { height: 22px; margin-left: 10px; }

/* Botón hamburguesa (oculto en desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
    flex-shrink: 0;
}
.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--jcf-azul);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Identidad */
.identity-section { padding: 40px 5%; background: var(--blanco); }
.identity-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.identity-card { text-decoration: none; background: var(--bg-crema); padding: 30px; text-align: center; border-radius: 8px; border-bottom: 4px solid var(--jcf-azul); transition: 0.3s; }
.identity-card:hover { transform: translateY(-5px); background: var(--jcf-azul); color: white !important; }
.identity-card h3 { color: var(--jcf-azul); margin: 10px 0; }
.identity-card:hover h3 { color: white; }

/* Main Layout */
.main-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 40px; padding: 40px 5%; max-width: 1200px; margin: 0 auto; }

/* Grid de Personas */
.grid-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.profile-card { background: var(--blanco); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.img-container { width: 100%; height: 200px; background: #eee; }
.img-container img { width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 15px; }
.card-info h3 { margin: 10px 0 5px; color: var(--jcf-azul); font-size: 1.1rem; }
.tag { font-size: 9px; padding: 2px 6px; color: white; font-weight: bold; border-radius: 2px; text-transform: uppercase; }
.tag.blue { background: var(--jcf-azul); }
.tag.pink { background: var(--jcf-rosa); }
.tag.orange { background: var(--jcf-naranja); }
.tag.light-blue { background: var(--jcf-celeste); }
.tag.black { background: #000; }
.tag.green { background: #27ae60; }
.tag.purple { background: #8e44ad; }

/* Sidebar */
.sidebar-container { display: flex; flex-direction: column; gap: 40px; }
.section-title { border-bottom: 2px solid var(--negro-pro); padding-bottom: 5px; margin-bottom: 15px; font-weight: 900; font-size: clamp(1.3rem, 2vw + 1rem, 1.8rem); }
.list-container { display: flex; flex-direction: column; gap: 5px; }
.mini-item { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #000; padding: 8px; transition: 0.2s; }
.mini-item:hover { background: white; border-radius: 4px; }
.mini-img, .mini-icon { width: 45px; height: 45px; background: #eee; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background-size: cover; background-position: center; }
.mini-item p { margin: 0; font-size: 0.85rem; font-weight: bold; overflow-wrap: break-word; word-break: break-word; }

/* Footer Negro Unificado */
.footer-dark-block { background-color: var(--negro-pro); color: white; padding: 60px 5%; }
.footer-content-wrapper { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer-col h3 { color: var(--jcf-rosa); font-size: 0.8rem; letter-spacing: 1px; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 20px; }
.contact-text-link { color: var(--jcf-naranja); text-decoration: none; font-weight: bold; font-size: 1.3rem; display: block; margin-bottom: 15px; overflow-wrap: break-word; word-break: break-word; }
.directorio-label { font-size: 0.8rem; color: #888; }
.directorio-link-light { color: #fff; text-decoration: none; font-weight: bold; overflow-wrap: break-word; word-break: break-word; }
.directorio-name-light { font-weight: bold; font-size: 1.1rem; }
.directorio-lista-light { list-style: none; padding: 0; margin: 0; }
.directorio-lista-light li { margin-bottom: 8px; color: #ccc; font-size: 0.9rem; }

footer { background: var(--negro-pro); color: #444; text-align: center; padding: 20px; font-size: 0.8rem; border-top: 1px solid #111; }

/* Página de Post individual */
.post-article { max-width: 850px; margin: 0 auto; padding: 60px 5% 70px; }
.post-back-link { display: inline-block; text-decoration: none; color: var(--jcf-azul); font-weight: bold; font-size: 0.85rem; margin-bottom: 25px; }
.post-back-link:hover { color: var(--jcf-rosa); }
.post-title { color: var(--jcf-azul); font-size: clamp(1.8rem, 4vw + 1rem, 3rem); font-weight: 900; line-height: 1.15; margin: 0 0 30px; }
.post-image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #e5e0d5; box-shadow: 0 8px 25px rgba(0,0,0,0.08); margin-bottom: 35px; }
.post-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.post-body { background: var(--blanco); border-radius: 10px; padding: 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); margin-bottom: 35px; }
.post-body:last-of-type { margin-bottom: 0; }
.post-body p { color: #333; font-size: 1.05rem; line-height: 1.8; margin: 0; overflow-wrap: break-word; word-break: break-word; }
.post-body p + p { margin-top: 18px; }
.post-list { margin: 18px 0 0; padding-left: 22px; }
.post-list li { color: #333; font-size: 1.05rem; line-height: 1.8; margin-bottom: 16px; overflow-wrap: break-word; word-break: break-word; }
.post-list li:last-child { margin-bottom: 0; }
.post-list li strong { color: var(--jcf-azul); }
.post-body .intro-line { color: var(--jcf-azul); font-size: 1.2rem; font-weight: 900; margin: 0; }
.post-image-frame.post-image-bottom { margin: 35px 0 0; }

.post-image-row { display: flex; gap: 25px; margin-bottom: 35px; }
.post-image-square { flex: 1; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #e5e0d5; box-shadow: 0 8px 25px rgba(0,0,0,0.08); min-width: 0; }
.post-image-square img, .post-image-square video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Sección "Próximamente" */
.coming-soon-section { max-width: 850px; margin: 0 auto; padding: 60px 5% 5px; }
.coming-soon-box { min-height: 45vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.coming-soon-title { font-size: clamp(2.2rem, 6vw + 1rem, 4.5rem); font-weight: 900; color: var(--jcf-azul); letter-spacing: 1px; margin: 0; }

/* Página de convocatoria de Comisión */
.comision-cta-section { max-width: 850px; margin: 0 auto; padding: 60px 5% 5px; }
.comision-cta-box { min-height: 45vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; }
.comision-label { color: var(--jcf-rosa); font-weight: 900; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; margin: 0; }
.comision-cta-title { font-size: clamp(1.6rem, 3.5vw + 1rem, 2.6rem); font-weight: 900; color: var(--jcf-azul); line-height: 1.4; margin: 0; }
.comision-cta-title a { color: var(--jcf-naranja); text-decoration: none; word-break: break-word; overflow-wrap: break-word; }
.comision-cta-title a:hover { text-decoration: underline; }
.comision-social-block { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.comision-social-text { font-weight: bold; color: var(--jcf-azul); font-size: 1rem; margin: 0; letter-spacing: 0.5px; }
.comision-social-row { display: flex; align-items: center; gap: 20px; }
.comision-social-row img { height: 36px; transition: transform 0.2s ease; }
.comision-social-row a:hover img { transform: translateY(-3px); }

.post-social-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 40px; }
.post-social-row img { height: 38px; transition: transform 0.2s ease; }
.post-social-row a:hover img { transform: translateY(-3px); }

/* Páginas de identidad: Somos / Misión / Visión */
.identity-page-section { max-width: 750px; margin: 0 auto; padding: 60px 5% 30px; }
.identity-statement { min-height: 42vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 22px; }
.identity-statement h1 { color: var(--jcf-azul); font-size: clamp(1.6rem, 3.5vw + 1rem, 2.4rem); font-weight: 400; margin: 0; }
.identity-statement h1 strong { font-weight: 900; letter-spacing: 1px; }
.identity-statement p { font-size: clamp(1.1rem, 2vw + 0.8rem, 1.4rem); line-height: 1.7; color: #333; margin: 0; max-width: 620px; }
.identity-statement p strong, .identity-statement li strong { color: var(--jcf-azul); font-weight: 800; }
.identity-statement ul { list-style: none; text-align: left; margin: 0 auto; max-width: 560px; padding: 0; }
.identity-statement li { position: relative; padding-left: 26px; margin-bottom: 18px; font-size: 1.1rem; line-height: 1.7; color: #333; }
.identity-statement li:last-child { margin-bottom: 0; }
.identity-statement li::before { content: "●"; position: absolute; left: 0; top: 4px; color: var(--jcf-rosa); font-size: 0.7rem; }
.identity-handle { color: var(--jcf-rosa); font-weight: 700; font-size: 1rem; margin-top: 6px; }

/* ===== Ajustes de responsividad ===== */

/* Tablet / pantallas medianas: activamos el menú hamburguesa antes,
   para que el menú completo nunca se aplaste contra el logo y los iconos */
@media (max-width: 860px) {
    .menu-toggle { display: flex; }

    .main-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(75vw, 300px);
        background: var(--blanco);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 5px;
        padding: 90px 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 15px rgba(0,0,0,0.08);
        z-index: 105;
    }
    .main-menu.open { transform: translateX(0); }
    .main-menu a {
        margin-right: 0;
        width: 100%;
        padding: 12px 0;
        font-size: 15px;
        border-bottom: 1px solid #eee;
    }
    .main-menu a:last-child { border-bottom: none; }
}

/* Tablet: layout principal a una sola columna */
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; gap: 30px; }
    .footer-content-wrapper { grid-template-columns: 1fr; text-align: center; }
    .footer-col h3 { border-bottom: none; }
}

/* Móvil */
@media (max-width: 700px) {
    header { padding: 10px 5%; }

    .small-logo { height: 34px; }
    .social-icons img { height: 20px; margin-left: 8px; }

    .identity-section { padding: 30px 5%; }
    .identity-card { padding: 22px; }

    .grid-profiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
    .img-container { height: 150px; }
    .card-info { padding: 10px; }
    .card-info h3 { font-size: 1rem; margin: 8px 0 4px; }
    .card-info p { font-size: 0.8rem; }

    .footer-dark-block { padding: 40px 6%; }
    .contact-text-link { font-size: 1.1rem; }

    .post-article { padding: 40px 5% 50px; }
    .post-body { padding: 24px; }
    .post-body p { font-size: 0.95rem; }
    .post-image-row { flex-direction: column; gap: 18px; }
    .post-image-square { aspect-ratio: 16 / 9; }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .nav-container { gap: 6px; }
    .logo-nav-group { gap: 8px; }
    .social-icons img { height: 18px; margin-left: 6px; }
    .menu-toggle { width: 30px; height: 30px; }

    .grid-profiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .main-menu { width: 85vw; padding: 80px 24px; }
    .identity-container { grid-template-columns: 1fr; }

    .comision-cta-title { line-height: 1.35; }
    .identity-statement { min-height: 35vh; }
}
