/* ============================================
   BOYTA NYIA SL - Estilos página principal (lead gen)
   ============================================ */

/* Evitar doble offset con style.css (header fijo ~80px) */
#main-content {
  margin-top: 0;
}

/* Anclas bajo cabecera fija */
section[id] {
  scroll-margin-top: 96px;
}

/* Hero premium: 100vh, split layout */
.hero--premium {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #0d2a59 35%, #1a4c9a 70%, #2563b8 100%);
  padding: 0;
  contain: layout style;
}

.hero--premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(74, 144, 226, 0.25) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(26, 76, 154, 0.35) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero--premium::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60L60 0M-15 15L15 -15M45 75L75 45' stroke='%23fff' stroke-width='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 36%);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 5rem);
  width: 100%;
}

.hero__copy {
  max-width: 68ch;
  width: 100%;
  text-align: left;
}

.hero--premium .hero-title {
  text-align: left;
  font-size: clamp(1.85rem, 4.2vw, 3.25rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero__subtitle {
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
  max-width: 54ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.hero__subtitle strong {
  color: #fff;
  font-weight: 600;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem 1rem;
  align-items: center;
}

.hero__cta-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  max-width: 42ch;
}

@media (max-width: 1023px) {
  .hero__cta-note {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.btn--outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.hero__photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.hero__visual-badge {
  position: absolute;
  bottom: 8%;
  right: 4%;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.hero__visual-svg--small {
  width: 100%;
  height: 100%;
}

.hero__visual-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

@media (max-width: 1023px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero--premium .hero-title,
  .hero__subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
    min-height: 200px;
    max-height: 40vh;
  }

  .hero__visual-svg {
    max-width: 280px;
  }
}

@media (max-width: 767px) {
  .hero--premium {
    min-height: calc(100vh - 80px);
  }

  .btn {
    width: 100%;
  }
}

/* Sección servicios: grid de tarjetas */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.services--grid {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-bg);
}

.services--grid .container {
  max-width: 1400px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.service-tile {
  background: var(--color-white);
  border-radius: 14px;
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  contain: layout style;
}

.service-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-tile__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(26, 76, 154, 0.25);
}

.service-tile__icon svg {
  width: 28px;
  height: 28px;
}

.service-tile h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.service-tile ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  flex: 1;
}

.service-tile li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text);
}

.service-tile li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.service-tile__link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-primary);
  margin-top: auto;
}

.service-tile__link:hover {
  color: var(--color-accent);
}

@media (max-width: 639px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Por qué BOYTA */
.section-why {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 639px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e8ecf1;
  transition: transform 0.25s ease;
}

.why-card:hover {
  transform: translateY(-4px);
}

.why-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.why-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

/* Clientes */
.section-clients {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-bg);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.client-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-primary-dark);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.client-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.client-card__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.client-card__label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  color: inherit;
}

.client-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 76, 154, 0.35);
  color: var(--color-primary);
}

.client-card:hover .client-card__label {
  color: var(--color-primary);
}

.client-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Autoridad */
.section-authority {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: var(--color-white);
}

.authority-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 767px) {
  .authority-layout {
    grid-template-columns: 1fr;
  }
}

.authority-block {
  padding: 2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f5fc 0%, #fff 100%);
  border: 1px solid #e0e8f2;
}

.authority-block h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-pill {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.authority-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.authority-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
}

.authority-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* CTA final */
.section-cta-final {
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  text-align: center;
}

.section-cta-final h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.section-cta-final__sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
  line-height: 1.55;
  max-width: 42ch;
  margin: 0 auto 1.75rem;
}

.section-cta-final .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
}

.section-cta-final .btn--primary:hover {
  background: #f0f4fa;
}

/* Footer ampliado */
.footer--extended .footer-content {
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.footer-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-lang .lang-btn {
  color: rgba(255, 255, 255, 0.85);
}

.footer-lang .lang-btn.active {
  color: #fff;
}

@media (max-width: 767px) {
  .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-lang {
    justify-content: center;
  }
}
