/* =========================
   FILE: /assets/css/style.css
   PROJECT: mitasa.es
   VERSION: 1
   ========================= */

/* ---------- CSS Reset (suave) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:root {
  /* Brand */
  --brand-900: #1f2933;   /* gris-azulado oscuro */
  --brand-500: #22c55e;   /* verde acento */
  --brand-400: #0ea5e9;   /* azul secundario (focus / links) */

  /* Surface */
  --bg: #f8fafc;          /* fondo claro */
  --card: #ffffff;
  --alt: #f1f5f9;

  /* Text */
  --text: #111827;
  --muted: #475569;

  /* Lines / shadows */
  --line: rgba(15, 23, 42, 0.10);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);

  /* Radius */
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 12px;

  /* Layout */
  --container: 1120px;

  /* Type */
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;

  /* Transitions */
  --t: 0.18s ease;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: min(var(--container), calc(100% - 2.2rem));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-logo {
  width: 140px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.nav a {
  font-size: 0.95rem;
  color: rgba(17, 24, 39, 0.88);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  transition: background var(--t), color var(--t);
}

.nav a:hover {
  background: rgba(34, 197, 94, 0.12);
  color: var(--text);
}

.nav-cta {
  background: var(--brand-900);
  color: #fff !important;
  padding: 0.55rem 0.85rem !important;
}

.nav-cta:hover {
  background: #162028;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
}

.nav-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--brand-900);
  display: block;
}

/* Mobile nav panel */
.mobile-nav {
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.mobile-nav a:hover {
  background: rgba(34, 197, 94, 0.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);
  white-space: nowrap;
}

.btn.primary {
  background: var(--brand-900);
  color: #fff;
  box-shadow: 0 12px 26px rgba(31, 41, 51, 0.22);
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: #162028;
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--brand-900);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.btn.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.35);
}

/* Focus visible */
:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 2.2rem 0 1.3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
  align-items: start;
}

.hero-copy h1 {
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--brand-900);
}

.lead {
  margin: 0 0 1.1rem;
  color: rgba(17, 24, 39, 0.85);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.hero-badges {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.20);
  color: var(--brand-900);
}

/* Hero right card */
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.05rem;
  box-shadow: var(--shadow);
}

.quick-title {
  font-weight: 800;
  color: var(--brand-900);
  margin-bottom: 0.8rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.quick-item {
  background: rgba(241, 245, 249, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 0.75rem 0.75rem;
  transition: transform var(--t), border-color var(--t), background var(--t);
}

.quick-item:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.quick-kicker {
  display: block;
  font-weight: 800;
  color: var(--brand-900);
  margin-bottom: 0.15rem;
}

.quick-desc {
  display: block;
  color: rgba(71, 85, 105, 0.95);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 2.0rem 0;
}

.section.alt {
  background: var(--alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.1rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  color: var(--brand-900);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Cards grids ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  color: var(--brand-900);
}

.card p {
  margin: 0 0 0.8rem;
  color: rgba(71, 85, 105, 0.95);
}

.linklist {
  margin: 0;
  padding-left: 1.1rem;
}

.linklist li {
  margin: 0.35rem 0;
}

.linklist a {
  color: rgba(17, 24, 39, 0.9);
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}

.linklist a:hover {
  color: var(--brand-900);
  border-color: rgba(34, 197, 94, 0.45);
}

/* ---------- Split + mini stats ---------- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.9rem 0.9rem;
}

.mini-num {
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--brand-900);
  letter-spacing: -0.02em;
}

.mini-text {
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.05rem 1.05rem;
}

.faq-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--brand-900);
}

.faq-item p {
  margin: 0;
  color: rgba(71, 85, 105, 0.95);
}

.faq-item a {
  color: var(--brand-900);
  border-bottom: 1px solid rgba(34, 197, 94, 0.35);
}

.faq-item a:hover {
  border-bottom-color: rgba(34, 197, 94, 0.65);
}

/* ---------- CTA ---------- */
.cta {
  padding: 2.1rem 0 2.4rem;
}

.cta-box {
  background: var(--brand-900);
  color: #fff;
  border-radius: calc(var(--r-lg) + 6px);
  padding: 1.3rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 20px 50px rgba(31, 41, 51, 0.25);
}

.cta-box h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.cta-box p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.cta-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.cta .btn.primary {
  background: var(--brand-500);
  color: #052012;
  box-shadow: none;
}

.cta .btn.primary:hover {
  background: #1fb153;
}

.cta .btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.cta .btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 1.8rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.footer-logo img {
  width: 120px;
}

.footer-title {
  font-weight: 900;
  margin-bottom: 0.55rem;
  color: var(--brand-900);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(71, 85, 105, 0.95);
  padding: 0.25rem 0;
  transition: color var(--t);
}

.footer-col a:hover {
  color: var(--brand-900);
}

.footer-bottom {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: rgba(71, 85, 105, 0.9);
  font-size: 0.95rem;
}

/* ---------- Ad placeholders ---------- */
.ad-slot {
  margin-top: 1rem;
  background: rgba(241, 245, 249, 0.8);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: var(--r-lg);
  padding: 0.9rem;
}

.ad-slot.wide {
  margin-top: 1.2rem;
}

.ad-label {
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.9);
  margin-bottom: 0.4rem;
}

.ad-box {
  height: 90px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  place-items: center;
  color: rgba(71, 85, 105, 0.85);
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .cards-2 {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(var(--container), calc(100% - 1.4rem));
  }

  .lead {
    font-size: 1.02rem;
  }
}
