/* =============================================
   JOTA.CAT - CSS GLOBAL
   Junts Ordenem el Teu Abast
   ============================================= */

/* VARIABLES GLOBALS */
:root {
  --blau-nit: #0D1B2A;
  --blau-reial: #1e55af;
  --blau-reial-light: #259BFF;
  --blanc: #ffffff;
  --gris-suau: #e8ecf2;
  --gris-text: #454E5F;
}

/* RESET BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background-color: var(--blanc);
  color: var(--blau-nit);
  line-height: 1.6;
}

/* Bloquejar scroll quan off-canvas obert */
body.nav-open {
  overflow: hidden;
}

/* =============================================
   NAVEGACIÓ
   ============================================= */
nav {
  font-family: 'Inter', sans-serif;
  background-color: var(--blau-nit);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-logo span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--blanc);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  color: var(--blanc);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-cta {
  font-family: 'Inter', sans-serif;
  background-color: var(--blau-reial);
  color: var(--blanc);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.nav-cta:hover {
  background-color: var(--blau-reial-light);
}

/* =============================================
   BURGER TOGGLE (només mòbil)
   ============================================= */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
}

.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--blanc);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animació burger → X */
.nav-burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger.active span:nth-child(2) {
  opacity: 0;
}

.nav-burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   OFF-CANVAS MENU
   ============================================= */
.nav-offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 25em;
  max-width: 100%;
  height: 100vh;
  background-color: var(--blau-nit);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 250;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.nav-offcanvas.active {
  transform: translateX(0);
}

/* Botó tancar off-canvas */
.nav-offcanvas-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-offcanvas-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-offcanvas-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--blanc);
  stroke-width: 2;
}

.nav-offcanvas-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-offcanvas-links a {
  font-family: 'Inter', sans-serif;
  color: var(--blanc);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
  transition: color 0.2s, padding-left 0.2s;
}

.nav-offcanvas-links a:hover {
  color: var(--blau-reial-light);
  padding-left: 0.5rem;
}

.nav-offcanvas-cta {
  margin-top: 2rem;
}

.nav-offcanvas-cta a {
  font-family: 'Inter', sans-serif;
  background-color: var(--blau-reial);
  color: var(--blanc);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.2s;
}

.nav-offcanvas-cta a:hover {
  background-color: var(--blau-reial-light);
}

/* Overlay darrere off-canvas */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 200;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =============================================
   RESPONSIVE NAVEGACIÓ (≤767px)
   ============================================= */
@media (max-width: 767px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-offcanvas {
    width: 100%;
  }
}

/* Tablets: off-canvas 25em */
@media (min-width: 480px) and (max-width: 767px) {
  .nav-offcanvas {
    width: 25em;
  }
}

/* =============================================
   BOTONS GLOBALS
   ============================================= */
.btn-primary {
  font-family: 'Inter', sans-serif;
  background-color: var(--blau-reial);
  color: var(--blanc);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--blau-reial-light);
}

.btn-secondary {
  font-family: 'Inter', sans-serif;
  background-color: transparent;
  color: var(--blanc);
  padding: 1rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s, background-color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--blanc);
  background-color: rgba(255,255,255,0.05);
}

.btn-white {
  font-family: 'Inter', sans-serif;
  background-color: var(--blanc);
  color: var(--blau-reial);
  padding: 1rem 2.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* =============================================
   TÍTOLS DE SECCIÓ (reutilitzables)
   ============================================= */
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--blau-nit);
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.15rem;
  color: var(--gris-text);
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background-color: var(--blau-nit);
  padding: 3rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo svg {
  height: 32px;
  width: auto;
}

.footer-logo span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--blanc);
  letter-spacing: 0.05em;
}

.footer-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.footer-text a {
  color: var(--gris-suau);
}

.footer-tagline {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.15rem;
  color: var(--blau-reial-light);
  font-style: bold;
}

/* =============================================
   RESPONSIVE GLOBAL
   ============================================= */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}