/* =========================================================
   CEGIC · Estilos principales
   Colores oficiales: azul #1598d8 sobre fondo azul noche
   ========================================================= */

:root {
    --primary: #1598d8;
    --primary-dark: #0877b8;
    --primary-light: #7ed3ff;
    --yellow: #ffd91a;
    --bg: #06111d;
    --bg-deep: #02070d;
    --card: #0d1c2b;
    --card-2: #112539;
    --card-3: #15304a;
    --line: #164263;
    --line-soft: rgba(126, 211, 255, 0.12);
    --text: #f8fafc;
    --text-2: #d8efff;
    --muted: #9fc5dc;
    --muted-2: #6f95ad;
    --live: #f02849;
    --green: #16a34a;
    --green-2: #22c55e;
    --danger: #e5484d;
    --c: #1598d8;
    --c-a12: rgba(21, 152, 216, 0.12);
    --c-a15: rgba(21, 152, 216, 0.15);
    --c-a16: rgba(21, 152, 216, 0.16);
    --c-a18: rgba(21, 152, 216, 0.18);
    --c-a22: rgba(21, 152, 216, 0.22);
    --c-a25: rgba(21, 152, 216, 0.25);
    --c-a26: rgba(21, 152, 216, 0.26);
    --c-a35: rgba(21, 152, 216, 0.35);
    --c-a40: rgba(21, 152, 216, 0.4);
    --c-a45: rgba(21, 152, 216, 0.45);
    --c-a55: rgba(21, 152, 216, 0.55);
    --c-a70: rgba(21, 152, 216, 0.7);
    --c-m16: rgb(13, 49, 73);
    --c-m22: rgb(13, 56, 83);
    --c-m25: rgb(14, 60, 88);
    --c-m30: rgb(14, 66, 97);
    --c-m35: rgb(14, 72, 106);
    --c-m40: rgb(15, 78, 114);
    --c-m70: rgb(18, 115, 165);
    --c-m75: rgb(18, 121, 174);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 14px 32px rgba(0, 0, 0, .35);
    --shadow-glow: 0 10px 30px rgba(21, 152, 216, .22);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --header-h: 132px;
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg-deep);
    background-image:
        radial-gradient(1200px 600px at -10% -10%, rgba(21, 152, 216, .35), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(8, 119, 184, .18), transparent 60%),
        linear-gradient(180deg, #06111d 0%, #040c15 60%, #02070d 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}
img, video, iframe, canvas { max-width: 100%; display: block; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.hidden { display: none !important; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(21, 152, 216, .45); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #1d4a6e transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #1d4a6e; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* =========================================================
   Animaciones
   ========================================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 40, 73, .7); } 70% { box-shadow: 0 0 0 10px rgba(240, 40, 73, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 40, 73, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes heart { 0% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }

.reveal { animation: fadeUp .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms); }
.fade-in { animation: fadeIn .4s ease both; }
.swap-out { opacity: 0 !important; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Botones y controles
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 44px; padding: 10px 20px;
    border: 1px solid transparent; border-radius: 10px;
    font-weight: 800; font-size: 14px; letter-spacing: .02em; text-transform: uppercase;
    background: var(--card-3); color: #fff;
    transition: transform .18s var(--ease), box-shadow .2s ease, background .2s ease, filter .2s ease, opacity .2s;
    white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); color: #fff; filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--c); box-shadow: 0 8px 22px var(--c-a35); }
.btn-green { background: linear-gradient(180deg, #19b34f, #12913f); box-shadow: 0 8px 22px rgba(22, 163, 74, .3); }
.btn-danger { background: linear-gradient(180deg, #ef4444, #d12d2d); box-shadow: 0 8px 22px rgba(229, 72, 77, .28); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--c); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { min-height: 56px; padding: 14px 34px; font-size: 18px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-soft { background: var(--c-a16); color: var(--text); border-color: var(--c-a40); text-transform: none; font-weight: 700; }

.icon-btn {
    width: 40px; height: 40px; flex: 0 0 auto;
    display: inline-grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04); color: var(--text-2);
    transition: background .2s, border-color .2s, transform .15s, color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); border-color: var(--c); color: #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; font-size: 13px; }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 7px;
    background: var(--c-m22);
    border: 1px solid var(--c-a55);
    color: #fff; font-weight: 700; font-size: 12.5px; line-height: 1.5;
}
.pill.light { background: #eafff1; border-color: #bff0cf; color: #0d7a38; }
.pill.gray { background: rgba(255, 255, 255, .06); border-color: var(--line); color: var(--text-2); }
.badge-count { min-width: 24px; padding: 1px 7px; border-radius: 20px; background: rgba(255, 255, 255, .08); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--c); border-radius: 50%; animation: spin .8s linear infinite; }

/* =========================================================
   Encabezado
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: linear-gradient(135deg, rgba(3, 16, 28, .96) 0%, rgba(11, 62, 99, .96) 52%, rgba(3, 16, 28, .96) 100%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--primary-dark);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
.hdr-top { display: flex; align-items: center; gap: 16px; min-height: 72px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: #fff; }
.brand img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(21, 152, 216, .35)); transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-4deg) scale(1.05); }
.brand-text { min-width: 0; }
.brand-text strong {
    display: block; font-size: 22px; font-weight: 900; letter-spacing: .02em;
    background: linear-gradient(135deg, #1598d8, #7ed3ff 50%, #1598d8);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-text span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-spacer { flex: 1; }
.hdr-actions { display: flex; align-items: center; gap: 10px; }
.live-link {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px;
    background: rgba(240, 40, 73, .12); border: 1px solid rgba(240, 40, 73, .45); color: #ffd4dc; font-weight: 800; font-size: 13px;
    transition: background .2s;
}
.live-link:hover { background: rgba(240, 40, 73, .25); color: #fff; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 1.8s infinite; }
.login-link { text-transform: none; font-size: 14px; }
.menu-toggle { display: none; }

.hdr-nav { border-top: 1px solid rgba(126, 211, 255, .08); }
.nav { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 12px; border-radius: 9px;
    color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap;
    transition: background .2s, color .2s;
}
.nav-link i:first-child { color: var(--primary); font-size: 14px; transition: transform .25s var(--ease); }
.nav-link .chev { font-size: 10px; opacity: .7; transition: transform .3s var(--ease); }
.nav-item:hover > .nav-link, .nav-item.open > .nav-link, .nav-link.active { background: rgba(21, 152, 216, .16); color: #fff; }
.nav-item:hover > .nav-link i:first-child { transform: scale(1.15); }
.nav-item:hover > .nav-link .chev, .nav-item.open > .nav-link .chev { transform: rotate(180deg); }
.nav-link.active { box-shadow: inset 0 -2px 0 var(--primary); }

/* Menú desplegable con animación suave */
.dd {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 50;
    min-width: 250px; max-width: 320px; padding: 8px;
    background: rgba(10, 26, 42, .98); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(126, 211, 255, .05) inset;
    opacity: 0; visibility: hidden; transform: translateY(10px) scale(.97); transform-origin: top left;
    transition: opacity .22s var(--ease), transform .28s var(--ease-out), visibility 0s linear .28s;
}
.dd::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.dd.right { left: auto; right: 0; transform-origin: top right; }
.nav-item:hover > .dd, .nav-item.open > .dd, .nav-item:focus-within > .dd {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .22s var(--ease), transform .3s var(--ease-out), visibility 0s;
}
.dd-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.dd-head .mini-logo { width: 34px; height: 34px; }
.dd-head strong { font-size: 13.5px; display: block; }
.dd-head small { color: var(--muted); font-size: 11.5px; display: block; line-height: 1.3; }
.dd a {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
    color: var(--text-2); font-size: 13.5px; font-weight: 500;
    opacity: 0; transform: translateX(-6px);
    transition: background .18s, color .18s, opacity .25s ease, transform .3s var(--ease-out);
}
.nav-item:hover > .dd a, .nav-item.open > .dd a, .nav-item:focus-within > .dd a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 28ms); }
.dd a i { width: 18px; text-align: center; color: var(--c, var(--primary)); }
.dd a:hover { background: rgba(21, 152, 216, .16); color: #fff; }
.dd a .badge-count { margin-left: auto; }

.mini-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--c-m22); color: var(--c); border: 1px solid var(--c-a45); overflow: hidden; }
.mini-logo img { width: 100%; height: 100%; object-fit: cover; }
.mini-logo i { color: #fff; filter: drop-shadow(0 0 6px var(--c)); }

/* Menú móvil (cajón lateral) */
.drawer-backdrop { position: fixed; inset: 0; z-index: 950; background: rgba(2, 7, 13, .6); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 960; width: min(360px, 88vw);
    background: linear-gradient(180deg, #0a1d30, #06111d); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: transform .38s var(--ease-out);
    display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0, 0, 0, .5);
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; transition: opacity .3s; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.drawer-body { overflow-y: auto; padding: 10px; flex: 1; }
.acc-item { border-radius: 12px; margin-bottom: 4px; }
.acc-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-weight: 600; color: var(--text-2); transition: background .2s; }
.acc-btn:hover, .acc-item.open .acc-btn { background: rgba(21, 152, 216, .12); color: #fff; }
.acc-btn .chev { margin-left: auto; transition: transform .3s var(--ease); font-size: 12px; color: var(--muted); }
.acc-item.open .acc-btn .chev { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 26px; color: var(--muted); font-size: 14px; border-radius: 9px; }
.acc-panel a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.acc-panel a i { width: 18px; text-align: center; color: var(--c, var(--primary)); }
.drawer-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; }
.drawer-link:hover { background: rgba(21, 152, 216, .12); color: #fff; }

@media (max-width: 1100px) {
    .hdr-nav { display: none; }
    .menu-toggle { display: inline-grid; }
    .live-link span.txt { display: none; }
}
@media (max-width: 560px) {
    .brand img { width: 46px; height: 46px; }
    .brand-text strong { font-size: 19px; }
    .brand-text span { font-size: 11px; max-width: 46vw; }
    .login-link .txt { display: none; }
    .login-link { padding: 8px 12px; }
    .hdr-actions { gap: 6px; }
    .live-link { padding: 8px 10px; }
}

/* =========================================================
   Barras de sección (estilo "Descripción" de la imagen)
   ========================================================= */
.sec-bar {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 22px; border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, #1b2d44 0%, #1c3150 55%, #213a5c 100%);
    border-left: 5px solid var(--c);
}
.sec-bar::after, .sec-bar::before {
    content: ''; position: absolute; top: 50%; right: 60px; width: 170px; height: 170px; transform: translateY(-50%);
    border-radius: 50%; border: 22px solid rgba(255, 255, 255, .035); pointer-events: none;
}
.sec-bar::before { right: 150px; width: 110px; height: 110px; border-width: 16px; }
.sec-bar h2 { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.sec-bar h2 i { color: var(--c); }
.sec-bar .sec-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.sec-body { background: rgba(13, 28, 43, .85); border: 1px solid var(--line-soft); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 22px; }
.section { margin-bottom: 26px; }
.rich-text { color: var(--text-2); font-size: 16px; line-height: 1.85; }
.rich-text p { margin: 0 0 1em; }
.rich-text a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

.search-box { position: relative; }
.search-box input { width: 240px; max-width: 60vw; height: 40px; padding: 0 14px 0 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(3, 12, 22, .6); outline: none; transition: border-color .2s, width .3s var(--ease); }
.search-box input:focus { border-color: var(--c); width: 280px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }

/* =========================================================
   Tarjeta de publicación (formato de la imagen de referencia)
   ========================================================= */
.pcard-list { display: flex; flex-direction: column; gap: 18px; }
.pcard {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 36, 56, .96), rgba(14, 27, 43, .96));
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    padding: 26px 28px 22px; box-shadow: var(--shadow);
    transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--c-a45); box-shadow: var(--shadow), 0 16px 40px var(--c-a18); }
.pcard .ribbon {
    position: absolute; top: 20px; left: -38px; width: 150px; transform: rotate(-45deg);
    background: var(--green); color: #fff; text-align: center; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; padding: 4px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.pcard-title { font-size: 28px; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; padding-left: 26px; }
.pcard-title .ok { color: var(--green-2); font-size: 26px; filter: drop-shadow(0 0 6px rgba(34, 197, 94, .4)); }
.pcard-title .type-tag { font-size: 16px; font-weight: 800; padding: 3px 12px; border-radius: 7px; background: rgba(21, 152, 216, .15); border: 1px solid var(--c-a70); color: var(--primary-light); }
.pcard-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 170px; gap: 28px; align-items: start; }
.pcard-thumb {
    width: 200px; height: 200px; border-radius: 50%; overflow: hidden; position: relative; cursor: pointer;
    border: 3px solid rgba(255, 255, 255, .12); background: var(--c-m25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 6px rgba(255, 255, 255, .03);
    display: grid; place-items: center;
    transition: transform .4s var(--ease), box-shadow .3s;
}
.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard-thumb img { transform: scale(1.06); }
.pcard-thumb .ph { font-size: 64px; color: #fff; filter: drop-shadow(0 0 16px var(--c)); }
.pcard-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); color: #fff; font-size: 44px; opacity: .92; transition: background .3s; }
.pcard-thumb:hover .play { background: rgba(0, 0, 0, .1); }
.pcard-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.pcard-meta li { display: grid; grid-template-columns: 22px 150px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 15px; }
.pcard-meta li > i { color: var(--c); text-align: center; }
.pcard-meta b { font-weight: 800; color: #fff; }
.pcard-meta span { color: var(--text-2); min-width: 0; }
.pcard-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.pcard-actions .btn { min-width: 170px; }
.pcard-score {
    border-left: 1px solid var(--line-soft); padding-left: 24px; text-align: center;
}
.score-box {
    background: linear-gradient(180deg, #0a2236, #081a2b); border: 1px solid rgba(126, 211, 255, .1); border-radius: 10px;
    padding: 20px 10px 22px; box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.score-box h4 { font-size: 13px; font-weight: 900; letter-spacing: .06em; margin-bottom: 14px; }
.score-ring {
    width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--green-2);
    display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; cursor: pointer;
    box-shadow: 0 0 22px rgba(34, 197, 94, .25), inset 0 0 14px rgba(34, 197, 94, .15); transition: transform .2s;
    background: transparent;
}
.score-ring:hover { transform: scale(1.06); }
.score-ring.liked { background: rgba(34, 197, 94, .15); }
.score-ring.bump { animation: heart .5s var(--ease); }
.score-sub { margin-top: 12px; color: var(--muted); font-size: 13px; }
.score-sub i { color: var(--green-2); margin-right: 4px; }
.pcard-desc { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 15.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { display: flex; justify-content: center; margin-top: 18px; }

/* Versión compacta (inicio) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard.compact { padding: 0; display: flex; flex-direction: column; }
.pcard.compact .cthumb { position: relative; aspect-ratio: 16 / 10; background: var(--c-m22); overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.pcard.compact .cthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard.compact:hover .cthumb img { transform: scale(1.05); }
.pcard.compact .cthumb .ph { font-size: 54px; color: #fff; filter: drop-shadow(0 0 16px var(--c)); }
.pcard.compact .cthumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 40px; background: linear-gradient(0deg, rgba(0, 0, 0, .45), transparent 60%); }
.pcard.compact .ctype { position: absolute; top: 12px; left: 12px; }
.pcard.compact .cbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard.compact .cfrom { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.pcard.compact .cfrom .mini-logo { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
.pcard.compact h3 { font-size: 18px; font-weight: 800; }
.pcard.compact p { color: var(--muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard.compact .cfoot { margin-top: auto; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; padding-top: 6px; }
.pcard.compact .cfoot .btn { margin-left: auto; }

@media (max-width: 1080px) {
    .pcard-grid { grid-template-columns: 160px minmax(0, 1fr); }
    .pcard-thumb { width: 160px; height: 160px; }
    .pcard-score { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
    .score-box { display: flex; align-items: center; gap: 18px; padding: 12px 18px; text-align: left; }
    .score-box h4 { margin: 0; }
    .score-ring { width: 54px; height: 54px; font-size: 18px; margin: 0; }
    .score-sub { margin: 0 0 0 auto; }
}
@media (max-width: 640px) {
    .pcard { padding: 20px 16px 18px; }
    .pcard-title { font-size: 21px; padding-left: 22px; margin-bottom: 16px; }
    .pcard-grid { grid-template-columns: 1fr; gap: 18px; }
    .pcard-thumb { width: 150px; height: 150px; margin: 0 auto; }
    .pcard-meta li { grid-template-columns: 20px 110px minmax(0, 1fr); font-size: 14px; }
    .pcard-actions .btn { flex: 1; min-width: 0; }
    .sec-bar { padding: 14px 16px; }
    .sec-bar h2 { font-size: 19px; }
    .sec-body { padding: 16px; }
    .search-box input, .search-box input:focus { width: 100%; max-width: none; }
    .sec-bar .sec-tools { width: 100%; margin-left: 0; }
    .sec-bar .search-box { flex: 1; }
}

/* =========================================================
   Inicio
   ========================================================= */
.hero {
    position: relative; overflow: hidden; margin: 22px 0 26px; border-radius: 20px;
    min-height: 320px; display: flex; align-items: center;
    background: linear-gradient(120deg, #0a2a45 0%, #0b3e63 45%, #06111d 100%);
    border: 1px solid var(--line-soft); box-shadow: var(--shadow);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .45; transform: scale(1.03); transition: transform 8s ease; }
.hero:hover .hero-bg { transform: scale(1.08); }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 20%, rgba(126, 211, 255, .18), transparent 60%), linear-gradient(90deg, rgba(3, 12, 22, .92) 0%, rgba(3, 12, 22, .55) 55%, rgba(3, 12, 22, .2) 100%); }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 34px; padding: 40px 44px; width: 100%; }
.hero-logo { width: 170px; flex: 0 0 auto; filter: drop-shadow(0 10px 30px rgba(21, 152, 216, .45)); animation: pop .8s var(--ease-out) both; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 900; letter-spacing: -.02em; background: linear-gradient(135deg, #fff, #bfe8ff 60%, #7ed3ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .full { font-size: clamp(15px, 1.6vw, 19px); color: var(--text-2); font-weight: 600; margin: 6px 0 12px; }
.hero .slogan { color: var(--muted); font-size: 16px; max-width: 640px; margin-bottom: 22px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 720px) {
    .hero-inner { flex-direction: column; text-align: center; padding: 30px 20px; gap: 18px; }
    .hero-logo { width: 120px; }
    .hero-btns { justify-content: center; }
    .hero::after { background: linear-gradient(180deg, rgba(3, 12, 22, .7), rgba(3, 12, 22, .9)); }
}

.live-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; }
.live-player { position: relative; background: #000; aspect-ratio: 16 / 9; }
.live-player video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 6px; background: var(--live); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .08em; }
.live-badge .live-dot { background: #fff; }
.play-cover { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(0, 0, 0, .15), rgba(0, 0, 0, .6)); cursor: pointer; transition: opacity .3s; }
.play-cover .pbtn { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 40, 73, .92); font-size: 32px; color: #fff; box-shadow: 0 0 0 10px rgba(240, 40, 73, .2); transition: transform .25s var(--ease); padding-left: 6px; }
.play-cover:hover .pbtn { transform: scale(1.08); }
.play-cover span { position: absolute; bottom: 18px; color: #fff; font-weight: 700; text-shadow: 0 2px 8px #000; }
.live-msg { position: absolute; inset: auto 12px 12px 12px; background: rgba(0, 0, 0, .75); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: #ffe1e6; }
.schedule { background: rgba(8, 22, 36, .9); border-left: 1px solid var(--line-soft); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.schedule h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.schedule h3 i { color: var(--primary); }
.sch-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.sch-item:hover { border-color: var(--line); background: rgba(255, 255, 255, .05); }
.sch-item .t { font-weight: 800; color: var(--primary-light); min-width: 56px; font-variant-numeric: tabular-nums; }
.sch-item.now { background: rgba(240, 40, 73, .12); border-color: rgba(240, 40, 73, .4); }
.sch-item.now .t { color: #ff9bad; }
@media (max-width: 900px) { .live-wrap { grid-template-columns: 1fr; } .schedule { border-left: 0; border-top: 1px solid var(--line-soft); } }

/* Tarjetas de comités */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ccard {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 36, 56, .96), rgba(12, 25, 40, .96));
    border: 1px solid var(--line-soft); border-radius: 16px; color: var(--text);
    box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.ccard:hover { transform: translateY(-6px); color: var(--text); border-color: var(--c-a55); box-shadow: var(--shadow), 0 18px 40px var(--c-a25); }
.ccard-cover { height: 118px; position: relative; background: linear-gradient(135deg, var(--c-m70), #06111d); overflow: hidden; }
.ccard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.ccard:hover .ccard-cover img { transform: scale(1.08); }
.ccard-cover .pattern { position: absolute; inset: 0; opacity: .18; font-size: 90px; display: grid; place-items: center; color: #fff; }
.ccard-logo { position: absolute; left: 18px; top: 82px; width: 66px; height: 66px; border-radius: 16px; border: 3px solid #0e1f31; background: var(--c-m40); display: grid; place-items: center; font-size: 26px; color: #fff; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); transition: transform .35s var(--ease); }
.ccard:hover .ccard-logo { transform: rotate(-4deg) scale(1.06); }
.ccard-logo img { width: 100%; height: 100%; object-fit: cover; }
.ccard-body { padding: 42px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccard-body h3 { font-size: 17px; font-weight: 800; }
.ccard-body p { color: var(--muted); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ccard-foot .go { color: var(--c); font-weight: 800; transition: transform .25s var(--ease); }
.ccard:hover .ccard-foot .go { transform: translateX(4px); }

/* =========================================================
   Página de comité
   ========================================================= */
.c-hero { position: relative; margin: 22px 0 22px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-soft); box-shadow: var(--shadow); background: #0b1d2e; }
.c-cover { height: 300px; position: relative; background: linear-gradient(135deg, var(--c-m75) 0%, #0b2c47 55%, #06111d 100%); overflow: hidden; }
.c-cover img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn .8s ease both; }
.c-cover .pattern { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); font-size: 220px; color: rgba(255, 255, 255, .07); }
.c-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 17, 29, .98) 0%, rgba(6, 17, 29, .35) 55%, rgba(6, 17, 29, .1) 100%); }
.c-info { position: relative; z-index: 1; margin-top: -120px; padding: 0 30px 26px; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.c-logo { width: 150px; height: 150px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .14); background: var(--c-m35); display: grid; place-items: center; font-size: 60px; color: #fff; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 8px rgba(255, 255, 255, .03); flex: 0 0 auto; animation: pop .7s var(--ease-out) both; }
.c-logo img { width: 100%; height: 100%; object-fit: cover; }
.c-logo i { filter: drop-shadow(0 0 20px var(--c)); }
.c-text { flex: 1; min-width: 240px; padding-bottom: 6px; animation: fadeUp .6s var(--ease-out) .1s both; }
.c-text h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-text h1 .ok { color: var(--green-2); font-size: .72em; }
.c-text .slogan { color: var(--text-2); font-size: 17px; margin: 8px 0 12px; }
.c-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.c-actions { display: flex; gap: 10px; padding-bottom: 6px; }
@media (max-width: 720px) {
    .c-cover { height: 200px; }
    .c-info { margin-top: -80px; padding: 0 16px 20px; gap: 14px; justify-content: center; text-align: center; }
    .c-logo { width: 110px; height: 110px; font-size: 44px; }
    .c-text h1 { justify-content: center; }
    .c-stats, .c-actions { justify-content: center; width: 100%; }
}

.c-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; margin-bottom: 40px; }
.index-card { position: sticky; top: calc(var(--header-h) + 14px); background: rgba(21, 33, 49, .96); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.index-head { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 16px 16px 16px 20px; background: linear-gradient(90deg, #22344c, #1f3a5a); border-left: 5px solid var(--c); }
.index-head::after { content: ''; position: absolute; right: 50px; top: 50%; width: 110px; height: 110px; transform: translateY(-50%); border-radius: 50%; border: 16px solid rgba(255, 255, 255, .04); }
.index-head h3 { font-size: 20px; font-weight: 800; flex: 1; }
.index-head .icon-btn { width: 30px; height: 30px; border-radius: 7px; background: #0f2236; font-size: 13px; position: relative; z-index: 1; }
.index-list { max-height: calc(100vh - var(--header-h) - 110px); overflow-y: auto; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .35s var(--ease-out); }
.index-list > div { overflow: hidden; }
.index-card.collapsed .index-list { grid-template-rows: 0fr; }
.index-item {
    position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 12px 16px 12px 18px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: transparent; color: var(--text-2); text-align: left; font-size: 14.5px; font-weight: 500;
    transition: background .2s, color .2s, padding .25s var(--ease);
}
.index-item i { width: 20px; text-align: center; color: var(--c); transition: transform .25s var(--ease); }
.index-item:hover { background: rgba(255, 255, 255, .04); color: #fff; padding-left: 22px; }
.index-item:hover i { transform: scale(1.15); }
.index-item.active { background: linear-gradient(90deg, var(--c-a26), transparent); color: #fff; font-weight: 700; }
.index-item.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); animation: fadeIn .3s; }
.index-item .badge-count { margin-left: auto; }
.index-item.sep { pointer-events: none; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding-top: 14px; padding-bottom: 8px; font-weight: 800; }
.c-main { min-width: 0; }
.c-main-inner { transition: opacity .2s ease, transform .2s ease; }

@media (max-width: 960px) {
    .c-layout { grid-template-columns: 1fr; gap: 16px; }
    .index-card { position: relative; top: 0; }
    .index-card.collapsed-mobile .index-list { grid-template-rows: 0fr; }
    .index-list { max-height: 60vh; }
}

.empty {
    text-align: center; padding: 50px 20px; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(13, 28, 43, .5);
}
.empty i { font-size: 44px; color: var(--c); margin-bottom: 12px; display: block; opacity: .8; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 18px; }

/* Esqueleto de carga */
.skel { background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0, rgba(255, 255, 255, .09) 40%, rgba(255, 255, 255, .04) 80%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 12px; }

/* =========================================================
   Visor de publicación (ventana)
   ========================================================= */
.viewer { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 16px; }
.viewer-backdrop { position: fixed; inset: 0; background: rgba(2, 7, 13, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s ease both; }
.viewer.closing .viewer-backdrop { animation: fadeIn .25s ease reverse both; }
.viewer-panel { position: relative; width: 100%; max-width: 1000px; background: linear-gradient(180deg, #0f2236, #0a1827); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); animation: slideUp .45s var(--ease-out) both; margin-bottom: 30px; }
.viewer.closing .viewer-panel { animation: slideUp .25s ease reverse both; }
.viewer-head { position: sticky; top: -30px; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(15, 34, 54, .97); border-bottom: 1px solid var(--line-soft); border-radius: 20px 20px 0 0; backdrop-filter: blur(8px); }
.viewer-head .who { flex: 1; min-width: 0; }
.viewer-head .who strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-head .who small { color: var(--muted); font-size: 12.5px; }
.viewer-body { padding: 22px 24px 26px; }
.viewer-body h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; margin-bottom: 14px; }
.viewer-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.media-stack { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.media-box { border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line-soft); position: relative; }
.media-box.ratio { aspect-ratio: 16 / 9; }
.media-box.ratio-v { aspect-ratio: 9 / 16; max-width: 420px; margin: 0 auto; width: 100%; }
.media-box iframe, .media-box video { width: 100%; height: 100%; border: 0; background: #000; }
.media-box video { max-height: 78vh; }
.media-box audio { width: 100%; display: block; }
.media-audio { padding: 18px; background: linear-gradient(135deg, #10304c, #0b1d2e); display: flex; gap: 16px; align-items: center; }
.media-audio .ai { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--c); font-size: 24px; flex: 0 0 auto; }
.media-audio .ab { flex: 1; min-width: 0; }
.media-audio .ab strong { display: block; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery.single { grid-template-columns: 1fr; }
.gallery button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery.single button { aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery.single img { object-fit: contain; max-height: 78vh; margin: 0 auto; }
.gallery button:hover img { transform: scale(1.04); }
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.file-card .fi { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--c-m25); color: #fff; font-size: 20px; flex: 0 0 auto; }
.file-card .fb { flex: 1; min-width: 0; }
.file-card .fb strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .fb small { color: var(--muted); word-break: break-all; }
.viewer-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin: 20px 0; }
.like-btn.liked { background: rgba(240, 40, 73, .16); border-color: rgba(240, 40, 73, .5); color: #ffc2cd; }
.like-btn.liked i { color: var(--live); animation: heart .5s var(--ease); }
.comments h3 { font-size: 17px; margin-bottom: 12px; }
.comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); animation: fadeUp .35s var(--ease-out) both; }
.comment .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c-m30); font-weight: 800; flex: 0 0 auto; text-transform: uppercase; }
.comment .cb { flex: 1; min-width: 0; }
.comment .cb strong { font-size: 14px; }
.comment .cb p { margin: 3px 0 0; color: var(--text-2); font-size: 14.5px; word-wrap: break-word; }
.comment-form { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; margin-top: 14px; }
@media (max-width: 640px) {
    .viewer { padding: 0; }
    .viewer-panel { border-radius: 0; min-height: 100vh; margin: 0; border: 0; }
    .viewer-head { top: 0; border-radius: 0; }
    .viewer-body { padding: 18px 14px 26px; }
    .comment-form { grid-template-columns: 1fr; }
}

/* Visor de PDF dentro de la página */
.pdfv { background: #1d2733; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft); }
.pdfv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0d1c2b; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.pdfv-bar .name { flex: 1; min-width: 120px; font-weight: 700; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pdfv-bar .name i { color: #ff6b6b; margin-right: 6px; }
.pdfv-bar .zoom { font-size: 13px; color: var(--muted); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.pdfv-pages { height: min(78vh, 900px); overflow: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; background: #3a4450; }
.pdfv-page { background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); position: relative; }
.pdfv-page canvas { display: block; }
.pdfv-page .pn { position: absolute; bottom: -2px; right: 6px; transform: translateY(100%); font-size: 11px; color: #cfd8e3; }
.pdfv-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; color: #dbe7f3; }
.pdfv.full { position: fixed; inset: 0; z-index: 1500; border-radius: 0; }
.pdfv.full .pdfv-pages { height: calc(100vh - 56px); }
.pdfv iframe { width: 100%; height: min(78vh, 900px); border: 0; background: #fff; }

/* Lightbox de imágenes */
.lightbox { position: fixed; inset: 0; z-index: 1600; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; animation: fadeIn .25s ease both; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 6px; animation: pop .35s var(--ease-out) both; }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* Compartir */
.share-pop { position: fixed; inset: 0; z-index: 1700; display: flex; align-items: flex-end; justify-content: center; }
.share-pop .sp-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); animation: fadeIn .2s both; }
.share-pop .sp-panel { position: relative; width: min(420px, 100%); background: #0f2236; border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 20px; animation: slideUp .35s var(--ease-out) both; }
.share-pop h3 { font-size: 17px; margin-bottom: 14px; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-soft); color: var(--text-2); font-size: 12.5px; }
.share-grid i { font-size: 22px; }
.share-grid .wa i { color: #25d366; } .share-grid .fb i { color: #1877f2; } .share-grid .tw i { color: #fff; } .share-grid .cp i { color: var(--primary-light); }
@media (min-width: 640px) { .share-pop { align-items: center; } .share-pop .sp-panel { border-radius: 18px; } }

/* Mensajes flotantes */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: min(460px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 12px; background: #10263b; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-weight: 600; font-size: 14.5px; animation: slideUp .35s var(--ease-out) both; width: 100%; }
.toast i { font-size: 18px; }
.toast.ok i { color: var(--green-2); } .toast.err { border-color: rgba(229, 72, 77, .6); } .toast.err i { color: #ff7b7f; }
.toast.out { animation: fadeIn .25s ease reverse both; }

/* =========================================================
   Pie de página
   ========================================================= */
.site-footer { margin-top: 50px; background: linear-gradient(180deg, rgba(3, 12, 22, .6), #02070d); border-top: 1px solid var(--line); padding: 44px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { width: 64px; }
.site-footer h4 { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: #fff; }
.site-footer p, .site-footer a { color: var(--muted); font-size: 14px; }
.site-footer .links a { display: block; padding: 4px 0; transition: color .2s, transform .2s; }
.site-footer .links a:hover { color: #fff; transform: translateX(4px); }
.site-footer .contact p { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.site-footer .contact i { color: var(--primary); width: 16px; }
.socials { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text-2); transition: transform .25s var(--ease), background .2s; }
.socials a:hover { transform: translateY(-3px); background: var(--primary); color: #fff; }
.foot-bottom { margin-top: 36px; padding: 18px 0; border-top: 1px solid var(--line-soft); text-align: center; color: var(--muted-2); font-size: 13px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Formularios
   ========================================================= */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.field small { color: var(--muted-2); font-size: 12.5px; }
.input, .field input[type=text], .field input[type=password], .field input[type=url], .field input[type=email], .field select, .field textarea, .comment-form input, .comment-form textarea {
    width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--line); background: rgba(3, 12, 22, .65); color: var(--text); outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea, .comment-form textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.comment-form textarea { min-height: 44px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .comment-form input:focus, .comment-form textarea:focus { border-color: var(--c); box-shadow: 0 0 0 3px var(--c-a25); }
.field select option { background: #0d1c2b; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px !important; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; }

/* =========================================================
   Tamaños normales (letras, botones y listas más compactas)
   ========================================================= */
.container { max-width: 1200px; }
.btn { min-height: 36px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; letter-spacing: 0; text-transform: none; border-radius: 9px; gap: 7px; }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 40px; padding: 8px 18px; font-size: 14.5px; border-radius: 10px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-green, .btn-danger { box-shadow: none; }

/* Portada del inicio */
.hero { min-height: 0; margin: 18px 0 20px; border-radius: 16px; }
.hero-inner { gap: 22px; padding: 22px 26px; }
.hero-logo { width: 96px; }
.hero h1 { font-size: 28px; }
.hero .full { font-size: 15px; margin: 2px 0 6px; }
.hero .slogan { font-size: 14px; margin: 0; max-width: 720px; }
@media (max-width: 720px) {
    .hero-inner { padding: 20px 16px; gap: 12px; }
    .hero-logo { width: 80px; }
    .hero h1 { font-size: 24px; }
}

/* Barras de sección */
.section { margin-bottom: 20px; }
.sec-bar { padding: 11px 16px; border-left-width: 4px; }
.sec-bar h2 { font-size: 17px; gap: 9px; }
.sec-bar::after { width: 120px; height: 120px; border-width: 16px; }
.sec-bar::before { width: 80px; height: 80px; border-width: 12px; right: 120px; }
.sec-body { padding: 16px; }
.live-badge { font-size: 11px; padding: 4px 9px; }
.rich-text { font-size: 15px; line-height: 1.7; }

/* En vivo */
.live-wrap { grid-template-columns: minmax(0, 1fr) 300px; }
.live-wrap.no-sched { grid-template-columns: 1fr; }
.players { display: flex; flex-direction: column; gap: 0; background: #000; }
.player-box { border-bottom: 1px solid var(--line-soft); background: #050d16; }
.player-box:last-child { border-bottom: 0; }
.player-title { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--text-2); background: rgba(13, 28, 43, .9); }
.player-body iframe { display: block; }
.live-player { max-height: 480px; }
.play-cover .pbtn { width: 64px; height: 64px; font-size: 24px; box-shadow: 0 0 0 8px rgba(240, 40, 73, .2); }
.player-open { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.player-open .po-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(240, 40, 73, .18); color: #ff8fa3; font-size: 18px; flex: 0 0 auto; }
.player-open .po-txt { flex: 1; min-width: 0; }
.player-open strong { display: block; font-size: 14.5px; }
.player-open small { color: var(--muted); font-size: 12.5px; }
.schedule { padding: 14px; gap: 6px; }
.schedule h3 { font-size: 14px; }
.sch-item { padding: 8px 10px; font-size: 13.5px; align-items: flex-start; }
.sch-item .t { min-width: 48px; }
.sch-item .p small { display: block; color: var(--muted); font-size: 11.5px; }
.sch-item .air { color: #ff9bad; }
@media (max-width: 900px) { .live-wrap { grid-template-columns: 1fr; } }

/* Comités en lista */
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 8px; }
.crow {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft); color: var(--text);
    transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.crow:hover { background: rgba(255, 255, 255, .06); border-color: var(--c-a55); color: var(--text); transform: translateX(3px); }
.crow-logo { width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; background: var(--c-m35); color: #fff; font-size: 17px; }
.crow-logo img { width: 100%; height: 100%; object-fit: cover; }
.crow-body { flex: 1; min-width: 0; }
.crow-body strong { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-body span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.crow-meta i { color: var(--c); }
@media (max-width: 420px) { .clist { grid-template-columns: 1fr; } }

/* Publicaciones en lista (inicio) */
.plist { display: flex; flex-direction: column; gap: 10px; }
.prow { display: flex; gap: 14px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft); transition: border-color .2s, background .2s; }
.prow:hover { border-color: var(--c-a45); background: rgba(255, 255, 255, .05); }
.prow-thumb { width: 110px; height: 80px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; position: relative; display: grid; place-items: center; background: var(--c-m25); cursor: pointer; }
.prow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prow-thumb .ph { font-size: 26px; color: #fff; }
.prow-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 24px; background: rgba(0, 0, 0, .25); }
.prow-body { flex: 1; min-width: 0; }
.prow-from { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.prow-from i { color: var(--c); }
.prow h3 { font-size: 15.5px; font-weight: 700; margin: 3px 0 2px; cursor: pointer; }
.prow h3:hover { color: var(--primary-light); }
.prow p { font-size: 13.5px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 520px) { .prow-thumb { width: 84px; height: 64px; } }

/* Barra de Me gusta · Comentar · Compartir */
.social-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.social-bar .act {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text-2); font-size: 13px; font-weight: 600;
    transition: background .2s, border-color .2s, color .2s;
}
.social-bar .act:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.social-bar .act .n { font-weight: 800; color: #fff; }
.social-bar .act.liked { background: rgba(240, 40, 73, .15); border-color: rgba(240, 40, 73, .5); color: #ffc2cd; }
.social-bar .act.liked i { color: var(--live); }
.social-bar .act.bump i { animation: heart .5s var(--ease); }
@media (max-width: 420px) { .social-bar .act span { display: none; } }

/* Tarjeta de publicación (página de comité) más compacta */
.pcard-list { gap: 14px; }
.pcard { padding: 18px 20px 14px; }
.pcard .ribbon { top: 14px; left: -42px; font-size: 9.5px; padding: 3px 0; }
.pcard-title { font-size: 19px; gap: 8px; margin-bottom: 14px; padding-left: 18px; }
.pcard-title .ok { font-size: 17px; }
.pcard-title .type-tag { font-size: 12px; padding: 2px 9px; }
.pcard-grid { grid-template-columns: 130px minmax(0, 1fr); gap: 20px; }
.pcard-thumb { width: 130px; height: 130px; border-width: 2px; }
.pcard-thumb .ph { font-size: 40px; }
.pcard-thumb .play { font-size: 30px; }
.pcard-meta { gap: 8px; }
.pcard-meta li { grid-template-columns: 18px 100px minmax(0, 1fr); font-size: 14px; gap: 8px; }
.pcard-actions { gap: 8px; margin-top: 14px; }
.pcard-actions .btn { min-width: 0; }
.pcard-desc { margin-top: 14px; padding-top: 12px; font-size: 14px; line-height: 1.65; -webkit-line-clamp: 2; }
.pill { font-size: 12px; padding: 2px 9px; }
@media (max-width: 640px) {
    .pcard { padding: 16px 14px 12px; }
    .pcard-title { font-size: 17px; }
    .pcard-grid { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
    .pcard-thumb { width: 90px; height: 90px; margin: 0; }
    .pcard-meta li { grid-template-columns: 16px 80px minmax(0, 1fr); font-size: 13px; }
}

/* Página del comité */
.c-hero { margin: 18px 0; border-radius: 16px; }
.c-cover { height: 210px; }
.c-cover .pattern { font-size: 150px; }
.c-info { margin-top: -80px; padding: 0 22px 18px; gap: 18px; }
.c-logo { width: 104px; height: 104px; font-size: 40px; border-width: 3px; }
.c-text h1 { font-size: 26px; }
.c-text .slogan { font-size: 15px; margin: 4px 0 8px; }
.c-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
.index-head { padding: 11px 12px 11px 16px; }
.index-head h3 { font-size: 16px; }
.index-item { padding: 9px 14px; font-size: 14px; }
@media (max-width: 960px) { .c-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
    .c-cover { height: 150px; }
    .c-info { margin-top: -56px; padding: 0 14px 16px; }
    .c-logo { width: 84px; height: 84px; font-size: 32px; }
    .c-text h1 { font-size: 22px; }
}

/* Ventana de publicación */
.viewer-body h2 { font-size: 22px; }
.viewer-body { padding: 18px 20px 22px; }
.crow { min-width: 0; overflow: hidden; } .clist > * { min-width: 0; }

/* Aplicaciones de los comités */
.app-body { padding: 0 !important; overflow: hidden; }
.app-frame { width: 100%; background: #fff; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.app-frame.app-screen { height: calc(100vh - var(--header-h) - 110px); min-height: 520px; }
.app-frame:fullscreen { height: 100vh !important; border-radius: 0; }
.app-frame:-webkit-full-screen { height: 100vh !important; }
@media (max-width: 960px) { .app-frame.app-screen { height: calc(100vh - 140px); min-height: 480px; } }
