/* ============================================================
   ALPINISMO INDUSTRIAL — Modern Design Override
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Barlow+Condensed:wght@400;600;700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --red:       #C0392B;
  --red-dark:  #96281B;
  --red-light: #E74C3C;
  --black:     #0D0D0D;
  --dark:      #1A1A1A;
  --dark2:     #242424;
  --gray:      #6B7280;
  --light:     #F5F5F5;
  --white:     #FFFFFF;
  --border:    rgba(255,255,255,0.08);
  --shadow:    0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.18);
  --radius:    4px;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  color: #444;
  line-height: 1.7;
  font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.02em;
}

a { transition: var(--transition); }

/* ── Preloader ──────────────────────────────────────────────── */
.preload {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cssload-spin-box {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────────────────── */
.header.header--fixed {
  background-color: rgba(13,13,13,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header.header--fixed.scrolled {
  background-color: rgba(13,13,13,0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.header__inner { padding: 16px 0; }

.header-logo img { height: 44px; width: auto; }

/* Nav links */
.raising-nav .raising-menu a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75) !important;
  padding: 10px 16px !important;
  transition: var(--transition);
}

.raising-nav .raising-menu a:hover,
.raising-nav .raising-menu li.current > a {
  color: var(--red-light) !important;
}

.raising-nav li:after {
  background-color: var(--red);
  height: 2px;
}

.navbar-toggle {
  background-color: var(--red);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  line-height: 36px;
}

/* ── Hero / Slider ──────────────────────────────────────────── */
.hero__wrapper {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero__wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(192,57,43,0.15) 100%
  );
  z-index: 0;
}

/* Centrado vertical del contenido — anula main.css */
.hero__inner {
  position: relative !important;
  top: auto !important;
  transform: none !important;
  z-index: 1;
  width: 100%;
  padding: 140px 0 100px;
}

.hero__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 64px !important;
  font-weight: 800;
  line-height: 1.05;
  color: var(--white) !important;
  text-shadow: none !important;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  animation: heroFadeUp 0.9s ease both;
}

.hero__desc {
  font-family: 'Inter', sans-serif;
  font-size: 17px !important;
  font-weight: 400;
  color: rgba(255,255,255,0.85) !important;
  text-shadow: none !important;
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 32px;
  animation: heroFadeUp 0.9s 0.15s ease both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Swiper nav buttons */
.hero .swiper-button-custom > div {
  background-color: rgba(192,57,43,0.7);
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.hero .swiper-button-custom > div:hover {
  background-color: var(--red);
  transform: scale(1.08);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 30px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background-color: var(--red);
  color: var(--white) !important;
  box-shadow: 0 4px 16px rgba(192,57,43,0.35);
}

.btn-primary:hover {
  background-color: var(--red-dark);
  box-shadow: 0 6px 24px rgba(192,57,43,0.5);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.8);
  color: var(--white) !important;
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--red) !important;
  border-color: var(--white);
}

/* ── CTA Banner ─────────────────────────────────────────────── */
.cta-02 {
  background: linear-gradient(90deg, var(--red-dark) 0%, var(--red) 100%);
  padding: 28px 0;
  position: relative;
  overflow: hidden;
}

.cta-02::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.cta-02__title {
  font-family: 'Inter', sans-serif;
  font-size: 18px !important;
  font-weight: 500;
  font-style: normal !important;
  color: var(--white) !important;
  letter-spacing: 0;
}

/* ── Section base ───────────────────────────────────────────── */
.md-section {
  padding-top: 90px !important;
  padding-bottom: 90px !important;
}

/* ── Section Titles ─────────────────────────────────────────── */
.sec-title__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark) !important;
  line-height: 1.1;
}

.sec-title__title span { color: var(--red) !important; }

.sec-title__divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  border-radius: 2px;
  margin-top: 12px;
}

.md-skin-dark .sec-title__title { color: var(--white) !important; }

/* ── Nosotros Section ───────────────────────────────────────── */
#id2 {
  background-color: var(--white) !important;
}

#id2 p {
  font-size: 15px;
  line-height: 1.85;
  color: #555;
}

#id2 .embed-responsive {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── Services ───────────────────────────────────────────────── */
#id3 {
  background-color: var(--light);
}

.services {
  background-color: var(--white);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: var(--transition);
  margin-bottom: 28px;
  border: 1px solid rgba(0,0,0,0.05);
}

.services:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(192,57,43,0.15);
}

.services__img {
  margin-bottom: 0;
  overflow: hidden;
}

.services__img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.services:hover .services__img img {
  transform: scale(1.06);
}

.services__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 18px 18px 8px;
  color: var(--dark) !important;
}

.services__title a { color: inherit !important; }

.services__title:hover,
.services__title a:hover { color: var(--red) !important; }

.services__desc {
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.7;
  margin: 0 18px 20px;
}

/* ── Galería / Videos ───────────────────────────────────────── */
#id6 {
  background-color: var(--dark) !important;
  background-image: none !important;
}

#id6 .md-overlay {
  background-color: rgba(0,0,0,0.6) !important;
}

#id6 .sec-title__title { color: var(--white) !important; }

/* Cards de video */
#id6 .card {
  background-color: var(--dark2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}

#id6 .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  border-color: rgba(192,57,43,0.3);
}

#id6 .card-body {
  padding: 14px 16px;
  background-color: var(--dark2);
}

#id6 .card-title2 {
  color: var(--white) !important;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

#id6 .card-text {
  color: rgba(255,255,255,0.5) !important;
  font-size: 12px;
  margin-bottom: 0;
}

#id6 .card-text img {
  width: 18px;
  height: auto;
  vertical-align: middle;
  margin-right: 4px;
}

/* Carousel buttons */
#id6 .btn-primary {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ── Proyectos ──────────────────────────────────────────────── */
#id4 {
  background-color: var(--dark) !important;
}

#id4 .sec-title__title { color: var(--white) !important; }
#id4 .sec-title__divider { background: var(--red); }

/* Filter buttons — sobre fondo oscuro */
#filters {
  margin-bottom: 36px;
}

#filters .btn {
  background-color: transparent;
  color: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(255,255,255,0.2);
  margin: 4px;
  font-size: 11px;
  padding: 9px 24px;
  border-radius: 30px;
  transition: var(--transition);
  letter-spacing: 0.08em;
}

#filters .btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

#filters .btn.is-checked,
#filters .btn:focus {
  background-color: var(--red);
  border-color: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(192,57,43,0.4);
}

/* Project cards */
.element-item .card {
  border: none;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: var(--transition);
  margin-top: 20px !important;
  background: var(--dark2);
}

.element-item .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
}

.element-item .card-body {
  padding: 0;
}

.element-item .card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85) !important;
  padding: 11px 14px;
  margin: 0;
  background: var(--dark2);
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.element-item .card:hover .card-title {
  border-left-color: var(--red);
  color: var(--white) !important;
  padding-left: 18px;
}

/* Overlay de proyectos — reemplaza logo por efecto limpio */
.team__img {
  position: relative;
  display: block;
  overflow: hidden;
}

.team__img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.element-item .card:hover .team__img img {
  transform: scale(1.08);
}

.team__overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(192,57,43,0.5) 60%,
    rgba(0,0,0,0.1) 100%
  ) !important;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px;
}

/* Ocultar el logo blanco del overlay */
.team__overlay img {
  display: none !important;
}

/* Línea decorativa roja en el overlay */
.team__overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 0.4s ease;
}

.element-item .card:hover .team__overlay::after {
  width: 100%;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer-01 {
  background-color: var(--black);
}

.footer-01__widget {
  background-color: var(--dark);
  padding-top: 70px;
  padding-bottom: 50px;
  border-top: 3px solid var(--red);
}

.footer-01 .sec-title__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white) !important;
  text-transform: uppercase;
}

.footer-01 .sec-title__divider {
  background: var(--red);
  width: 32px;
  height: 2px;
}

.footer-01 p,
.footer-01 a {
  color: rgba(255,255,255,0.55) !important;
  font-size: 13.5px;
  line-height: 1.8;
}

.footer-01 a:hover { color: var(--red-light) !important; }

/* Widget tags */
.widget-tag a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55) !important;
  border-color: rgba(255,255,255,0.15) !important;
  border-radius: var(--radius);
  padding: 6px 12px;
  transition: var(--transition);
}

.widget-tag a:hover {
  background-color: var(--red) !important;
  border-color: var(--red) !important;
  color: var(--white) !important;
}

/* Contact widget */
.widget-contact__title { color: var(--red-light) !important; }

.widget-contact__item {
  color: rgba(255,255,255,0.55) !important;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.widget-contact__item a { color: rgba(255,255,255,0.55) !important; }
.widget-contact__item a:hover { color: var(--red-light) !important; }

/* Social icons in footer */
.footer-01 .fa-instagram,
.footer-01 .fa-facebook {
  color: var(--red-light);
  margin-right: 6px;
}

/* Social buttons footer — solo logos, estilo minimalista */
.footer-social {
  display: flex;
  flex-direction: row;
  gap: 14px;
  margin-top: 12px;
}

.footer-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  text-decoration: none !important;
  transition: var(--transition);
}

.footer-social__btn i {
  font-size: 18px;
  line-height: 1;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  transition: color .3s ease;
}

/* Hover: se rellena con el color de la marca */
.footer-social__btn:hover {
  transform: translateY(-3px);
  border-color: transparent;
}

.footer-social__btn:hover i { color: #fff; }

.footer-social__btn--ig:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 6px 16px rgba(220,39,67,0.4);
}

.footer-social__btn--fb:hover {
  background: #1877F2;
  box-shadow: 0 6px 16px rgba(24,119,242,0.4);
}

/* Copyright */
.copyright-01 {
  background-color: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 0;
}

.copyright-01__copy {
  color: rgba(255,255,255,0.3) !important;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* ── Scroll Reveal Animations ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Stats bar (entre Nosotros y Servicios) ─────────────────── */
.stats-bar {
  background: linear-gradient(90deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 40px 0;
}

.stat-item {
  text-align: center;
  padding: 10px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px;
  font-weight: 800;
  color: var(--red-light);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  display: block;
}

/* ── Scroll to top ──────────────────────────────────────────── */
#back-to-top,
.back-to-top {
  background-color: var(--red) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  box-shadow: 0 4px 16px rgba(192,57,43,0.4) !important;
  transition: var(--transition) !important;
}

#back-to-top:hover,
.back-to-top:hover {
  background-color: var(--red-dark) !important;
  transform: translateY(-3px) !important;
}

/* ── MOBILE — Tablet 768px ──────────────────────────────────── */
@media (max-width: 991px) {

  /* Hero */
  .hero__wrapper    { min-height: 480px; }
  .hero__inner      { padding: 110px 0 70px; }
  .hero__title      { font-size: 40px !important; }
  .hero__desc       { font-size: 15px !important; max-width: 100%; }

  /* Sections */
  .md-section       { padding-top: 60px !important; padding-bottom: 60px !important; }
  .sec-title__title { font-size: 28px !important; }

  /* Stats — 2 columnas */
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 16px 10px;
  }
  .stat-item:last-child { border-bottom: none; }
  .stat-number { font-size: 42px; }

  /* Servicios — 2 columnas */
  .services__img img { height: 180px; }

  /* Proyectos — 2 columnas */
  .element-item { width: 50% !important; }
  .team__img img { height: 170px; }

  /* CTA */
  .cta-02 { padding: 24px 0; }
  .cta-02__title { font-size: 15px !important; margin-bottom: 12px; }
  .cta-02 .md-text-right { text-align: left !important; }

  /* Footer */
  .footer-01__widget { padding-top: 50px; padding-bottom: 30px; }
}

/* ── MOBILE — Smartphone 576px ──────────────────────────────── */
@media (max-width: 575px) {

  /* Header */
  .header__inner    { padding: 12px 0; }
  .header-logo img  { height: 36px; }
  .navbar-toggle    { width: 34px; height: 34px; line-height: 34px; font-size: 14px; }

  /* Hero */
  .hero__wrapper    { min-height: 420px; }
  .hero__inner      { padding: 100px 0 60px; }
  .hero__title      { font-size: 30px !important; line-height: 1.1; margin-bottom: 12px; }
  .hero__desc       { font-size: 14px !important; margin-bottom: 24px; line-height: 1.6; }
  .hero .btn        { padding: 11px 22px; font-size: 11px; }

  /* Swiper arrows — ocultar en mobile, usar swipe */
  .hero .swiper-button-custom { display: none !important; }

  /* Sections */
  .md-section       { padding-top: 48px !important; padding-bottom: 48px !important; }
  .sec-title__title { font-size: 24px !important; }
  .sec-title        { margin-bottom: 20px; }

  /* Stats — 1 columna */
  .stats-bar        { padding: 28px 0; }
  .stat-item        { padding: 14px 0; }
  .stat-number      { font-size: 38px; }
  .stat-label       { font-size: 11px; }

  /* Nosotros */
  #id2 .col-lg-6    { margin-bottom: 24px; }
  #id2 p            { font-size: 14px; }

  /* Servicios — 1 columna */
  .services         { margin-bottom: 16px; }
  .services__img img { height: 160px; }
  .services__title  { font-size: 16px !important; margin: 14px 14px 6px; }
  .services__desc   { font-size: 13px; margin: 0 14px 16px; }

  /* Galería videos — 1 columna */
  #id6 .col-sm-6    { margin-bottom: 16px; }
  #id6 .card-body   { padding: 10px 12px; }
  #id6 .card-title2 { font-size: 14px; }
  #id6 .pt-5        { padding-top: 1.5rem !important; }
  #id6 .pb-5        { padding-bottom: 1.5rem !important; }
  /* Botones prev/next galería — alinear */
  #id6 .col-6.text-right { text-align: center !important; }
  #id6 .col-6:first-child { display: none; }
  #id6 .col-6.text-right { width: 100%; }

  /* Proyectos — 1 columna */
  .element-item     { width: 100% !important; }
  .team__img img    { height: 200px; }
  #filters .btn     { padding: 8px 16px; font-size: 10px; margin: 3px; }

  /* CTA */
  .cta-02           { padding: 20px 0; }
  .cta-02__title    { font-size: 14px !important; text-align: center; margin-bottom: 14px; }
  .cta-02 .col-lg-3 { text-align: center !important; }

  /* Footer */
  .footer-01__widget  { padding-top: 40px; padding-bottom: 24px; }
  .footer-01 .widget  { margin-bottom: 28px; }
  .widget-tag a       { font-size: 10px; padding: 5px 10px; }
  .copyright-01__copy { font-size: 11px; }

  /* Menú mobile — panel y estilos definidos en el bloque autoritativo al final */

  /* Overlay oscuro al abrir menú — ahora gestionado por .nav-overlay */

  /* Botón WhatsApp flotante — espacio */
  .whatsapp-float { bottom: 16px; right: 16px; }
}

/* ============================================================
   MENÚ MÓVIL — Override autoritativo (carga al final)
   Corrige el comportamiento responsive del menú.
   ============================================================ */

/* Hamburguesa: 3 líneas animadas (reemplaza el icono fa) */
.navbar-toggle {
  display: none;
  position: relative;
  top: auto;
  transform: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background-color: var(--red);
  border-radius: var(--radius);
  cursor: pointer;
  z-index: 100001;
  transition: background-color .3s ease;
}

.navbar-toggle:hover { background-color: var(--red-dark); }

.navbar-toggle span {
  display: block;
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease, top .3s ease;
}

.navbar-toggle span:nth-child(1) { top: 14px; }
.navbar-toggle span:nth-child(2) { top: 20px; }
.navbar-toggle span:nth-child(3) { top: 26px; }

/* Hamburguesa → X cuando el menú está abierto */
.page-wrap.active .navbar-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.page-wrap.active .navbar-toggle span:nth-child(2) { opacity: 0; }
.page-wrap.active .navbar-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* Mostrar hamburguesa solo en mobile/tablet */
@media (max-width: 1199px) {
  .navbar-toggle { display: block; }
}

@media (min-width: 1200px) {
  .navbar-toggle { display: none !important; }
  .nav-close-item { display: none !important; }
  .nav-overlay    { display: none !important; }
}

/* Botón cerrar dentro del panel (solo mobile) */
.nav-close-item { display: none; }

.nav-close {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  margin: 4px 16px 8px auto;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background-color: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: background-color .25s ease;
}

.nav-close span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); }
.nav-close span:nth-child(2) { transform: translate(-50%,-50%) rotate(-45deg); }
.nav-close:hover span { background-color: var(--red-light); }

/* Backdrop oscuro */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
  z-index: 100000;
}

.page-wrap.active .nav-overlay { opacity: 1; visibility: visible; }

/* Evitar scroll del body con el menú abierto */
body.nav-open { overflow: hidden; }

/* ── Panel lateral (hasta 1199px) ──────────────────────────── */
@media (max-width: 1199px) {

  /* No empujar el header fuera de pantalla */
  .page-wrap.active .header { left: 0 !important; }

  .nav-close-item { display: block; }

  .raising-nav .raising-menu,
  .raising-nav ul.raising-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 300px !important;
    max-width: 85vw !important;
    height: 100% !important;
    padding: 14px 0 20px 0 !important;
    margin: 0 !important;
    background-color: var(--dark) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    text-align: left !important;
    font-size: 16px !important;
    -webkit-transform: translateX(100%) !important;
            transform: translateX(100%) !important;
    transition: -webkit-transform .38s cubic-bezier(0.4,0,0.2,1),
                        transform .38s cubic-bezier(0.4,0,0.2,1) !important;
    box-shadow: -8px 0 32px rgba(0,0,0,0.4) !important;
    z-index: 100001 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .raising-nav .raising-menu.active,
  .raising-nav ul.raising-menu.active,
  .page-wrap.active .raising-nav .raising-menu {
    -webkit-transform: translateX(0) !important;
            transform: translateX(0) !important;
  }

  .raising-nav .raising-menu > li {
    display: block !important;
    width: 100% !important;
    font-size: 14px !important;
  }

  .raising-nav .raising-menu > li:after { display: none !important; }
  .raising-nav .raising-menu li.nav-close-item:after { display: none !important; }

  .raising-nav .raising-menu a {
    display: block !important;
    padding: 15px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,0.9) !important;
    border-bottom: 1px solid rgba(255,255,255,0.07) !important;
    border-left: 3px solid transparent !important;
    transition: all .25s ease !important;
    white-space: nowrap !important;
  }

  .raising-nav .raising-menu a:hover,
  .raising-nav .raising-menu li.current > a {
    background-color: rgba(192,57,43,0.14);
    color: var(--red-light) !important;
    border-left-color: var(--red);
    padding-left: 30px !important;
  }
}

/* ============================================================
   HERO SLIDER — mejoras (autoplay + fade + paginación)
   ============================================================ */

/* En modo fade los slides se apilan; asegurar altura consistente */
.hero .swiper-slide {
  height: auto;
}

.hero .swiper-slide .hero__wrapper {
  height: 100%;
  background-size: cover;
  background-position: center center;
}

/* Zoom lento de fondo (efecto Ken Burns) en el slide activo */
.hero .swiper-slide-active .hero__wrapper {
  animation: heroZoom 7s ease-out both;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero__wrapper { overflow: hidden; }

/* Paginación — bullets visibles y modernos */
.hero .swiper-pagination-custom {
  display: block !important;
  position: absolute;
  bottom: 28px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 5;
}

.hero .swiper-pagination-bullet {
  width: 11px;
  height: 11px;
  margin: 0 6px;
  background-color: rgba(255,255,255,0.45);
  opacity: 1;
  border-radius: 50%;
  transition: all .35s ease;
  cursor: pointer;
}

.hero .swiper-pagination-bullet.swiper-pagination-bullet-active {
  background-color: var(--red);
  width: 30px;
  border-radius: 6px;
}

/* Flechas — refinar y centrar verticalmente */
.hero .swiper-button-custom > div {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.hero .swiper-button-custom .swiper-button-prev-custom { left: 24px; }
.hero .swiper-button-custom .swiper-button-next-custom { right: 24px; }

.hero .swiper-button-custom > div:hover {
  transform: translateY(-50%) scale(1.08);
}

/* Mostrar flechas en desktop y tablet, ocultar en teléfonos */
@media (min-width: 768px) {
  .hero .swiper-button-custom { display: block !important; }
}

@media (max-width: 767px) {
  .hero .swiper-button-custom { display: none !important; }
  .hero .swiper-pagination-custom { bottom: 20px; }
}

/* ============================================================
   MENÚ MÓVIL v2 — Implementación aislada e independiente
   No depende de .raising-menu ni de reglas de main.css.
   ============================================================ */

/* Botón hamburguesa propio */
.ai-burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background-color: var(--red);
  border-radius: 6px;
  cursor: pointer;
  z-index: 100002;
}
.ai-burger span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s ease;
}
.ai-burger span:nth-child(1) { top: 15px; }
.ai-burger span:nth-child(2) { top: 21px; }
.ai-burger span:nth-child(3) { top: 27px; }
body.ai-nav-open .ai-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.ai-nav-open .ai-burger span:nth-child(2) { opacity: 0; }
body.ai-nav-open .ai-burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Backdrop */
.ai-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 100000;
}
body.ai-nav-open .ai-nav-backdrop { opacity: 1; visibility: visible; }

/* Panel lateral */
.ai-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  max-width: 85vw;
  height: 100%;
  background: #1A1A1A;
  box-shadow: -8px 0 32px rgba(0,0,0,0.45);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
  z-index: 100001;
  display: flex;
  flex-direction: column;
  padding-top: 12px;
  overflow-y: auto;
}
body.ai-nav-open .ai-nav-panel { transform: translateX(0); }

/* Botón cerrar */
.ai-nav-close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  margin: 0 12px 8px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}
.ai-nav-close::before,
.ai-nav-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
}
.ai-nav-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.ai-nav-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.ai-nav-close:hover::before,
.ai-nav-close:hover::after { background: var(--red-light); }

/* Links del panel */
.ai-nav-panel a {
  display: block;
  padding: 16px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid transparent;
  transition: all .25s ease;
}
.ai-nav-panel a:hover,
.ai-nav-panel a.current {
  background: rgba(192,57,43,0.16);
  color: #E74C3C;
  border-left-color: var(--red);
  padding-left: 30px;
}

/* Mostrar/ocultar según viewport */
@media (max-width: 1199px) {
  .ai-burger { display: block; }
  /* Ocultar el menú legacy por completo en mobile */
  .raising-nav .raising-menu,
  .raising-nav ul.raising-menu { display: none !important; }
  .navbar-toggle { display: none !important; }
}
@media (min-width: 1200px) {
  .ai-burger,
  .ai-nav-backdrop,
  .ai-nav-panel { display: none !important; }
  body.ai-nav-open { overflow: auto !important; }
}

body.ai-nav-open { overflow: hidden; }

/* ============================================================
   HERO SLIDER — fix espacio/overflow a la derecha en mobile
   ============================================================ */

.hero,
.hero .swiper-container,
.hero .swiper-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* En modo fade cada slide ocupa el 100% real del viewport */
.hero .swiper-slide {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
}

.hero .swiper-slide .hero__wrapper {
  width: 100% !important;
}

/* Evitar scroll horizontal general en pantallas chicas */
@media (max-width: 991px) {
  html, body { overflow-x: hidden; }
  .page-wrap { overflow-x: hidden; }
}
