/* ===========================
   Paleta y tokens del sistema
   =========================== */
:root{
  --bg:#f4f6f8;            
  --card:#ffffff;          
  --muted:#5b6b7f;         
  --text:#0f1a2b;          
  --brand-navy:#0a4f85;
  --accent:#0aa5d8;
  --accent-2:#1b6fbf;
  --accent-3:#0d5aa3;
  --ring: rgba(27,111,191,.25);
  --radius: 16px;
  --logo-h: 64px;
  --content-w: 1100px;
}

*{ box-sizing:border-box }
html,body{ height:100% }

body{
  margin:0;
  font-family: system-ui, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color:var(--text);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:40px 16px;
}

/* Contenedor */
.wrap{ width:min(var(--content-w), 100%); }

/* ===========================
   Header con logo + textos
   =========================== */
.site-header{ margin-bottom: 22px; }

.brand{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 18px;
  align-items: center;
  justify-content: start;
}

.brand-logo{
  height: var(--logo-h);
  width: auto;
  object-fit: contain;
  display:block;
  filter: drop-shadow(0 2px 6px rgba(2,6,23,.06));
}

.brand-text{ display: grid; gap: 2px; }

/* Título */
h1{
  font-size: clamp(28px, 3vw, 40px);
  margin: 0 0 4px;
  letter-spacing: .2px;
  line-height: 1.28;
  display: inline-block;
  overflow: visible;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}

/* Subtítulo */
.subtitle{
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--brand-navy);
  opacity: .96;
}

/* Línea auxiliar */
.sub{ color: var(--muted); font-size: 13px; margin: 0; }

/* ===========================
   Toolbar (buscador + orden)
   =========================== */
.toolbar{
  display:flex; gap:12px; align-items:center; margin:18px 0 12px; flex-wrap:wrap;
}

.search{ flex:1 1 340px; position:relative; }

.search input{
  width:100%;
  background:#fff;
  border:1px solid rgba(2,6,23,.08);
  color:var(--text);
  padding:14px 14px 14px 40px;
  border-radius: var(--radius);
  outline:none;
  transition:.18s border-color, .18s box-shadow, .18s background-color;
  box-shadow: 0 2px 10px rgba(2,6,23,.04);
}
.search input:focus{
  border-color: var(--accent-3);
  box-shadow: 0 0 0 6px var(--ring);
  background:#fff;
}
.search svg{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  opacity:.65; color:#33597f;
}

.controls{ display:flex; gap:10px; align-items:center; }

.select{
  background:#fff;
  border:1px solid rgba(2,6,23,.10);
  color:var(--text);
  padding:12px 14px;
  border-radius:12px;
  box-shadow: 0 2px 10px rgba(2,6,23,.05);
}

/* ===========================
   Lista de documentos
   =========================== */
.list{
  background: var(--card);
  border:1px solid rgba(2,6,23,.08);
  border-radius: var(--radius);
  overflow: clip;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 30px rgba(2,6,23,.06);
}

.row{
  display:grid;
  grid-template-columns: 48px 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid rgba(2,6,23,.06);
}
.row:last-child{border-bottom:none}

.badge{
  width:36px; height:36px; border-radius:10px;
  display:grid; place-items:center;
  background:linear-gradient(135deg, rgba(10,165,216,.12), rgba(27,111,191,.10));
  border:1px solid rgba(2,6,23,.08);
  font-weight:700; color: var(--accent-2);
}

.title{ font-weight:600; line-height:1.15; letter-spacing:.2px; }
.meta{ color:var(--muted); font-size:12px; margin-top:4px; }

/* Botón */
.row a.btn{
  text-decoration:none;
  padding:10px 14px;
  border-radius: 12px;
  border:1px solid rgba(27,111,191,.35);
  color:#0c223a;
  transition:.15s transform, .15s box-shadow, .15s background, .15s border-color;
  background: linear-gradient(180deg, rgba(10,165,216,.12), rgba(27,111,191,.08));
}
.row a.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2,6,23,.08);
  background: linear-gradient(180deg, rgba(10,165,216,.16), rgba(27,111,191,.12));
  border-color: rgba(27,111,191,.55);
}

/* Contador y vacíos */
.counter{ color:var(--muted); font-size:13px; margin:10px 2px 16px; }
.empty{ text-align:center; padding:28px; color:var(--muted); }

/* Footer base (texto genérico) */
footer{ color:var(--muted); font-size:12px; margin-top:12px; text-align:center; }

/* Accesibilidad (labels visualmente ocultos) */
.sr-only{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ===========================
   Footer institucional (logo)
   =========================== */
.site-footer{
  background: transparent;
  border: 0;
  box-shadow: none;
  display: block;
  margin-top: 8px;
  padding: 8px 0 12px;
  text-align: left;
  width: 100%;
}

.footer-brand{
  display: block;
  margin: 10px 0 0 0;
  width: clamp(300px, 40vw, 400px);
  max-width: 100%;
  height: auto;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1;
}

/* Breakpoints coherentes */
@media (max-width:1024px){
  .footer-brand{ width: clamp(280px, 42vw, 380px); }
}
@media (max-width:768px){
  .footer-brand{ width: clamp(260px, 50vw, 360px); }
}
@media (max-width:600px){
  .site-footer{ padding: 8px 0 14px; }
  .footer-brand{ width: 88vw; max-width: 420px; }
}
@media (max-width:380px){
  .footer-brand{ width: 94vw; max-width: none; }
}

/* ===========================
   Hero con logo a la derecha
   =========================== */
.hero{
  display: grid;
  grid-template-columns: 1fr auto; 
  align-items: start;               
  gap: 14px;
  margin-bottom: 10px;
}

.hero-copy{ display: grid; gap: 4px; }

.hero-copy h2{
  color:#97a0ad;   
  font-weight:700;
  line-height:1.05;
  margin:0 0 8px;
}

/* Logo: tamaño moderado + alineado arriba */
.hero-logo{
  position: relative;
  bottom: 10px;
  width: clamp(170px, 260px);
  max-width: 100%;
  height: auto;
  display: block;
  align-self: start;
}

/* Responsivo */
@media (max-width:1024px){
  .hero{ gap:12px; }
  .hero-logo{ width: clamp(155px, 22vw, 235px); }
}
@media (max-width:820px){
  .hero{ grid-template-columns: 1fr; align-items:start; }
  .hero-logo{
    justify-self:start;
    width: clamp(150px, 34vw, 220px);
    margin-top:2px;
  }
}
@media (max-width:600px){
  .hero{ margin-bottom:8px; }
  .hero-logo{ width: 52vw; max-width:240px; }
}
@media (max-width:420px){
  .hero-logo{ width: 56vw; max-width:none; }
}

/* ===========================
   Responsive de filas (lista)
   =========================== */
@media (max-width:720px){
  .brand{ grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .brand-text{ gap: 4px; }
  .subtitle{ font-size: 13px; }
}
@media (max-width:640px){
  .row{ grid-template-columns: 40px 1fr; }
  .row a.btn{ grid-column: 1 / -1; justify-self: start; margin-top:6px; }
}

/* === Quitar espacio entre H2 y H1 en el hero === */
.hero-copy{
  gap: 0;                 
}
.hero-copy h2{
  margin: 0;              
}
.hero h1{
  margin-top: 0;          
}

/*En móvil ocultar el logo del hero */
@media (max-width:600px){
  .hero-logo{ display:none !important; }
  .hero{ grid-template-columns: 1fr; } 
}

