﻿/* =========================================================
   1) RESET + BASE
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #111827;
  background-color: #f3f4f6;
}

img { max-width: 100%; display: block; }

ul { list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid rgba(14, 0, 97, 0.35);
  outline-offset: 3px;
}

/* Accesibilidad */
.skip-link{
  position:absolute;
  left:-999px;
  top:12px;
  background:#fff;
  color:#111827;
  padding:10px 14px;
  border-radius:12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  z-index:999;
}
.skip-link:focus{ left:12px; }

/* =========================================================
   2) VARIABLES (AZUL DEL LOGO)
========================================================= */

:root {
  --brand: #0E0061;          /* azul exacto del logo */
  --brand-dark: #090045;
  --brand-soft: rgba(14, 0, 97, 0.10);

  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shell: #ffffff;

  --max-width: 1200px;
  --header-h: 86px;

  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 18px 44px rgba(15, 23, 42, 0.18);

  --radius-xl: 22px;
  --radius-lg: 18px;
}

/* =========================================================
   3) ESTRUCTURA GLOBAL
========================================================= */

.page-shell {
  max-width: 100%;
  margin: 0;
  background-color: var(--shell);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.main-content { min-height: 50vh; }

/* Títulos de sección */
.section-head { margin-bottom: 36px; }

.section-head h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
  font-size: 0.98rem;
}

.section-head--center { text-align: center; }
.section-head--center p { margin: 0 auto; }

/* =========================================================
   4) HEADER + NAV
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.header-bar { background-color: #ffffff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.brand img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* Nav desktop */
.main-nav { display: flex; align-items: center; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: var(--brand);
  transition: width 0.2s ease;
}

.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background-color: #111827;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   5) BOTONES
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(14, 0, 97, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary:hover {
  background-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(14, 0, 97, 0.45);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.30);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* =========================================================
   6) HERO HOME
========================================================= */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}

.hero--home {
  min-height: clamp(480px, 82vh, 620px);
  background-image: url("../img/slider1.jpeg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.86),
    rgba(14, 0, 97, 0.30),
    rgba(15, 23, 42, 0.78)
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-block: 90px;
  color: #ffffff;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.80rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2.4rem, 3.4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  text-wrap: balance;
}

.hero__subtitle {
  font-size: 1.02rem;
  margin-bottom: 28px;
  color: #e5e7eb;
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   7) HOME CARDS
========================================================= */

.home-cards {
  padding: 80px 0 70px;
  background-color: #f3f4f6;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.home-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-card__image {
  height: 190px;
  overflow: hidden;
}

.home-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-card__body { padding: 20px 20px 18px; }

.home-card__body h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #111827;
}

.home-card__body p {
  font-size: 0.96rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.home-card__link {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand);
}

.home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.home-card:hover .home-card__image img { transform: scale(1.06); }

/* =========================================================
   8) WHY (¿POR QUÉ?)
========================================================= */

.why {
  padding: 70px 0 80px;
  background-color: #ffffff;
}

.why__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.why-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 18px;
  border-radius: 16px;
  background-color: #f9fafb;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.why-item__icon {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background-color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(14, 0, 97, 0.40);
  overflow: hidden;
}

.why-icon {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.why-icon--tools { transform: translateY(-3px); }

.why-item__text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #111827;
}

.why-item__text p {
  font-size: 0.96rem;
  color: var(--muted);
}

/* =========================================================
   9) ABOUT
========================================================= */

.about {
  padding: 80px 0 90px;
  background-color: #f3f4f6;
}

.about-wrapper {
  display: flex;
  align-items: stretch;
  gap: 40px;
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.about-image {
  flex: 0 0 40%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-label {
  display: inline-block;
  background-color: var(--brand-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.about-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 16px;
}

.about-info p {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* =========================================================
   10) FOOTER
========================================================= */

.site-footer {
  background-color: #020617;
  color: #e5e7eb;
}

.footer-top {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 40px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-col h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
  color: #e5e7eb;
}

.footer-col ul li + li { margin-top: 6px; }

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-col a:hover { color: #ffffff; }

/* Columna marca */
.footer-col--brand p {
  font-size: 0.95rem;
  color: #9ca3af;
  max-width: 340px;
}

.footer-logo img {
  height: 64px;
  width: auto;
  margin-bottom: 10px;
}

/* Contacto */
.footer-contact li {
  font-size: 0.94rem;
  color: #9ca3af;
}

.footer-contact span {
  font-weight: 800;
  color: #e5e7eb;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px 0 16px;
  background-color: #020617;
}

.footer-bottom-inner {
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* =========================================================
   11) RESPONSIVE
========================================================= */

@media (max-width: 992px) {
  .container { padding: 0 20px; }
  .header-inner { height: 72px; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .main-nav.is-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    padding: 16px 0 18px;
    gap: 10px;
  }

  .hero--home { min-height: 70vh; }

  .hero__inner {
    max-width: none;
    padding-block: 70px;
    text-align: center;
  }

  .hero__actions { justify-content: center; }

  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .about-wrapper {
    flex-direction: column;
    padding: 28px;
  }

  .about-image { height: 320px; }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .brand img { height: 60px; }
  .hero__title { font-size: 2rem; }

  .cards-grid { grid-template-columns: 1fr; }
  .home-card__image { height: 200px; }

  .about-wrapper { padding: 22px 18px; }
  .about-title { font-size: 1.45rem; }

  .why-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .why-item__icon { margin-bottom: 4px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-col--brand p { max-width: none; }
}

/* Respeta preferencias de movimiento */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
