/* Portal de Partners de PDA International. HTML/CSS propios (sin WordPress/Elementor).
   Paleta y tipografía heredadas del sitio anterior: Poppins, azul #0001A9 / #283EFF, violeta #9B46D6. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700.woff2) format('woff2'); }

:root {
  --primary: #0001a9;
  --accent: #283eff;
  --purple: #9b46d6;
  --ink: #1d2233;
  --muted: #54595f;
  --text: #4a4f58;
  --line: #e4e7f0;
  --bg: #f5f6fb;
  --card: #fff;
  --danger: #b32d2e;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 1, 169, 0.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
/* Mientras se verifica la sesión no se muestra contenido protegido. */
html.loading body > main, html.loading body > footer { visibility: hidden; }
a { color: var(--accent); }
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .bar { max-width: 1140px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-header .brand img { display: block; height: 34px; width: auto; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.site-header nav a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.site-header nav a:hover { background: rgba(255, 255, 255, .14); }
.site-header nav a[aria-current='page'] { background: #fff; color: var(--primary); }
.site-header .who { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.site-header .who a, .site-header .who button { color: #fff; }
.site-header .who button { background: transparent; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .85rem; cursor: pointer; }
.site-header .who button:hover { background: rgba(255, 255, 255, .14); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #79d0f8; outline-offset: 2px; }

/* ---------- Estructura ---------- */
main { flex: 1; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 36px 0; }
.page-title { padding: 36px 0 8px; }
.page-title p { margin: 0; color: var(--muted); }
.site-footer { background: #11131f; color: #b9bdd0; padding: 28px 0; font-size: .85rem; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #fff; }

/* ---------- Hero (home) ---------- */
.hero { background: linear-gradient(180deg, rgba(0, 1, 169, .78), rgba(0, 1, 100, .86)), url(login.webp) center / cover no-repeat; color: #fff; padding: 72px 0 64px; }
.hero h1 { color: #fff; max-width: 18em; }
.hero p { font-size: 1.1rem; max-width: 36em; margin: 0 0 24px; color: #e8ebff; }

/* ---------- Botones ---------- */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: 11px 24px; font: 500 .95rem 'Poppins', sans-serif; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #e8ebff; }
.btn-ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-small { padding: 7px 16px; font-size: .85rem; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; }
.card p { margin: 0; }
.card .actions { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 1, 169, .14); }
.card-link .more { margin-top: auto; color: var(--accent); font-weight: 500; }
.tag { display: inline-block; align-self: flex-start; background: #eef0ff; color: var(--primary); border-radius: 999px; padding: 2px 12px; font-size: .78rem; font-weight: 500; }
.tag-purple { background: #f3e8fb; color: #6b2a99; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.promo { background: linear-gradient(135deg, var(--accent), var(--purple)); color: #fff; border: 0; }
.promo h3, .promo p { color: #fff; }

/* ---------- Recursos ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.toolbar input[type=search] { flex: 1 1 260px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 16px; font: 500 .85rem 'Poppins', sans-serif; cursor: pointer; }
.chip .n { color: var(--muted); font-weight: 400; margin-left: 4px; }
.chip[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip[aria-pressed='true'] .n { color: #cfd3ff; }
.res-group { margin-bottom: 34px; }
.res-card .meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .82rem; }
.file-icon { width: 44px; height: 44px; border-radius: 10px; background: #eef0ff; color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .75rem; letter-spacing: .02em; }

/* ---------- Eventos / novedades ---------- */
.event { flex-direction: row; gap: 18px; align-items: flex-start; }
.event .date { flex: 0 0 76px; text-align: center; background: var(--primary); color: #fff; border-radius: 12px; padding: 10px 6px; line-height: 1.1; }
.event .date b { display: block; font-size: 1.7rem; }
.event .date span { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.event .body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event.past { opacity: .72; }
.article { max-width: 760px; }
.article .body p { margin: 0 0 1.1em; }
.back-link { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 500; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 500; font-size: .9rem; margin: 14px 0 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid #c9cedd; border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
input[readonly] { background: #f0f2f9; color: var(--muted); }
.form-card { max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: .92rem; background: #e8f7ee; border: 1px solid #9ad3b0; color: #14532d; }
.msg.error { background: #ffe9e9; border-color: #e9a1a1; color: #7f1d1d; }

/* ---------- Pantalla de ingreso / solicitud ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 16px; background: linear-gradient(180deg, rgba(0, 1, 120, .35), rgba(0, 1, 120, .35)), url(login.webp) center / cover no-repeat; }
.auth-box { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.auth-box .logo { width: min(320px, 78%); height: auto; }
.auth-card { width: 100%; background: rgba(255, 255, 255, .88); border: 2px solid #fff; border-radius: 25px; padding: 34px 32px; backdrop-filter: blur(6px); }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .btn { width: 100%; margin-top: 18px; }
.auth-card .alt { margin: 16px 0 0; text-align: center; font-size: .9rem; }
.auth-card label:first-of-type { margin-top: 0; }

@media (max-width: 720px) {
  .site-header .bar { gap: 10px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header .who { margin-left: auto; }
  .hero { padding: 48px 0 44px; }
  .event { flex-direction: column; }
  .event .date { flex-basis: auto; align-self: flex-start; padding: 8px 18px; }
  .event .date b { display: inline; font-size: 1.3rem; margin-right: 6px; }
  .auth-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) { .card-link { transition: none; } }
