:root {
  --azul-principal: #1f5eff;
  --azul-secundario: #4da3ff;

  --dark-bg: #081120;
  --dark-card: rgba(255, 255, 255, 0.08);
  --dark-text: #ffffff;

  --light-bg: #f5f8fb;
  --light-card: #ffffff;
  --light-text: #111827;

  --border-glass: rgba(255, 255, 255, 0.15);

  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-light: 0 6px 18px rgba(0, 0, 0, 0.08);

  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  transition: var(--transition);
  line-height: 1.6;
}

/* =========================
   DARK MODE
========================= */

body.dark-mode {
  background: var(--dark-bg);
  color: var(--dark-text);
}

/* =========================
   LIGHT MODE
========================= */

body.light-mode {
  background: var(--light-bg);
  color: var(--light-text);
}

/* =========================
   HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(12px);
  background: rgba(8, 17, 32, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar {
  width: 90%;
  max-width: 1300px;
  margin: auto;
  padding: 14px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  width: 190px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 22px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--azul-secundario);
}

/* =========================
   TOGGLE BUTTON
========================= */

.theme-toggle {
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.08);
}

/* =========================
   HERO
========================= */

.hero {
  min-height: 100vh;

  background:
    linear-gradient(rgba(8,17,32,0.75), rgba(8,17,32,0.75)),
    url("../img/portada/portada.jpg");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  display: flex;
  align-items: center;
}

.hero-content {
  width: 90%;
  max-width: 900px;
  margin: auto;
}

.hero h1 {
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero p {
  font-size: 22px;
  max-width: 700px;
  margin-bottom: 35px;
}

/* =========================
   BUTTONS
========================= */

.hero-buttons,
.contact-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: bold;
  transition: var(--transition);
}

.btn-primary {
  background: var(--azul-principal);
  color: white;
}

.btn-primary:hover {
  background: var(--azul-secundario);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid white;
  color: white;
}

.btn-secondary:hover {
  background: white;
  color: black;
}

/* =========================
   EXPERIENCE BOX
========================= */

.experience {
  margin-top: 40px;

  background: rgba(255,255,255,0.08);

  border: 1px solid var(--border-glass);

  backdrop-filter: blur(10px);

  width: fit-content;

  padding: 18px 26px;

  border-radius: 20px;

  box-shadow: var(--shadow-dark);
}

.experience strong {
  font-size: 42px;
  display: block;
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 90px 0;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: auto;
}

h2 {
  font-size: 42px;
  margin-bottom: 30px;
}

/* =========================
   TWO COLUMNS
========================= */

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

/* =========================
   GLASS CARDS
========================= */

.card-highlight,
.card,
.service-card,
.gallery-placeholder {
  background: var(--dark-card);

  border: 1px solid var(--border-glass);

  backdrop-filter: blur(12px);

  border-radius: 24px;

  box-shadow: var(--shadow-dark);

  transition: var(--transition);
}

.card-highlight:hover,
.card:hover,
.service-card:hover {
  transform: translateY(-6px);
}

.card-highlight {
  padding: 40px;
  text-align: center;
}

.card-highlight img {
  width: 180px;
  margin-bottom: 20px;
}

.card-highlight h3 {
  margin-bottom: 12px;
}

/* =========================
   GRID
========================= */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card,
.service-card {
  padding: 30px;
}

.card {
  text-align: center;
  font-weight: bold;
}

.service-card h3 {
  margin-bottom: 12px;
}

/* =========================
   GALLERY
========================= */

.gallery-placeholder {
  min-height: 260px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
}

/* =========================
   MAP
========================= */

.map-box iframe {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: 24px;
}

/* =========================
   FOOTER
========================= */

.footer {
  padding: 30px;
  text-align: center;
  background: #050b14;
}

/* =========================
   LIGHT MODE OVERRIDES
========================= */

body.light-mode .header {
  background: rgba(255,255,255,0.75);
}

body.light-mode .nav-links a {
  color: black;
}

body.light-mode .theme-toggle {
  background: rgba(0,0,0,0.08);
  color: black;
}

body.light-mode .card-highlight,
body.light-mode .card,
body.light-mode .service-card,
body.light-mode .gallery-placeholder {
  background: white;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow-light);
}

body.light-mode .btn-secondary {
  border: 2px solid black;
  color: black;
}

body.light-mode .btn-secondary:hover {
  background: black;
  color: white;
}

body.light-mode .footer {
  background: #e5e7eb;
  color: black;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

  .hero h1 {
    font-size: 48px;
  }

  .grid {
    grid-template-columns: repeat(2,1fr);
  }

  .two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {

  .navbar {
    flex-direction: column;
    gap: 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 34px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

body.dark-mode .section-light {
  background: #0d1b2f;
}

body.light-mode .section-light {
  background: #eef3f8;
}

body.dark-mode h2 {
  color: #ffffff;
}

body.light-mode h2 {
  color: #123e7a;
}

body.dark-mode p {
  color: #e5e7eb;
}

body.light-mode p {
  color: #111827;
}

/* =========================
   NAVBAR DINÁMICA
========================= */

.header {
  transition: all 0.35s ease;
}

.navbar {
  transition: all 0.35s ease;
}

.logo {
  width: 210px;
  transition: all 0.35s ease;
}

/* Navbar compacta al hacer scroll */

.header.scrolled {
  background: rgba(8, 17, 32, 0.96);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.header.scrolled .navbar {
  padding: 5px 0;
}

.header.scrolled .logo {
  width: 70px;
}

/* Light mode */

body.light-mode .header.scrolled {
  background: rgba(255,255,255,0.96);
}

/* =========================
   BOTÓN SCROLL TOP
========================= */

.scroll-top-btn {

  position: fixed;

  bottom: 30px;
  right: 30px;

  width: 55px;
  height: 55px;

  border: none;
  border-radius: 50%;

  background: rgba(31, 94, 255, 0.9);

  color: white;

  font-size: 24px;
  font-weight: bold;

  cursor: pointer;

  backdrop-filter: blur(10px);

  box-shadow: 0 8px 24px rgba(0,0,0,0.35);

  opacity: 0;
  visibility: hidden;

  transform: translateY(20px);

  transition: all 0.3s ease;

  z-index: 9999;
}

.scroll-top-btn.show {

  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

.scroll-top-btn:hover {

  transform: scale(1.08);

  background: var(--azul-secundario);
}

/* =========================
   GALERÍA
========================= */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 35px;
}

.filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 11px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--azul-principal);
  color: white;
  transform: translateY(-2px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.gallery-item {
  height: 260px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item.hide {
  display: none;
}

.video-social-box {
  margin-top: 50px;
  padding: 35px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(12px);
}

.video-social-box h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

.video-social-box p {
  margin-bottom: 25px;
}

/* Light mode galería */

body.light-mode .filter-btn {
  background: white;
  color: #123e7a;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .filter-btn:hover,
body.light-mode .filter-btn.active {
  background: var(--azul-principal);
  color: white;
}

body.light-mode .gallery-item,
body.light-mode .video-social-box {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-light);
}

/* Responsive galería */

@media (max-width: 1000px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .gallery-item {
    height: 320px;
  }

  .gallery-filters {
    justify-content: center;
  }

  .filter-btn {
    flex: 1 1 auto;
  }
}

.gallery-item {
  height: auto;
}

.gallery-item img {
  height: 230px;
}

.gallery-caption {
  padding: 16px;
}

.gallery-caption h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.gallery-caption p {
  font-size: 14px;
  opacity: 0.85;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.image-modal.show {
  display: flex;
  flex-direction: column;
}

.image-modal img {
  max-width: 90%;
  max-height: 78vh;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

.modal-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: white;
  font-size: 42px;
  cursor: pointer;
}

.modal-caption {
  color: white;
  text-align: center;
  margin-top: 18px;
  font-size: 18px;
}

/* =========================
   WHATSAPP FLOTANTE
========================= */

.whatsapp-float {
  position: fixed;
  bottom: 100px;
  right: 30px;

  width: 58px;
  height: 58px;

  border-radius: 50%;

  background: #25d366;
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 28px;
  font-weight: bold;

  text-decoration: none;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

  z-index: 9999;

  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  background: #1ebe5d;
}

.whatsapp-float::after {
  content: "Cotizar";
  position: absolute;
  right: 70px;

  background: rgba(8, 17, 32, 0.95);
  color: white;

  padding: 8px 14px;
  border-radius: 20px;

  font-size: 14px;
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;

  transition: all 0.3s ease;
}

.whatsapp-float:hover::after {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .whatsapp-float {
    bottom: 95px;
    right: 20px;

    width: 54px;
    height: 54px;

    font-size: 26px;
  }

  .whatsapp-float::after {
    display: none;
  }
}

/* =========================
   LIGHTBOX PREMIUM
========================= */

.image-modal {

  display: none;

  position: fixed;

  inset: 0;

  z-index: 10000;

  background: rgba(0,0,0,0.92);

  backdrop-filter: blur(12px);

  align-items: center;
  justify-content: center;

  flex-direction: column;

  padding: 30px;
}

.image-modal.show {
  display: flex;
}

.image-modal img {

  max-width: 92%;
  max-height: 78vh;

  border-radius: 24px;

  box-shadow: 0 12px 40px rgba(0,0,0,0.45);

  animation: modalZoom 0.25s ease;
}

@keyframes modalZoom {

  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {

  position: absolute;

  top: 20px;
  right: 35px;

  font-size: 44px;

  color: white;

  cursor: pointer;

  transition: 0.3s ease;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-caption {

  margin-top: 20px;

  color: white;

  text-align: center;

  max-width: 700px;

  font-size: 18px;

  line-height: 1.5;
}

/* =========================
   FLECHAS
========================= */

.modal-nav {

  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 58px;
  height: 58px;

  border: none;

  border-radius: 50%;

  background: rgba(255,255,255,0.1);

  color: white;

  font-size: 28px;

  cursor: pointer;

  backdrop-filter: blur(10px);

  transition: all 0.3s ease;
}

.modal-nav:hover {

  background: rgba(255,255,255,0.2);

  transform: translateY(-50%) scale(1.08);
}

.modal-prev {
  left: 30px;
}

.modal-next {
  right: 30px;
}

/* MOBILE */

@media (max-width: 700px) {

  .modal-nav {

    width: 48px;
    height: 48px;

    font-size: 22px;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }

  .modal-close {
    right: 20px;
  }
}

/* =========================
   ANIMACIONES SCROLL
========================= */

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: all 0.8s ease;
}

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

/* =========================
   LOADER INICIAL
========================= */

.loader {
  position: fixed;
  inset: 0;
  background: #081120;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader img {
  width: 150px;
  animation: loaderPulse 1.4s infinite ease-in-out;
}

.loader.hide {
  opacity: 0;
  visibility: hidden;
}

@keyframes loaderPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* =========================
   MENÚ MÓVIL
========================= */

.menu-toggle {
  display: none;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.08);
}

body.light-mode .menu-toggle {
  background: rgba(0,0,0,0.08);
  color: black;
}

@media (max-width: 700px) {
  .navbar {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 12px;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 82px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 90%;
    padding: 22px;
    border-radius: 22px;
    background: rgba(8, 17, 32, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  body.light-mode .nav-links {
    background: rgba(255,255,255,0.96);
  }

  .theme-toggle {
    justify-self: end;
  }

  .logo {
    width: 145px;
  }

  .header.scrolled .logo {
    width: 58px;
  }
}
@media (max-width: 700px) {
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed !important;
    top: 90px;
    left: 50%;
    width: 90%;
    transform: translateX(-50%) translateY(-20px);
    padding: 22px;
    border-radius: 22px;
    background: rgba(8, 17, 32, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
    flex-direction: column;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
  }

  .nav-links.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0);
  }
}

/* =========================
   PARALLAX RESPONSIVE
========================= */

@media (max-width: 900px) {
  .hero {
    background-attachment: scroll;
  }
}

/* =========================
   PRODUCTOS MARQUEE
========================= */

.products-marquee {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

.products-marquee::before,
.products-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 90px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.products-marquee::before {
  left: 0;
  background: linear-gradient(to right, #0d1b2f, transparent);
}

.products-marquee::after {
  right: 0;
  background: linear-gradient(to left, #0d1b2f, transparent);
}

body.light-mode .products-marquee::before {
  background: linear-gradient(to right, #eef3f8, transparent);
}

body.light-mode .products-marquee::after {
  background: linear-gradient(to left, #eef3f8, transparent);
}

.products-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: scrollProducts 35s linear infinite;
}

.products-marquee:hover .products-track {
  animation-play-state: paused;
}

.product-pill {
  min-width: max-content;
  padding: 18px 28px;
  border-radius: 40px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-glass);
  color: white;
  font-weight: bold;
  box-shadow: var(--shadow-dark);
  backdrop-filter: blur(10px);
}

body.light-mode .product-pill {
  background: white;
  color: #123e7a;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow-light);
}

@keyframes scrollProducts {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

