/* =============================================
   Reflusa Mecanitzats SA — Shared Styles
   ============================================= */

/* ---- VARIABLES ---- */
:root {
  --red: #C0202A;
  --red-dark: #8B0F17;
  --red-light: #E53540;
  --gray-dark: #1A1A1A;
  --gray-mid: #2E2E2E;
  --gray-steel: #4A4A4A;
  --gray-light: #8A8A8A;
  --gray-line: #DADADA;
  --gray-bg: #F4F3F1;
  --white: #FFFFFF;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--gray-dark); background: var(--white); overflow-x: hidden; }

/* ---- LANG BAR ---- */
#lang-bar {
  background: var(--gray-dark);
  padding: 8px 0;
  position: sticky; top: 0; z-index: 1000;
}
#lang-bar .inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
}
.lang-btn {
  background: none; border: 1px solid #555; color: #AAA;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; padding: 4px 12px; cursor: pointer;
  transition: all 0.2s; text-transform: uppercase;
}
.lang-btn.active, .lang-btn:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* ---- NAVBAR ---- */
nav {
  background: var(--white); border-bottom: 3px solid var(--red);
  position: sticky; top: 37px; z-index: 999;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  width: 42px; height: 42px; background: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 26px; height: 26px; fill: white; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-main { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--gray-dark); letter-spacing: 0.04em; text-transform: uppercase; }
.logo-sub { font-family: var(--font-body); font-size: 10px; font-weight: 400; color: var(--gray-light); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links a {
  display: block; padding: 0 18px; height: 68px; line-height: 68px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-steel);
  text-decoration: none; transition: all 0.2s;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); border-bottom-color: var(--red); background: rgba(192,32,42,0.04); }
.nav-cta { background: var(--red) !important; color: var(--white) !important; padding: 0 22px !important; border-bottom: none !important; }
.nav-cta:hover { background: var(--red-dark) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gray-dark); transition: all 0.3s; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block; background: var(--red); color: var(--white);
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 32px;
  text-decoration: none; border: 2px solid var(--red); transition: all 0.2s;
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--white);
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 32px;
  text-decoration: none; border: 2px solid rgba(255,255,255,0.3); transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }

/* ---- FOOTER (base) ---- */
footer { background: var(--gray-dark); border-top: 3px solid var(--red); }

/* Footer - subpages (compact) */
.footer-compact { max-width: 1200px; margin: 0 auto; padding: 28px 2rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.3); }
.footer-links-row { display: flex; gap: 20px; }
.footer-links-row a { font-size: 13px; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.footer-links-row a:hover { color: white; }

/* ---- RESPONSIVE — NAV ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-top: 1px solid var(--gray-line);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .nav-links.open a {
    height: auto; line-height: 1; padding: 16px 2rem;
    border-bottom: 1px solid var(--gray-line) !important;
  }
  .nav-cta { background: var(--red) !important; }
  nav { position: relative; top: 0; }
  #lang-bar { position: relative; top: 0; }
}

@media (max-width: 600px) {
  /* Footer compacte en mòbil */
  .footer-compact { padding: 24px 1.25rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* Nav inner padding */
  .nav-inner { padding: 0 1.25rem; }
  #lang-bar .inner { padding: 0 1.25rem; }
}
