/* styles.css */
/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: #0f172a; /* slate-900 */
  background: #f8fafc; /* slate-50 */
}

/* Header */
.site-header {
  display: grid;
  place-items: center;
  padding: 2.25rem 1rem 1.25rem;
  background: linear-gradient(20deg, #ffffff 0%, #f8fafc 10%);
  border-bottom: 1px solid #e2e8f0;
}
.brand { text-align: center; }
.logo {
  width: 92px; height: 92px; object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .06);
}
.site-title {
  margin: .75rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  letter-spacing: .05em;
  color: #0f172a;
  font-weight: 800;
  text-transform: uppercase;
}

/* ===== Layout con grid-areas =====
   Desktop: imagen (40%) a la izquierda, dos paneles (30% + 30%) a la derecha
*/
.layout {
  width: min(1200px, 92vw);
  margin: 2rem auto;
  display: grid;
  gap: 1.25rem;
  /* 1.333fr (~40%) | 1fr | 1fr */
  grid-template-columns: 1.333fr 1fr 1fr;
  grid-template-areas: "image acad plat";
  align-items: start;
}

/* Asignar áreas explicitamente sin cambiar el HTML */
.panel-center { grid-area: image; }
.panel-left   { grid-area: acad; }
.panel-right  { grid-area: plat; }

/* Paneles */
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  min-height: 320px;
}
.panel h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem; font-weight: 800; color: #0f172a;
  display: flex; align-items: center; gap: .5rem;
}
.panel-text { margin: 0 0 1rem; color: #334155; line-height: 1.5; }

/* Imagen 40% */
.panel-center { display: grid; place-items: center; padding: .5rem; }
.hero-image {
  width: 100%; height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 40px rgba(2, 6, 23, .12);
}

/* ===== Botones “split”: icono a la izquierda y texto a la derecha ===== */
.btn-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }

/* Variables de color por enlace */
.link-dece       { --c: #0f766e; --c-deep:#0a524d; --text-bg:#e6fffb; } /* teal */
.link-academico  { --c: #1d4ed8; --c-deep:#133b96; --text-bg:#eaf2ff; } /* blue */
.link-eva        { --c: #7c3aed; --c-deep:#5b21b6; --text-bg:#f2eaff; } /* violet */
.link-gmail      { --c: #ea4335; --c-deep:#b3261e; --text-bg:#ffeeec; } /* red */
.link-santillana { --c: #047857; --c-deep:#065f46; --text-bg:#e8fff4; } /* emerald */

/* Componente */
.btn-split {
  display: grid;
  grid-template-columns: 56px 1fr; /* bloque icono + bloque texto */
  align-items: stretch;
  text-decoration: none;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(2, 6, 23, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-split .btn-icon {
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--c), var(--c-deep) 120%);
  color: #ffffff;
  font-size: 1.2rem;
}

.btn-split .btn-label {
  display: flex; align-items: center;
  padding: .9rem 1rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: #0f172a;
  background: linear-gradient(180deg, var(--text-bg), #ffffff 160%);
}

.btn-split:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(2, 6, 23, .16);
  border-color: color-mix(in oklab, var(--c) 30%, #e5e7eb);
}

/* Estado de foco visible (accesible) */
.btn-split:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--c) 40%, #ffffff);
  outline-offset: 2px;
}

/* Footer gris elegante */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
  background: #171717;   /*#272727;*//*#f1f5f9;*/
  color: #9A9B9C;/*#334155;*/
  padding: 1.2rem;
  text-align: center;
  font-size: .98rem;
}
.site-footer a {
  color: #9A9B9C; font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent;
}
.site-footer a:hover { border-bottom-color: #0f172a; }



/* ===== Back to Top (FAB) ===== */
html { scroll-behavior: smooth; } /* suave al usar anclas o JS */

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(180deg, #111827, #0b1220 120%); /* gris oscuro elegante */
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255,255,255,.08);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.back-to-top i { font-size: 1.05rem; }

/* Visible al hacer scroll */
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hover / focus */
.back-to-top:hover {
  box-shadow: 0 16px 36px rgba(2, 6, 23, .35), inset 0 1px 0 rgba(255,255,255,.1);
}
.back-to-top:focus-visible {
  outline: 3px solid #93c5fd; /* azul claro accesible */
  outline-offset: 2px;
}


.back-to-top { opacity: 1; transform: none; pointer-events: auto; }

/* ===== Responsivo ===== */
@media (max-width: 1100px) {
  .layout { gap: 1rem; }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "acad"
      "plat";
  }
  .panel { min-height: initial; }
  .hero-image { aspect-ratio: 16 / 9; }
}

/* Respeta preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
