/* =============================================
   NAV + FOOTER + WHATSAPP — compartido por landings
   Extraído de styles-prymax.css para uso en
   herreria.html, proyectos.html, pintura.html
   sin cargar estilos del index completo.
   ui-ux-pro-max: navigation-consistency, critical-css
   ============================================= */

/* WhatsApp flotante */
#whatsapp {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: block;
  z-index: 9999;
}
#whatsapp img {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0px 0px 2px rgba(0,0,0,0.3));
}

/* ——— FOOTER ——— */
footer {
  float: left;
  width: 100%;
  background-color: #29292b;
  padding: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 300;
  color: #EDEDED;
  letter-spacing: 0;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 20px 60px;
}
.footer-brand img {
  margin-bottom: 20px;
  display: block;
}
.footer-brand p {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 20px;
}
.footer-bottom p {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.03em;
}

/* ——— NAV STICKY ——— */
.main-nav {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #222;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo { display: flex; align-items: center; margin-right: auto; }
.nav-logo img { width: 110px; height: auto; }

/* ——— Desktop nav links wrapper ——— */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* touch target mínimo 44px */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  min-height: 44px;
  text-decoration: none;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link:focus-visible {
  color: #fff;
  outline: 2px solid #0034CC;
  outline-offset: 2px;
}

.nav-cta {
  background: #0034CC;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 28px;
  white-space: nowrap;
  transition: background 0.2s ease;
  margin-left: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: none;
  text-decoration: none;
}
.nav-cta:hover { background: #0028a8; }
.nav-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ——— Desktop dropdown ——— */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 8px;
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 101;
}
.nav-dropdown-menu.is-open { display: block; }

.nav-dd-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  min-height: 44px;
}
.nav-dd-item:hover { background: #252525; color: #fff; }
.nav-dd-item:focus-visible {
  outline: 2px solid #0034CC;
  outline-offset: -2px;
  color: #fff;
}
.nav-dd-item[aria-current="page"] {
  color: #fff;
  background: #252525;
  font-weight: 500;
}

/* ——— Hamburger — oculto en desktop ——— */
.nav-hamburger { display: none; }

/* ——— Mobile overlay — FUERA del nav en el HTML ——— */
/* (Evita el stacking context creado por backdrop-filter del nav) */
/* ——— Animación slide-in — frontend-design: motion conveys meaning ——— */
@keyframes navMobileIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#nav-mobile {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  z-index: 200;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}
#nav-mobile.is-open {
  display: flex;
  animation: navMobileIn 0.22s ease-out both;
}

.nav-mob-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 22px 20px 8px;
  margin: 0;
}

.nav-mob-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 52px;
  transition: background 0.15s ease;
}
.nav-mob-item:hover,
.nav-mob-item:active { background: rgba(255,255,255,0.05); }
.nav-mob-item:focus-visible { outline: 2px solid #0034CC; outline-offset: -2px; }

.nav-mob-item--service {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  padding-left: 20px;
  gap: 10px;
}
.nav-mob-item--service::before {
  content: "→";
  color: #0034CC;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-mob-item--active {
  color: #fff;
  font-weight: 500;
}
.nav-mob-item--active::before { content: "•"; }

.nav-mob-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 20px;
  flex-shrink: 0;
}

.nav-mob-footer {
  margin-top: auto;
  padding: 20px 20px 0;
  flex-shrink: 0;
}

.nav-mob-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0034CC;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 28px;
  text-decoration: none;
  min-height: 52px;
  transition: background 0.2s ease;
}
.nav-mob-cta:hover { background: #0028a8; }
.nav-mob-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ——— Mobile breakpoint ——— */
@media (max-width: 767px) {
  .nav-logo img { width: 90px; }
  .nav-cta { display: none; }
  .nav-desktop { display: none; }

  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 44px;
    padding: 12px 10px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
  }
  .nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .nav-hamburger:focus-visible { outline: 2px solid #0034CC; border-radius: 4px; }

  /* Scroll lock iOS-safe */
  body.nav-open { position: fixed; width: 100%; overflow-y: scroll; }
  body.nav-open #whatsapp { display: none; }
}

@media (min-width: 768px) {
  .nav-hamburger { display: none; }
  #nav-mobile { display: none !important; }
}

/* ——— Footer responsive ——— */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media only screen and (max-width: 767px) {
  #whatsapp { right: 15px; bottom: 15px; }
  #whatsapp img { width: 55px; height: 55px; }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 50px 20px 40px;
  }
  .footer-brand { text-align: center; }
  .footer-col h4,
  .footer-col ul li a { text-align: left; }
}
