/* ============================================================
   FUNDACIÓ HOSPITAL JOAN XXIII — Fulla d'estils
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  --color-primary: #0A4C6B;
  --color-primary-dark: #063349;
  --color-primary-light: #3B82A4;
  --color-accent: #0D9488;
  --color-accent-light: #14B8A6;
  --color-bg: #F4F7F9;
  --color-white: #FFFFFF;
  --color-text: #1E293B;
  --color-text-light: #64748B;
  --color-text-white: #F1F5F9;
  --color-border: #E2E8F0;
  --color-overlay: rgba(6, 51, 73, 0.65);
  --color-success: #16A34A;
  --color-error: #DC2626;

  --font-heading: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-nav: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --max-width: 1200px;
  --max-width-narrow: 800px;
  --transition: 0.3s ease;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-dark);
}
h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-primary-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: var(--color-text); }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--color-primary); color: #fff;
  padding: 0.5rem 1rem; z-index: 10000; border-radius: var(--radius);
}
.skip-link:focus { top: 0.5rem; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex; align-items: center; justify-content: flex-start;
  max-width: var(--max-width); margin: 0 auto;
  padding: 0.75rem 1.5rem; min-height: 72px;
}

.logo {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-heading); font-weight: 700;
  font-size: 1.2rem; color: var(--color-primary-dark);
  line-height: 1.3;
}
.logo img { height: 48px; width: auto; }
.logo span { display: block; }
.logo .logo-sub { font-size: 0.7rem; font-weight: 400; color: var(--color-text-light); font-family: var(--font-body); }

/* --- Placeholder logo --- */
.logo-placeholder {
  width: 140px; height: 48px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem; font-weight: 700;
}

/* --- Nav --- */
.main-nav {
  margin-left: auto;
}
.main-nav ul {
  display: flex; gap: 0.25rem;
}
.main-nav a {
  position: relative;
  display: block; padding: 0.5rem 1rem;
  font-family: var(--font-nav);
  font-size: 14px; line-height: normal;
  font-weight: 500;
  text-align: left;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: color var(--transition), transform 0.25s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-primary);
  transform: translateY(-1px);
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px; z-index: 1001;
}
.hamburger span {
  display: block; width: 26px; height: 2px;
  background: var(--color-primary-dark);
  transition: var(--transition); border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* --- Language Switcher --- */
.lang-switcher {
  display: flex; align-items: center; gap: 6px;
  margin-left: 0.5rem;
}

.lang-link {
  display: inline-flex; align-items: center;
  padding: 3px; border-radius: 4px;
  opacity: 0.55;
  transition: opacity var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}

.lang-link:hover,
.lang-link:focus-visible {
  opacity: 0.85;
  box-shadow: 0 0 0 2px rgba(10, 76, 107, 0.3);
}

.lang-link.active {
  opacity: 1;
  border-color: var(--color-primary);
  cursor: default;
}

.lang-link img {
  display: block; width: 20px; height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.carousel {
  position: relative; width: 100%; height: 560px; overflow: hidden;
  background: var(--color-primary-dark);
}

.carousel__slides { position: relative; width: 100%; height: 100%; }

.carousel__slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.8s ease;
  display: flex; align-items: center; justify-content: center;
}
.carousel__slide.active { opacity: 1; z-index: 1; }

.carousel__bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; z-index: 0;
}
.carousel__slide::after {
  content: ''; position: absolute; inset: 0;
  background: var(--color-overlay); z-index: 1;
}

.carousel__content {
  position: relative; z-index: 2; text-align: center;
  color: var(--color-white); max-width: 700px;
  padding: 2rem;
}
.carousel__content h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--color-white); margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.btn {
  display: inline-block; padding: 0.75rem 2rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition);
  text-align: center; line-height: 1.4;
}
.btn--primary {
  background: var(--color-accent); color: var(--color-white);
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: var(--color-white);
}
.btn--outline {
  background: transparent; color: var(--color-white);
  border-color: var(--color-white);
}
.btn--outline:hover {
  background: var(--color-white); color: var(--color-primary-dark);
}

/* Carousel controls */
.carousel__controls {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.75rem; z-index: 3;
}
.carousel__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.4); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel__dot:hover { background: rgba(255,255,255,0.7); }
.carousel__dot.active { background: var(--color-white); transform: scale(1.3); }

.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; background: rgba(255,255,255,0.15); border: none;
  color: var(--color-white); width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.carousel__arrow:hover { background: rgba(255,255,255,0.3); }
.carousel__arrow--prev { left: 1.5rem; }
.carousel__arrow--next { right: 1.5rem; }

/* Placeholder backgrounds for slides */
.slide-bg-1 { background: linear-gradient(135deg, #1a3a5c, #0D9488); }
.slide-bg-2 { background: linear-gradient(135deg, #0A4C6B, #3B82A4); }
.slide-bg-3 { background: linear-gradient(135deg, #063349, #14B8A6); }
.slide-bg-4 { background: linear-gradient(135deg, #1e4a3c, #0A6B5C); }

/* ============================================================
   SECTIONS — Generals
   ============================================================ */
.section {
  padding: 5rem 0;
}
.section--light { background: var(--color-bg); }
.section--dark {
  background: var(--color-primary-dark);
  color: var(--color-text-white);
}
.section--primary {
  background: var(--color-primary);
  color: var(--color-text-white);
}

.section__header {
  text-align: center; margin-bottom: 3rem;
}
.section__header h2 {
  margin-bottom: 0.75rem;
}
.section__subtitle {
  font-size: 1.1rem; color: var(--color-text-light);
  max-width: 600px; margin: 0 auto;
}
.section--dark .section__subtitle,
.section--primary .section__subtitle {
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   BLOC 2 — Text Presentació
   ============================================================ */
.presentacio {
  text-align: center;
  padding: 5rem 1.5rem;
}
.presentacio__text {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 400; line-height: 1.7;
  max-width: 820px; margin: 0 auto;
  color: var(--color-text);
}

/* ============================================================
   BLOC 3 — Bloc d'icones (anchor projectes)
   ============================================================ */
.icones {
  position: relative;
  background: var(--color-primary-dark);
  background-image:
    linear-gradient(var(--color-overlay), var(--color-overlay)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
  background-size: auto, 60px 60px;
  padding: 5rem 0;
  color: var(--color-text-white);
}

.icones__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.icones__card {
  text-align: center;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition);
}
.icones__card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.14);
}
.icones__icon {
  width: 72px; height: 72px; margin: 0 auto 1.25rem;
  background: rgba(255,255,255,0.15);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.icones__icon svg { width: 36px; height: 36px; fill: var(--color-white); }
.icones__card h3 {
  font-size: 1.15rem; color: var(--color-white); margin-bottom: 0.6rem;
}
.icones__card p {
  font-size: 0.95rem; color: rgba(255,255,255,0.8); line-height: 1.6;
}

/* ============================================================
   BLOC 4 — Xifres
   ============================================================ */
.xifres__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}
.xifres__item {
  padding: 2rem 1.5rem;
  position: relative;
}
.xifres__item::after {
  content: '';
  position: absolute; right: 0; top: 15%; height: 70%;
  width: 1px; background: rgba(255,255,255,0.2);
}
.xifres__item:last-child::after { display: none; }
.xifres__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700; color: var(--color-white);
  line-height: 1.1; margin-bottom: 0.5rem;
}
.xifres__label {
  font-size: 0.95rem; color: rgba(255,255,255,0.75);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.xifres__note {
  text-align: center; margin-top: 2rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.55);
  font-style: italic;
}

/* ============================================================
   BLOC 5 — Mòdul de text + destacat
   ============================================================ */
.text-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.text-module__body {
  font-size: 1.05rem; color: var(--color-text); line-height: 1.8;
}
.text-module__destacat {
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  padding: 2rem 1.75rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.text-module__destacat p {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-style: italic; font-weight: 700;
  color: var(--color-primary);
  line-height: 1.5;
}

/* ============================================================
   BLOC 6 — Simulació Clínica
   ============================================================ */
.simulacio-preview {
  position: relative;
  background: var(--color-primary-dark);
  overflow: hidden;
}
.simulacio-preview__bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0A4C6B, #063349);
  background-image:
    linear-gradient(var(--color-overlay), var(--color-overlay)),
    url('../img/foto_simulacio.JPG');
  background-size: cover; background-position: center;
  z-index: 0;
}

.simulacio-preview__content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 3rem;
  max-width: var(--max-width); margin: 0 auto;
  padding: 4rem 1.5rem;
}
.simulacio-preview__text {
  flex: 1; color: var(--color-white);
}
.simulacio-preview__text h2 {
  color: var(--color-white); margin-bottom: 0.75rem;
}
.simulacio-preview__text p {
  font-size: 1.1rem; color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}
.simulacio-preview__image {
  flex: 1; min-width: 300px;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.simulacio-preview__image .placeholder-img {
  width: 100%; aspect-ratio: 16/10;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); font-size: 1rem;
}
.simulacio-preview__img {
  width: 100%; height: auto; display: block;
  object-fit: cover; aspect-ratio: 16/10;
}

/* ============================================================
   BLOC 7 — La palanca del coneixement
   ============================================================ */
.palanca__intro {
  text-align: center; max-width: 700px; margin: 0 auto 3rem;
  font-size: 1.1rem; color: var(--color-text); line-height: 1.8;
}
.palanca__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.palanca__box {
  text-align: center; padding: 2rem 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.palanca__box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.palanca__box-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  background: var(--color-bg);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.palanca__box-icon svg { width: 32px; height: 32px; fill: var(--color-primary); }
.palanca__box h3 {
  font-size: 1.1rem; color: var(--color-primary-dark);
}

/* ============================================================
   BLOC 8 — Contacte
   ============================================================ */
.contacte__form {
  max-width: 640px; margin: 0 auto;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1rem;
}
.form__field { margin-bottom: 1.25rem; }
.form__field label {
  display: block; font-weight: 700; font-size: 0.9rem;
  margin-bottom: 0.35rem; color: var(--color-text);
}
.form__field input,
.form__field textarea {
  width: 100%; padding: 0.75rem 1rem;
  font-family: var(--font-body); font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form__field input:focus,
.form__field textarea:focus {
  outline: none; border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,164,0.15);
}
.form__field textarea { min-height: 140px; resize: vertical; }
.form__field .optional { font-weight: 400; color: var(--color-text-light); }
.form__field .required { color: var(--color-error); }
.form__submit {
  text-align: center; margin-top: 1.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-text-white);
  font-size: 0.95rem;
}
.footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 4rem 0 3rem;
}
.footer__brand h3 {
  color: var(--color-white); font-size: 1.3rem; margin-bottom: 0.75rem;
}
.footer__brand p { color: rgba(255,255,255,0.7); margin-bottom: 0.4rem; }
.footer__brand a { color: rgba(255,255,255,0.7); }
.footer__brand a:hover { color: var(--color-white); }
.footer__links h4 {
  color: var(--color-white); font-size: 1rem; margin-bottom: 1rem;
  font-family: var(--font-body);
}
.footer__links ul li { margin-bottom: 0.5rem; }
.footer__links ul li a {
  color: rgba(255,255,255,0.7); font-size: 0.9rem;
}
.footer__links ul li a:hover { color: var(--color-white); }

.footer__social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.footer__social a:hover { background: rgba(255,255,255,0.25); }
.footer__social svg { width: 20px; height: 20px; fill: var(--color-white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}
.footer__bottom a { color: rgba(255,255,255,0.5); }
.footer__bottom a:hover { color: var(--color-white); }

/* ============================================================
   SIMULACIÓ CLÍNICA — Pàgina
   ============================================================ */
.page-banner {
  background: var(--color-primary);
  padding: 3.5rem 0;
  text-align: center;
  color: var(--color-white);
}
.page-banner h1 {
  color: var(--color-white); margin: 0;
}

.page-content {
  padding: 4rem 0;
}
.page-content .container > * + * { margin-top: 2rem; }
.page-content h2 {
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
}
.page-content h3 {
  margin-bottom: 0.5rem;
}
.page-content h4 {
  line-height: 1.7; font-weight: 400;
}

.destacat-box {
  background: var(--color-bg);
  border-left: 5px solid var(--color-accent);
  padding: 2rem 2.5rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 2rem 0;
}
.destacat-box p {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-style: italic; font-weight: 700;
  color: var(--color-primary);
  line-height: 1.5;
}

.page-content ul:not(.list-unstyled) {
  padding-left: 1.5rem; list-style: disc;
  margin: 1rem 0;
}
.page-content ul:not(.list-unstyled) li {
  margin-bottom: 0.5rem; line-height: 1.6;
}
.page-content ul:not(.list-unstyled) li::marker {
  color: var(--color-accent);
}

.page-content .placeholder-img--wide {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  border-radius: var(--radius-lg); display: flex;
  align-items: center; justify-content: center;
  color: var(--color-text-light); font-size: 1rem;
  margin: 2rem 0;
}

.download-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent); color: var(--color-white);
  border-radius: var(--radius); font-weight: 700;
  transition: background var(--transition);
}
.download-link:hover { background: var(--color-accent-light); color: var(--color-white); }
.download-link svg { width: 20px; height: 20px; fill: var(--color-white); }

.page-content .section-divider {
  border: none; border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* Form dins pàgina interior */
.page-content .contacte__form {
  margin-top: 2rem;
}

.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
.btn--ghost {
  background: transparent; color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-bg); color: var(--color-text);
}

/* ============================================================
   BLOG / SIMULACIÓ CLÍNICA — Galeria i elements visuals
   ============================================================ */
.blog-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}
.blog-gallery__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  display: block;
}

.blog-img {
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.blog-img img {
  width: 100%;
  height: auto;
  display: block;
}
.blog-img--wide {
  aspect-ratio: 16/9;
}
.blog-img--wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.feature-card {
  padding: 2rem 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-accent);
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-card h3 {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.section-heading {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.page-content h3 {
  margin-top: 2.5rem;
  color: var(--color-primary-dark);
}

/* ============================================================
   UTILITY: Placeholder images
   ============================================================ */
.placeholder-img {
  background: linear-gradient(135deg, #CBD5E1, #94A3B8);
  display: flex; align-items: center; justify-content: center;
  color: #64748B; font-size: 0.9rem; font-weight: 500;
  border-radius: var(--radius);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .carousel { height: 440px; }

  .icones__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .palanca__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .text-module {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .simulacio-preview__content {
    flex-direction: column;
    text-align: center;
  }
  .simulacio-preview__image { min-width: unset; max-width: 500px; }
  .footer__main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .blog-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-header { position: relative; }

  .hamburger { display: flex; }

  .lang-switcher { margin-left: auto; margin-right: 0.5rem; }

  .main-nav {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav.open { max-height: 300px; }
  .main-nav ul {
    flex-direction: column; padding: 0.75rem 1.5rem;
  }
  .main-nav a {
    padding: 0.75rem 1rem; border-radius: var(--radius);
  }

  .carousel { height: 360px; }
  .carousel__arrow { display: none; }

  .icones__grid { grid-template-columns: 1fr; max-width: 400px; }

  .xifres__grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .xifres__item:nth-child(even)::after { display: none; }
  .xifres__item:nth-child(-n+2)::before {
    content: ''; position: absolute; bottom: 0; left: 20%; width: 60%;
    height: 1px; background: rgba(255,255,255,0.2);
  }
  .xifres__item { padding: 1.75rem 1.25rem; }
  .xifres__item::after { top: 20%; height: 60%; }
  .palanca__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

  .form__row { grid-template-columns: 1fr; }

  .footer__main { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }

  .simulacio-preview__content { padding: 3rem 1.5rem; }
}

@media (max-width: 480px) {
  .carousel { height: 300px; }
  .xifres__grid { grid-template-columns: 1fr; gap: 0; }
  .xifres__item::after { display: none; }
  .xifres__item { padding: 1.5rem 1rem; }
  .section { padding: 3rem 0; }
  .blog-gallery { grid-template-columns: 1fr; }
  .feature-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1; transform: translateY(0);
}

/* Form feedback */
.form__feedback {
  margin-top: 1rem; text-align: center;
  font-weight: 700; padding: 0.75rem; border-radius: var(--radius);
  display: none;
}
.form__feedback.success {
  display: block; background: #DCFCE7; color: var(--color-success);
}
.form__feedback.error {
  display: block; background: #FEE2E2; color: var(--color-error);
}
