@import url('https://api.fontshare.com/v2/css?f[]=satoshi@1,900,700,500,301,701,300,501,401,901,400,2&display=swap');

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
  --drab-dark-brown: #2b3014;
  --olive: #918042;
  --white-smoke: #f5f4f5;
  --white: #ffffff;
  --black: #141414;

  /* alturas navbar */
  --nav-h: 90px;
  --nav-h-mobile: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   ESTRUCTURA BASE
   ======================================== */
html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  font-family: "Satoshi", system-ui, sans-serif;
  color: #ffffff;
  overflow-x: hidden;
}

/* HOME: evita “sticky footer” raro en portada */
body.home {
  display: block;
  min-height: auto;
}

/* ========================================
   NAVBAR - BASE (seguro)
   ======================================== */
.custom-navbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 9997;
  background: linear-gradient(90deg, #2B3014 0%, #8E8B42 100%);
  display: flex;
  align-items: center;
}

.navbar-container{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

.navbar-links{
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navbar-links a{
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .08rem;
  text-transform: uppercase;
  transition: opacity .2s ease, transform .2s ease;
}

.navbar-links a:hover{
  opacity: .75;
  transform: translateY(-1px);
}

/* LOGO */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 10000;
}

.custom-navbar .brand img {
  height: 56px;
  width: auto;
  display: block;
}

/* CTA CLIENTE (DESKTOP) */
.navbar-cta {
  display: none;
  align-items: center;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.navbar-cta::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}

/* SELECTOR DE IDIOMA (DESKTOP) */
.navbar-language {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.navbar-language a {
  text-decoration: none;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.navbar-language a:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.navbar-language a.active {
  color: var(--olive);
}

.lang-separator {
  color: white;
  opacity: 0.5;
}

/* BOTÓN HAMBURGUESA */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  z-index: 10000;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.menu-toggle svg {
  display: block;
}

/* OVERLAY DEL MENÚ MÓVIL */
.menu-overlay,
#menuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
  backdrop-filter: blur(5px);
}

.menu-overlay.active,
body.menu-open #menuOverlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* SIDEBAR MENÚ MÓVIL */
.sidebar-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, var(--black), #1a1a1a);
  color: var(--white-smoke);
  padding: 0;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow-y: auto;
}

.sidebar-menu.active {
  right: 0;
}

/* HEADER DEL SIDEBAR */
.sidebar-header {
  background: var(--drab-dark-brown);
  padding: 20px;
  border-bottom: 2px solid var(--olive);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white-smoke);
}

.close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--olive);
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(145, 128, 66, 0.2);
  transform: rotate(90deg);
}

/* CONTENIDO DEL MENÚ */
.menu-content {
  padding: 30px 0;
}

.menu-links {
  list-style: none;
  padding: 0 20px;
  margin: 0;
}

.menu-links li {
  margin: 0;
}

.menu-links a {
  text-decoration: none;
  color: var(--white-smoke);
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  margin: 5px 0;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.menu-links a:hover {
  background: linear-gradient(135deg, var(--olive), #a69047);
  color: var(--white);
  transform: translateX(10px);
  border-color: rgba(245, 244, 245, 0.2);
}

.menu-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--olive), transparent);
  margin: 20px 20px;
}

/* SELECTOR DE IDIOMA EN SIDEBAR */
.language-selector {
  padding: 0 20px;
  margin-top: 20px;
}

.language-title {
  color: var(--olive);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.language-options {
  display: flex;
  gap: 10px;
}

.language-options a {
  color: var(--white-smoke);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--olive);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  background: transparent;
}

.language-options a:hover,
.language-options a.active {
  background: var(--olive);
  color: var(--white);
  transform: scale(1.05);
}

/* OCULTAR NOTICIAS */
.hidden-news-desktop,
.hidden-news-mobile {
  display: none !important;
}

/* ========================================
   HERO - PC (igual a como lo tenías)
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  min-height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
  overflow: hidden;
  background: #000;
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .hero {
    min-height: 56.25vw; /* 16:9 */
  }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  z-index: 0;
  display: block;
}

/* ========================================
   FOOTER
   ======================================== */
footer,
.site-footer {
  flex-shrink: 0;
  margin-top: 0;
  background: linear-gradient(180deg, #2B3014 0%, #8E8B42 100%) !important;
  color: #ffffff !important;
  text-align: center;
  padding: 40px 20px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  font-family: "Satoshi", system-ui, sans-serif !important;
  font-size: 14px;
  width: 100%;
}

footer p,
.site-footer p {
  margin: 0;
  color: #ffffff !important;
}

/* ========================================
   SECCIONES (lo que ya tenías)
   ======================================== */
.values-sectionv {
  padding: 80px 0;
  background-color: var(--white-smoke);
}

.section-titlev {
  color: var(--drab-dark-brown);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 15px;
  position: relative;
}

.title-dividerv {
  height: 3px;
  width: 60px;
  background-color: var(--olive);
  margin-bottom: 30px;
}

.value-cardv {
  background-color: var(--white);
  padding: 35px 30px;
  border-radius: 12px;
  text-align: center;
  height: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.value-cardv:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.value-iconv {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--olive), #a69047);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(145, 128, 66, 0.3);
}

.value-cardv h4 {
  color: var(--drab-dark-brown);
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 700;
}

.value-cardv p {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 769px) {
  .navbar-links { display: flex; }
  .navbar-cta { display: flex; }
  .navbar-language { display: flex; }
  .menu-toggle { display: none; }
}

/* ========================================
   RESPONSIVE - TABLET & MOBILE
   ======================================== */
@media (max-width: 768px) {
  :root {
    --nav-h: var(--nav-h-mobile);
  }

  .custom-navbar {
    height: var(--nav-h-mobile);
  }

  .navbar-container {
    padding: 10px 14px;
    justify-content: space-between;
  }

  .custom-navbar .brand img {
    height: 42px !important;
  }

  .navbar-links {
    display: none;
  }

  .navbar-cta {
    display: none !important;
  }

  .navbar-language {
    display: none;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  /* Sidebar más estrecho */
  .sidebar-menu {
    width: 280px;
    right: -280px;
  }

  .menu-links a {
    font-size: 1rem;
    padding: 12px 15px;
  }

  footer,
  .site-footer {
    padding: 30px 15px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }

  .container {
    padding: 0 15px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE PEQUEÑO
   ======================================== */
@media (max-width: 480px) {
  :root{
    --nav-h-mobile: 60px;
    --nav-h: var(--nav-h-mobile);
  }

  .custom-navbar {
    height: 60px;
  }

  .navbar-container {
    padding: 8px 12px;
  }

  .custom-navbar .brand img {
    height: 38px !important;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .sidebar-menu {
    width: 100vw;
    right: -100vw;
  }
}

/* ========================================
   UTILIDADES
   ======================================== */
#servicios {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

a,
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

body.menu-open {
  overflow: hidden;
}

/* Print */
@media print {
  .custom-navbar,
  .menu-toggle,
  .sidebar-menu,
  .menu-overlay,
  footer {
    position: static;
  }

  .hero-video {
    display: none;
  }

  .hero {
    margin-top: 0;
    min-height: 400px;
  }
}

/* =========================================================
   FIX CLAVE: VIDEO VERTICAL EN MÓVIL SIN CORTAR LADOS
   - El HERO se vuelve “9:16” (alto = ancho * 16/9)
   - Así el video vertical entra completo (sin recortar costados)
   ========================================================= */
@media (max-width: 768px){

  /* El HERO en móvil NO debe ser “vh” (muy alto) porque eso recorta lados.
     Lo amarramos a la proporción vertical (9:16). */
  body.home .hero{
    margin-top: var(--nav-h-mobile);

    /* Altura ideal para video vertical (9:16) */
    height: calc(100vw * (16 / 9));

    /* Pero nunca más alto que la pantalla disponible */
    max-height: calc(100vh - var(--nav-h-mobile));

    /* por si acaso */
    min-height: 0;
    background: #000;
  }

  body.home .hero-video{
    width: 100%;
    height: 100%;
    object-fit: cover;          /* como el contenedor ya es 9:16, no recorta lados */
    object-position: center;    /* ajustable si querés: center 40% etc */
  }
}
