:root {
  --brand-main: #C62828;
  --brand-dark: #8E0000;
  --text: #4A4A4A;
  --muted: #6B6B6B;
  --muted-2: #8A8A8A;

  --bg: #ffffff;
  --card: #ffffff;
  --border: #E0E0E0;
  --radius: 18px;
  --shadow: 0 6px 18px rgba(0, 0, 0, .06);

  --link: #1E40AF;
  --transition: .25s ease;
}

/* BASE */

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fade-in general */
body {
  opacity: 0;
  animation: fadeInPage 0.8s ease-out forwards;
}

@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* HEADER (fondo blanco) */

.site-header {
  max-width: 1300px;
  margin: auto;
  padding: 48px 32px 24px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);

  opacity: 0;
  transform: translateY(-10px);
  animation: headerFadeDown .7s ease-out forwards;
  animation-delay: .2s;
}

@keyframes headerFadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand img {
  height: 140px;
  width: auto;
  border-radius: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

h1 {
  margin: 0;
  font-size: 50px;
  font-weight: 700;
  color: var(--brand-main);
}

.subtitle {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 25px;
  font-weight: 700;
}

/* ZONA DE TARJETAS (fondo gris a ancho completo) */

.cards-wrapper {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #f1f1f1 80px,
    #f1f1f1 100%
  );
  padding: 40px 0;
}

/* GRID */

.grid {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* CARDS */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition);

  opacity: 0;
  transform: translateY(10px);
  animation: cardFadeUp 0.6s ease-out forwards;
}

.card:nth-child(1){ animation-delay:.1s; }
.card:nth-child(2){ animation-delay:.2s; }
.card:nth-child(3){ animation-delay:.3s; }
.card:nth-child(4){ animation-delay:.4s; }
.card:nth-child(5){ animation-delay:.5s; }
.card:nth-child(6){ animation-delay:.6s; }
.card:nth-child(7){ animation-delay:.7s; }
.card:nth-child(8){ animation-delay:.8s; }

@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  border-color: var(--brand-main);
}

.icon img {
  display: block;
}

.card h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--brand-dark);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.card a {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.card a:hover {
  text-decoration: underline;
  color: #1E3A8A;
}

/* FOOTER LOGOS */

.footer-logos-top {
  text-align: center;
  font-size: 15px;
  color: var(--muted-2);
  padding: 40px 16px;
}

.logos {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
}

.logos img {
  height: 42px;
  opacity: .9;
  transition: opacity .25s ease, transform .25s ease;
}

.logos img:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.logos img.gaia {
  height: 58px;
}

/* FOOTER LEGAL (con degradado Opción A) */

.site-footer-legal {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: linear-gradient(
    to top,
    #f1f1f1 0%,
    #ffffff 100%
  );
  padding: 20px 16px;
  border-top: 1px solid var(--border);
  font-style: italic;
  font-family: roboto,sans-serif;
  font-weight: 400;
  font-size: 14px;
}

.footer-legal-inner {
  max-width: 1300px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.legal-link {
  color: var(--text);
  text-decoration: none;
  transition: color .25s ease, transform .25s ease;
}

.legal-link:hover {
  color: var(--brand-main);
  transform: translateY(-2px);
}

.legal-copy {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
}

/* RESPONSIVE */

@media (max-width: 600px) {

  .site-header {
    flex-direction: column;
    text-align: center;
  }

  .brand img {
    height: 90px;
  }

  h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 18px;
  }

  .card {
    flex-direction: column;
    text-align: center;
  }

  .icon img {
    height: 60px !important;
  }

  .footer-legal-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 900px) {

  .site-header {
    padding: 32px 24px;
  }

  .brand img {
    height: 110px;
  }

  h1 {
    font-size: 40px;
  }
}

/* ACCESIBILIDAD */

a:focus {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
  border-radius: 6px;
}
