/* ==========================================================================
   CiberPIME - Corporate Premium Theme
   Paleta: Blau fosc seguretat + Verd confianca + Vermell alerta
   Estructura neta sense duplicats - 2026-03-02
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* Colors principals */
  --primary: #1a5276;
  --primary-dark: #134161;
  --primary-light: #e3f2fd;
  --secondary: #2ecc71;
  --secondary-dark: #219a52;
  --accent-red: #e74c3c;
  --accent-red-light: #fde8e8;

  /* Neutrals */
  --dark: #0d1117;
  --text: #333333;
  --text-light: #64748b;
  --light-bg: #f6f8fa;
  --card-bg: #ffffff;
  --border: #d1d9e0;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  /* Radis */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Misc */
  --transition: 0.3s ease;
  --max-width: 1200px;
  --content-width: 780px;

  /* Hero & CTA (gradient fosc blau) */
  --hero-from: #0f3d5c;
  --hero-via: #0a2d44;
  --hero-to: #061e30;
  --accent: #38bdf8;
  --cta-btn: #0ea5e9;
  --cta-btn-hover: #0284c7;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--card-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   3. SCROLLBAR & SELECTION
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

::selection { background: var(--primary); color: #fff; }

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 1.5rem; }

/* --------------------------------------------------------------------------
   6. NAVBAR
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar__logo img {
  height: 40px;
  width: auto;
.navbar__brand {
  font-family: "Poppins", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: #0d1117;
  letter-spacing: -0.02em;
  margin-left: 10px;
  white-space: nowrap;
}
.navbar__brand strong {
  font-weight: 700;
  color: #1a5276;
}
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0 40px;
}
.navbar__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.navbar__links a:hover,
.navbar__links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   7. LANG SWITCHER
   -------------------------------------------------------------------------- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f4f4f5;
  border-radius: 6px;
  padding: 2px;
}
.lang-switcher a {
  display: block;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  color: #666;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.lang-switcher a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.lang-switcher a:hover:not(.active) {
  color: #333;
  background: rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   8. HAMBURGER
   -------------------------------------------------------------------------- */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  width: 36px;
  height: 36px;
}
.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   9. MOBILE MENU
   -------------------------------------------------------------------------- */
.navbar__mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.navbar__mobile-menu.open {
  display: flex;
  max-height: 400px;
}
.navbar__mobile-menu a {
  padding: 14px 24px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  color: #333;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.2s;
}
.navbar__mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--primary);
}

.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.mobile-lang a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  background: #f4f4f5;
  color: #555;
  border-bottom: none;
}
.mobile-lang a:hover {
  background: var(--primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   10. HERO V2
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--hero-from) 0%, var(--hero-via) 50%, var(--hero-to) 100%);
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__glow--1 {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  filter: blur(80px);
  animation: glowFloat 8s ease-in-out infinite alternate;
}
.hero__glow--2 {
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.08);
  filter: blur(100px);
  animation: glowFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes glowFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

.hero__grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 80px 32px 88px;
  text-align: center;
  animation: heroEnter 0.7s ease-out;
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.8);
}
.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

/* Title */
.hero__title {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  color: #fff;
}
.hero__highlight {
  position: relative;
  color: rgba(56, 189, 248, 0.9);
}
.hero__highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 2px;
}

/* Subtitle */
.hero__subtitle {
  font-size: 1.18rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
  max-width: 580px;
  margin: 0 auto 40px;
}

/* Actions */
.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.hero__btn--primary {
  background: #fff;
  color: var(--hero-via);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
}
.hero__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.12);
  color: var(--hero-via);
}
.hero__btn--primary svg { transition: transform 0.2s; }
.hero__btn--primary:hover svg { transform: translateX(3px); }

.hero__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.hero__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* --------------------------------------------------------------------------
   11. BUTTONS (generics)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn--primary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn--primary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}
.btn--cta {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn--cta:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   12. CATEGORY PILLS
   -------------------------------------------------------------------------- */
.category-pills {
  padding: 2rem 1.5rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
}
.category-pills__list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.category-pills__list a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.category-pills__list a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   13. SECTIONS
   -------------------------------------------------------------------------- */
.section { padding: 4rem 0; }
.section--alt { background: var(--light-bg); }

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}
.section__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 8px;
}
.section__title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}
.section__subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}
.section__cta {
  text-align: center;
  margin-top: 2.5rem;
}
.section__cta .btn--cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   14. ARTICLE GRID
   -------------------------------------------------------------------------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* --------------------------------------------------------------------------
   15. ARTICLE CARD
   -------------------------------------------------------------------------- */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.article-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.article-card__category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  align-self: flex-start;
  text-decoration: none;
}
.article-card__category:hover { background: var(--primary); color: #fff; }

.article-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--dark);
}
.article-card__title a { color: inherit; text-decoration: none; }
.article-card__title a:hover { color: var(--primary); }

.article-card__excerpt {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.article-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.article-card__dot { color: #ccc; }

.article-card__readmore {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-left: auto;
  text-decoration: none;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.article-card__readmore:hover { gap: 0.6rem; }

/* --------------------------------------------------------------------------
   16. CATEGORIES GRID
   -------------------------------------------------------------------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   17. CATEGORY CARD
   -------------------------------------------------------------------------- */
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}
.category-card__name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--dark);
}
.category-card__desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}
.category-card__arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.1rem;
  color: #ccc;
  transition: all 0.2s;
}
.category-card:hover .category-card__arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   18. NEWSLETTER CTA
   -------------------------------------------------------------------------- */
.cta-newsletter {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: #fff;
  padding: 80px 0;
}

.cta-newsletter__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cta-newsletter__glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.12);
  filter: blur(80px);
}

.cta-newsletter__container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Contingut esquerra */
.cta-newsletter__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 16px;
}
.cta-newsletter__title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #fff;
}
.cta-newsletter__desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

/* Beneficis */
.cta-newsletter__benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-newsletter__benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}
.cta-newsletter__benefits svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* Form wrapper (glassmorphism) */
.cta-newsletter__form-wrapper {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cta-newsletter__input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-newsletter__input {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}
.cta-newsletter__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.cta-newsletter__input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* Boto CTA */
.cta-newsletter__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  background: var(--cta-btn);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.cta-newsletter__btn:hover {
  background: var(--cta-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.cta-newsletter__btn svg { transition: transform 0.2s; }
.cta-newsletter__btn:hover svg { transform: translateX(3px); }

/* Trust */
.cta-newsletter__trust {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}
.cta-newsletter__trust svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
}

/* --------------------------------------------------------------------------
   19. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 0;
}
.footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer a:hover { color: #fff; }

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer__brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.75rem;
}
.footer__brand p,
.footer__text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.footer__col h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer__bottom {
  margin-top: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   20. SINGLE ARTICLE
   -------------------------------------------------------------------------- */

/* Breadcrumbs */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.breadcrumbs a { color: var(--text-light); text-decoration: none; display: inline; margin-bottom: 0; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs__sep { margin: 0 0.15rem; }
.breadcrumbs__current { color: var(--primary); font-weight: 600; }

/* Article header */
.article-header {
  max-width: var(--content-width);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.article-header__category {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  text-decoration: none;
}
.article-header__title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.article-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-light);
}
.article-header__meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Translation notice */
.translation-notice {
  max-width: var(--content-width);
  margin: 0 auto 1.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  font-size: 0.925rem;
}
.translation-notice a { font-weight: 600; display: inline; margin-bottom: 0; }

/* Article layout: content + sidebar */
.article-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

/* Article content (prose) */
.article-content {
  min-width: 0;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}
.article-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--dark);
}
.article-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: var(--dark);
}
.article-content h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--dark);
}
.article-content p { margin-bottom: 1.25rem; }
.article-content ul,
.article-content ol {
  margin: 1rem 0 1.25rem;
  padding-left: 1.75rem;
}
.article-content li { margin-bottom: 0.4rem; }
.article-content strong { color: var(--dark); }
.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}
.article-content code {
  background: var(--light-bg);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-dark);
}
.article-content pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
}
.article-content th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--primary);
}
.article-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tr:hover td { background: var(--light-bg); }

/* TOC Sidebar */
.toc-sidebar { position: sticky; top: 90px; }
.toc-sidebar__inner {
  background: var(--light-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.toc-sidebar__title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
}
.toc-sidebar nav ul { list-style: none; padding: 0; margin: 0; }
.toc-sidebar nav ul ul { padding-left: 1rem; }
.toc-sidebar nav li { margin-bottom: 0.3rem; }
.toc-sidebar nav a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
  border-radius: 4px;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
}
.toc-sidebar nav a:hover,
.toc-sidebar nav a.active {
  color: var(--primary);
  background: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Mobile TOC */
.toc-mobile { display: none; margin: 1rem 0 2rem; }
.toc-mobile__toggle {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toc-mobile__toggle::after {
  content: '\25BC';
  font-size: 0.7rem;
  transition: transform var(--transition);
}
.toc-mobile__toggle.open::after { transform: rotate(180deg); }
.toc-mobile__content {
  display: none;
  padding: 1rem 1.25rem;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.toc-mobile__content.open { display: block; }
.toc-mobile__content ul { list-style: none; padding: 0; margin: 0; }
.toc-mobile__content ul ul { padding-left: 1rem; }
.toc-mobile__content a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: none;
}
.toc-mobile__content a:hover { color: var(--primary); }

/* Disclaimer */
.disclaimer {
  max-width: var(--content-width);
  margin: 2.5rem auto;
  padding: 1.25rem 1.5rem;
  background: var(--accent-red-light);
  border: 1px solid #fecaca;
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}
.disclaimer strong { color: var(--accent-red); }

/* Prev/Next navigation */
.article-nav {
  max-width: var(--content-width);
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.article-nav__item {
  padding: 1.25rem 1.5rem;
  background: var(--light-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
  display: block;
  margin-bottom: 0;
}
.article-nav__item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.article-nav__item--next { text-align: right; }
.article-nav__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}
.article-nav__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   21. LIST PAGE & PAGINATION
   -------------------------------------------------------------------------- */
.page-header {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
}
.page-header__title { font-size: 2.25rem; margin-bottom: 0.5rem; }
.page-header__badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.page-header__desc {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 2rem 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}
.pagination a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   22. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
  .toc-mobile { display: block; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Navbar */
  .navbar__links { display: none; }
  .navbar__hamburger { display: flex; }

  /* Hero */
  .hero__container { padding: 56px 24px 64px; }
  .hero__title { font-size: 2.3rem; }
  .hero__subtitle { font-size: 1.05rem; margin-bottom: 32px; }
  .hero__glow--1 { width: 350px; height: 350px; }
  .hero__glow--2 { width: 300px; height: 300px; }

  /* Grids */
  .article-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }

  /* Single article */
  .article-header__title { font-size: 1.75rem; }
  .article-header__meta { gap: 0.75rem; font-size: 0.85rem; }
  .article-content { font-size: 1rem; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__item--next { text-align: left; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer__brand { grid-column: 1 / -1; }

  /* Newsletter */
  .cta-newsletter { padding: 56px 0; }
  .cta-newsletter__container { grid-template-columns: 1fr; gap: 32px; padding: 0 20px; }
  .cta-newsletter__title { font-size: 1.7rem; }
  .cta-newsletter__form-wrapper { padding: 28px 24px; }

  /* Sections & misc */
  .page-header__title { font-size: 1.75rem; }
  .section__title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  /* Navbar */
  .navbar__container { padding: 0 12px; height: 40px; }
  .navbar__logo img { height: 30px; }
  .lang-switcher a { padding: 4px 8px; font-size: 0.75rem; }
  .container { padding-left: 16px; padding-right: 16px; }

  /* Hero */
  .hero__container { padding: 40px 16px 52px; }
  .hero__title { font-size: 1.85rem; letter-spacing: -0.02em; }
  .hero__subtitle { font-size: 0.95rem; line-height: 1.65; }
  .hero__badge { font-size: 0.75rem; padding: 5px 14px; margin-bottom: 24px; }
  .hero__btn { padding: 11px 22px; font-size: 0.9rem; width: 100%; justify-content: center; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; }

  /* Newsletter */
  .cta-newsletter { padding: 40px 0; }
  .cta-newsletter__container { padding: 0 16px; }
  .cta-newsletter__title { font-size: 1.4rem; }
  .cta-newsletter__desc { font-size: 0.95rem; }
  .cta-newsletter__form-wrapper { padding: 24px 20px; }
  .cta-newsletter__input { padding: 14px 16px; }
  .cta-newsletter__btn { padding: 14px 20px; }
}

/* ==========================================================================
   VISUAL POLISH - Appended rules (no modifiquen les existents)
   ========================================================================== */

/* -- Breadcrumbs chevron -------------------------------------------------- */
.breadcrumbs__chevron {
  flex-shrink: 0;
  color: var(--text-light);
  opacity: 0.5;
  vertical-align: middle;
}
/* Amagar el sep antic si existeix (compatibilitat) */
.breadcrumbs__sep { display: none; }

/* -- Article header meta amb SVG icons ------------------------------------ */
.article-header__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.article-header__meta-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.article-header__meta-sep {
  color: #ccc;
  margin: 0 2px;
  user-select: none;
}

/* -- Linia separadora entre header i contingut ---------------------------- */
.article-header__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0 0;
  opacity: 0.6;
}

/* -- Translation notice amb icona SVG ------------------------------------ */
.translation-notice {
  display: flex;
  align-items: center;
  gap: 8px;
}
.translation-notice__icon {
  flex-shrink: 0;
  opacity: 0.7;
}

/* -- Disclaimer amb icona info i layout flex ------------------------------ */
.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.disclaimer__icon {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.7;
}
.disclaimer__text {
  flex: 1;
}

/* -- Article card polish: border-top + hover millorat --------------------- */
.article-card {
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  border-top-color: var(--accent, var(--secondary));
}

/* -- Category badge amb fons semitransparent ------------------------------ */
.article-card__category {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

/* -- Article card meta amb separador net ---------------------------------- */
.article-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-card__meta-sep {
  color: #ccc;
  margin: 0 2px;
  user-select: none;
}

/* -- Readmore amb fletxa SVG animada -------------------------------------- */
.article-card__readmore {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-card__readmore svg {
  transition: transform 0.2s ease;
}
.article-card__readmore:hover svg {
  transform: translateX(3px);
}

/* -- Article nav labels amb SVG icons ------------------------------------- */
.article-nav__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-nav__label svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* -- Paginacio amb SVG en lloc d'entitats HTML ---------------------------- */
.pagination a svg,
.pagination span svg {
  vertical-align: middle;
}

/* === CARD THUMBNAILS === */
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.article-card__thumb {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, #1a5276 0%, #0f3d5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.article-card__thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.25) 0%, transparent 50%);
  opacity: 0.6;
}
.article-card__thumb-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.7);
  transition: transform 0.3s ease;
}
.article-card__thumb-icon svg {
  width: 100%;
  height: 100%;
}
.article-card:hover .article-card__thumb-icon {
  transform: scale(1.1);
  color: rgba(255,255,255,0.9);
}
.article-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Responsive thumb */
@media (max-width: 480px) {
  .article-card__thumb {
    height: 80px;
  }
  .article-card__thumb-icon {
    width: 32px;
    height: 32px;
  }
}
