:root {
  --bg-pastel: #d1d9d1;
  --text-white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.12); 
  
  --rail-max: 420px; 
  --mascot-width: 194px;
  /* CAMBIO: Altura de botón reducida un 5% aprox (de 34px a 32px) para ganar espacio */
  --btn-height: 32px; 
  --btn-gap: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background-color: var(--bg-pastel);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* CAMBIO: Reduje el padding superior del body de 40px a 20px para que entre mejor en pantallas chicas sin pegarse al borde */
  padding: 20px 10px; 
  -webkit-font-smoothing: antialiased;
}

.container {
  display: table;
  width: auto;
  margin: 0 auto 20px auto;
  /* CAMBIOS EN PADDING:
     Top: 25px (antes 40px) -> Sube el logo.
     Bottom: 18px (antes 35px) -> Reduce espacio abajo del último botón a la mitad.
  */
  padding: 25px 40px 18px 40px; 
  background-image: url('pizarra.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  border-radius: 8px;
  position: relative;
}

.brand-internal { 
  text-align: center; 
  /* CAMBIO: Reducido de 20px a 15px para acercar los botones al título */
  margin-bottom: 15px; 
}

.logo-tiza { 
  width: 155px; 
  height: auto; 
  /* CAMBIO: Eliminado el margen inferior (antes 5px) para compactar */
  margin-bottom: 0px; 
}

.title-internal { 
  font-size: 24px; 
  font-weight: 700; 
  color: var(--text-white); 
  line-height: 1.1;
}

.subtitle-internal { 
  font-size: 14.5px; 
  font-weight: 400; 
  color: rgba(255,255,255,0.85);
  /* CAMBIO: Reducido a 0px (antes 4px) para pegar el subtítulo al título */
  margin-top: 0px;
}

.main-rail { 
  position: relative; 
  width: 100%; 
  max-width: var(--rail-max);
  margin: 0 auto;
}

.blocks { 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start;
  position: relative;
  z-index: 1; 
}

.link-card {
  display: flex; align-items: center; text-decoration: none;
  color: var(--text-white); background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.15); 
  border-radius: 12px; 
  height: var(--btn-height); padding: 0 14px;
  font-weight: 400; font-size: 14px; transition: all 0.2s ease;
  backdrop-filter: blur(2px); white-space: nowrap;
}

.link-card + .link-card { margin-top: var(--btn-gap); }
.link-card i { font-size: 15px; width: 24px; text-align: center; margin-right: 8px; opacity: 0.8; }
.link-card:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.3); transform: translateX(3px); }

.side { 
  position: absolute; 
  z-index: 10; 
  right: -25px; 
  bottom: 0; 
  width: var(--mascot-width);
  pointer-events: none; 
}

.mascot { width: 100%; height: auto; display: block; opacity: 0.95; }

.footer { width: 100%; text-align: center; margin-top: 10px; }
.pd-link { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; }
.logo-pd { width: 90px; height: auto; margin-bottom: 6px; }
.company-info { display: flex; flex-direction: column; align-items: center; }
.pd-brand { font-size: 13px; font-weight: 500; color: #36344D; }
.company-info p { font-size: 11px; color: #727586; margin: 1px 0; }

@media (max-width: 550px) {
  body { padding: 20px 10px; } /* Ajuste responsive también */
  .container {
    width: 98%; 
    padding: 25px 15px 18px 15px; /* Mismos ajustes de padding interno para móvil */
    max-width: none;
  }
}