/* =========================
   VARIABLES
========================= */
:root {
  --primary: #0A1C3E;
  --secondary: #7E8994;
  --accent: #4DD052;
  --light-gray: #C0C4C8;
  --white: #FFFFFF;

  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --shadow-soft: 0 10px 25px rgba(0,0,0,0.08);
  --shadow-strong: 0 15px 40px rgba(0,0,0,0.15);

  --header-height: 75px;
}

/* =========================
   RESET
========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 15px);
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--primary);
  line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* =========================
   GENERALES
========================= */
.container { max-width: 1200px; margin: auto; padding: 0 20px; }

section { padding: 90px 0; }

.section-title { text-align: center; margin-bottom: 60px; }

.section-title h2 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
}

.section-title p {
  color: var(--secondary);
  margin-top: 10px;
  font-size: 1.1rem;
}

/* =========================
   HEADER
========================= */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(10, 28, 62, 0.95);
  box-shadow: var(--shadow-soft);
  transition: background 0.3s ease;
}

header.scrolled { background: rgba(10, 28, 62, 0.98); }

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.3rem;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 10px rgba(77, 208, 82, 0.6));
}

.logo-text { font-size: 1.5rem; font-weight: 700; }
.logo-text span { color: var(--accent); }
.logo-subtitle { font-size: 0.75rem; opacity: 0.8; }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover { color: var(--accent); }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 10px;       /* tap target más grande */
  line-height: 1;
  transition: transform 0.3s ease;
}

.mobile-menu-btn:hover { color: var(--accent); }

.mobile-menu-btn i { transition: transform 0.3s ease; }
.mobile-menu-btn.is-open i { transform: rotate(90deg); }

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  background: url('../img/hero/imagen.gif') center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 62, 0.82);
  z-index: 1;
}

.hero .container { position: relative; z-index: 2; }

.hero-content { max-width: 650px; color: var(--white); }

.hero-content h1 {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 700;
}

.hero-content h1 span { color: var(--accent); }

.hero-content p {
  margin: 25px 0;
  font-size: 1.15rem;
  color: var(--light-gray);
}

.cta-button {
  display: inline-block;
  padding: 14px 35px;
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: 30px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

/* =========================
   SERVICIOS (ICONOS BASE)
========================= */
.services { background: #f7f8fa; }

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--primary);
  color: var(--white);
}

.security-bg    { background: var(--primary); color: var(--white); }
.cleaning-bg    { background: var(--accent);  color: var(--primary); }
.maintenance-bg { background: #4b5563;        color: var(--white); }
.logistics-bg   { background: #1e3a8a;        color: var(--white); }
.technology-bg  { background: #111827;        color: var(--white); }

.service-content h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.service-content p { color: var(--secondary); }

/* =========================
   CARRUSEL DE SERVICIOS
========================= */
.services-carousel { position: relative; width: 100%; }

.services-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.services-viewport::-webkit-scrollbar { display: none; }

.services-viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.services-viewport.is-dragging .service-card { pointer-events: none; }

.services-grid { display: flex; gap: 30px; width: max-content; }

.service-card {
  background: var(--white);
  border-radius: 15px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
  min-width: 320px;
  max-width: 320px;
  flex-shrink: 0;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
}

.services-carousel,
.services-carousel * { user-select: none; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(10, 28, 62, 0.9);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.carousel-btn:hover { background: var(--accent); color: var(--primary); }
.carousel-btn:active { transform: translateY(-50%) scale(0.92); }
.carousel-btn.prev { left: -28px; }
.carousel-btn.next { right: -28px; }

/* =========================
   FILOSOFÍA
========================= */
.philosophy-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.philosophy-text h2 {
  font-family: var(--font-title);
  font-size: 2.3rem;
  margin-bottom: 20px;
}

.philosophy-text h3 { margin-top: 25px; font-size: 1.3rem; }
.philosophy-text p { color: var(--secondary); margin-top: 10px; }

.values-list { list-style: none; margin-top: 20px; }
.values-list li { margin-bottom: 10px; color: var(--primary); }
.values-list i { color: var(--accent); margin-right: 8px; }

/* =========================
   CUBO 3D – FILOSOFÍA
========================= */
.cube-animation {
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.animated-cube {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 18s linear infinite;
}

.cube-side {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.front-side  { transform: translateZ(70px); }
.back-side   { transform: rotateY(180deg) translateZ(70px); }
.right-side  { transform: rotateY(90deg)  translateZ(70px); }
.left-side   { transform: rotateY(-90deg) translateZ(70px); }
.top-side    { transform: rotateX(90deg)  translateZ(70px); }
.bottom-side { transform: rotateX(-90deg) translateZ(70px); }

@keyframes rotateCube {
  from { transform: rotateX(0deg)   rotateY(0deg);   }
  to   { transform: rotateX(360deg) rotateY(360deg); }
}

/* =========================
   CONTACTO
========================= */
.contact { background: #f7f8fa; }

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info p { margin-bottom: 15px; color: var(--secondary); }
.contact-info i { color: var(--accent); margin-right: 10px; }
.contact-info a { color: var(--primary); text-decoration: none; }
.contact-info a:hover { color: var(--accent); }

.contact-socials { margin-top: 25px; display: flex; gap: 15px; }

.contact-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  border-bottom: none;
  transition: background 0.3s, transform 0.3s, color 0.3s;
}

.contact-socials a:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-3px);
}

/* =========================
   FOOTER
========================= */
footer {
  background: var(--primary);
  color: var(--light-gray);
  padding: 30px 0;
  text-align: center;
}
/* =========================
   UBICACIÓN / MAPA PREMIUM
========================= */

.location {
  background:
    linear-gradient(
      to bottom,
      #f7f8fa 0%,
      #ffffff 100%
    );

  padding: 110px 0;
}

/* contenedor */
.location-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* tarjeta principal */
.map-wrapper {
  position: relative;

  width: 100%;
  max-width: 1200px;

  border-radius: 24px;
  overflow: hidden;

  box-shadow:
    0 25px 60px rgba(0,0,0,0.18);

  border: 1px solid rgba(255,255,255,0.7);

  aspect-ratio: 16 / 7;

  background:
linear-gradient(
  135deg,
  rgba(255,255,255,0.95),
  rgba(240,240,240,0.75)
);
}

/* mapa */
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;

  filter:
    saturate(1.05)
    contrast(1.02)
    brightness(0.95);

  transition: transform 0.5s ease;
}
.map-wrapper::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.18),
      rgba(255,255,255,0.02)
    );

  z-index: 1;
  pointer-events: none;
}
/* zoom elegante */
.map-wrapper:hover iframe {
  transform: scale(1.02);
}

/* overlay oscuro premium */
.map-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 40px;

  background:
    linear-gradient(
      to top,
      rgba(10, 28, 62, 0.88) 0%,
      rgba(10, 28, 62, 0.15) 45%,
      rgba(10, 28, 62, 0.00) 70%
    );

  z-index: 2;
}

/* texto overlay */
.map-overlay h3 {
  color: var(--white);
  font-family: var(--font-title);
  font-size: 2rem;
  margin-bottom: 8px;

  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.map-overlay p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin-bottom: 24px;
}

/* botón */
.map-cta {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 14px 28px;

  background: var(--accent);
  color: var(--primary);

  font-weight: 700;
  text-decoration: none;

  border-radius: 999px;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.2);

  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

/* hover botón */
.map-cta:hover {
  background: var(--white);
  color: var(--primary);

  transform: translateY(-4px);

  box-shadow:
    0 18px 35px rgba(0,0,0,0.28);
}

/* icono */
.map-cta i {
  font-size: 1rem;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {

  .map-wrapper {
    aspect-ratio: 16 / 9;
  }

  .map-overlay {
    padding: 30px;
  }

  .map-overlay h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {

  .location {
    padding: 90px 0;
  }

  .map-wrapper {
    border-radius: 18px;
    aspect-ratio: 1 / 1;
  }

  .map-overlay {
    padding: 24px;
  }

  .map-overlay h3 {
    font-size: 1.3rem;
  }

  .map-overlay p {
    font-size: 0.95rem;
  }

  .map-cta {
    width: 100%;
    justify-content: center;
  }
}
/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .philosophy-content,
  .contact-container { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .logo-img { height: 36px; }
  .logo-subtitle { display: none; } /* opcional: oculta el subtítulo en móvil */

  .mobile-menu-btn { display: block; }

  /* Menú oculto por defecto en móvil con animación */
  .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 28, 62, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    gap: 0;
    text-align: center;
    box-shadow: var(--shadow-soft);

    /* animación: oculto por defecto */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  
      /* UBICACIÓN en móvil */
  .map-wrapper { aspect-ratio: 4 / 5; }   /* más alto que ancho en móvil */
  .map-cta {
    bottom: 12px;
    right: 12px;
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  }

  /* Menú visible al activarse */
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-menu li:last-child { border-bottom: none; }

  .nav-menu a {
    display: block;
    padding: 16px 20px;     /* tap target grande */
    font-size: 1.05rem;
  }

  .nav-menu a:hover,
  .nav-menu a:active {
    background: rgba(77, 208, 82, 0.1);
    color: var(--accent);
  }

  .carousel-btn.prev { left: 5px; }
  .carousel-btn.next { right: 5px; }
}