/* ═══════════════════════════════════════════════════════
   TOSAMA Ingeniería — Shared Styles
═══════════════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: #1a1a1a; background: #fff; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Variables ─── */
:root {
  --teal:       #1a3a6b;
  --teal-dark:  #122d56;
  --teal-light: rgba(26,58,107,.1);
  --dark:       #111;
  --gray-light: #f5f5f5;
  --gray-mid:   #666;
  --nav-h:      72px;
}

/* ══════════════════════════════
   NAV
══════════════════════════════ */
header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  height: var(--nav-h); display: flex; align-items: center;
  transition: background .35s, box-shadow .35s;
  background: transparent;
}
header.scrolled {
  background: #fff;
  box-shadow: 0 2px 14px rgba(0,0,0,.1);
}
nav {
  max-width: 1280px; margin: 0 auto;
  padding: 0 28px; width: 100%;
  display: flex; align-items: center; gap: 28px;
}
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  /* Logo sobre fondo oscuro (header transparente): se muestra blanco */
  filter: brightness(0) invert(1);
  transition: filter .3s;
}
header.scrolled .logo-img {
  /* Logo sobre fondo blanco (scrolled): muestra colores originales */
  filter: none;
}

.nav-links { display: flex; gap: 24px; list-style: none; margin-left: auto; }
.nav-links a {
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.88);
  position: relative; padding-bottom: 4px; transition: color .2s; white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 0; height: 2px;
  background: #fff; transition: width .3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: #fff; }
header.scrolled .nav-links a { color: var(--dark); }
header.scrolled .nav-links a::after { background: var(--teal); }
header.scrolled .nav-links a:hover,
header.scrolled .nav-links a.active { color: var(--teal); }

.nav-cta {
  background: var(--teal) !important; color: #fff !important;
  padding: 9px 20px; border-radius: 4px;
  font-weight: 700 !important; transition: background .2s !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }
.nav-cta::after { display: none !important; }

.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.7);
  padding: 4px 8px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,.3); transition: .2s;
}
.lang-switch a.active, .lang-switch a:hover {
  background: var(--teal); color: #fff; border-color: var(--teal);
}
header.scrolled .lang-switch a { color: var(--gray-mid); border-color: #ddd; }
header.scrolled .lang-switch a.active { background: var(--teal); color: #fff; border-color: var(--teal); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; margin-left: 12px; background: none; border: none; padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: #fff;
  border-radius: 2px; transition: background .3s;
  display: block;
}
header.scrolled .nav-toggle span { background: var(--dark); }

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 36px; border-radius: 4px;
  font-weight: 700; font-size: .88rem; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; border: none;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-teal  { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); box-shadow: 0 6px 20px rgba(26,58,107,.35); }
.btn-white { background: #fff; color: var(--teal); }
.btn-white:hover { background: #e0f7fa; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.btn-outline {
  background: transparent; color: #fff;
  border: 2px solid #fff;
}
.btn-outline:hover { background: #fff; color: var(--dark); }
.btn-outline-teal {
  background: transparent; color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-outline-teal:hover { background: var(--teal); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #333; box-shadow: 0 6px 20px rgba(0,0,0,.3); }

/* ══════════════════════════════
   SECTION COMMONS
══════════════════════════════ */
section { padding: 96px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-label {
  display: block; font-size: .73rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.65rem, 3.2vw, 2.6rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 20px;
}
.section-subtitle { font-size: 1.05rem; color: var(--gray-mid); max-width: 640px; line-height: 1.75; }

/* ══════════════════════════════
   SCROLL REVEAL
══════════════════════════════ */
.reveal        { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s ease; }
.reveal-left   { opacity: 0; transform: translateX(-44px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right  { opacity: 0; transform: translateX(44px);  transition: opacity .7s ease, transform .7s ease; }
.reveal-scale  { opacity: 0; transform: scale(.94);        transition: opacity .6s ease, transform .6s ease; }
.reveal.visible, .reveal-left.visible,
.reveal-right.visible, .reveal-scale.visible {
  opacity: 1; transform: none;
}
/* stagger delay helpers */
.d1 { transition-delay: .08s !important; }
.d2 { transition-delay: .16s !important; }
.d3 { transition-delay: .24s !important; }
.d4 { transition-delay: .32s !important; }
.d5 { transition-delay: .40s !important; }

/* ══════════════════════════════
   PAGE HERO (subpages)
══════════════════════════════ */
.page-hero {
  height: 400px; position: relative;
  display: flex; align-items: flex-end;
  padding: 0 24px 60px;
  margin-top: var(--nav-h);
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.38);
}
.page-hero-content { position: relative; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-hero-content .section-title { color: #fff; margin-bottom: 0; }

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 16px 24px; background: var(--gray-light);
  font-size: .82rem; color: var(--gray-mid);
}
.breadcrumb .bc-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--teal); }
.breadcrumb .sep { opacity: .5; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer { background: #0d0d0d; color: rgba(255,255,255,.55); padding: 72px 24px 32px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-logo {
  font-size: 2.1rem; font-weight: 900; letter-spacing: -1.5px;
  color: #fff; margin-bottom: 18px; display: block;
}
.footer-logo span { color: var(--teal); }
.footer-brand p  { font-size: .9rem; line-height: 1.8; }
.footer-contact  { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.footer-contact a { color: rgba(255,255,255,.55); transition: color .2s; }
.footer-contact a:hover { color: var(--teal); }
.footer-col h4 {
  color: #fff; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: .88rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--teal); padding-left: 4px; }
.footer-col ul li a { transition: color .2s, padding-left .2s; }

.footer-socials { display: flex; gap: 10px; margin-top: 24px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.55);
  transition: background .2s, transform .2s;
}
.social-btn:hover { background: var(--teal); color: #fff; transform: translateY(-3px); }

.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.3); margin-left: 18px; }
.footer-bottom a:hover { color: var(--teal); }

/* ══════════════════════════════
   FLOATING WHATSAPP
══════════════════════════════ */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 300;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  animation: wa-pulse 2.8s ease-in-out infinite;
  transition: transform .25s;
}
.wa-float:hover { transform: scale(1.12); animation: none; box-shadow: 0 8px 28px rgba(37,211,102,.6); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
  50%      { box-shadow: 0 4px 36px rgba(37,211,102,.7);  }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 960px) {
  .nav-links, .lang-switch { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex !important; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; width: 100%;
    background: #fff; padding: 24px 28px; gap: 20px;
    box-shadow: 0 8px 28px rgba(0,0,0,.13);
  }
  .nav-links.open li a { color: var(--dark) !important; font-size: 1rem; }
  .nav-links.open .nav-cta { background: var(--teal) !important; color: #fff !important; text-align: center; border-radius: 4px; padding: 12px 20px !important; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  section { padding: 64px 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero { height: 320px; padding-bottom: 40px; }
  .wa-float { bottom: 18px; right: 18px; width: 52px; height: 52px; }
}
