/* =========================================================
   Catalunya Media City — Internal pages
   ========================================================= */

/* ---- Page hero ---- */
.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(140px, 22vh, 240px) var(--gutter) clamp(72px, 10vh, 120px);
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  left: 0;
  top: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
  opacity: .32;
  pointer-events: none;
  will-change: transform;
}
.page-hero__inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero__num {
  font-family: var(--f-mono);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: clamp(20px, 3vh, 32px);
}
.page-hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 24px;
  max-width: 100%;
}
.page-hero__kicker {
  font-size: var(--t-lead);
  color: rgba(250,250,247,.65);
  max-width: 52ch;
  line-height: 1.55;
  margin: 0 0 40px;
}
.page-hero__kicker--cols {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(24px, 4vw, 64px);
}
.page-hero__kicker--cols p { margin: 0; }
@media (max-width: 700px) {
  .page-hero__kicker--cols { grid-template-columns: 1fr; gap: 16px 0; }
}
.page-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(250,250,247,.3);
  padding: 12px 20px;
  border-radius: 999px;
  color: var(--paper);
  transition: border-color .2s, background .2s;
  text-decoration: none;
}
.page-hero__cta:hover {
  border-color: rgba(250,250,247,.7);
  background: rgba(250,250,247,.08);
}
.page-hero__cta svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- Page sections ---- */
.page-section {
  padding: clamp(64px, 9vh, 128px) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-section + .page-section { padding-top: clamp(48px, 7vh, 96px); }
.page-section--dark {
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  padding-left: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
}
.page-section--border { border-top: 1px solid var(--hairline); }
.page-section--light { background: var(--paper-2); max-width: none;
  padding-left: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100vw - var(--max-w)) / 2 + var(--gutter)));
}

/* ---- Section header ---- */
.page-section__num {
  font-family: var(--f-mono);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}
.page-section--dark .page-section__num { color: var(--paper); }
.page-section__title {
  font-family: var(--f-display);
  font-size: var(--t-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 22ch;
}
.page-section__lead {
  font-size: var(--t-lead);
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 0 40px;
}
.page-section--dark .page-section__lead { color: rgba(250,250,247,.65); }
.page-section__body {
  font-size: var(--t-body);
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 64ch;
  margin: 0 0 24px;
}
.page-section--dark .page-section__body { color: rgba(250,250,247,.65); }

.page-side-image {
  margin: 0;
  overflow: hidden;
  background: rgba(250,250,247,.08);
  max-width: 100%;
}
.page-side-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ---- Two-col layout ---- */
.page-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.page-two-col--wide { grid-template-columns: 5fr 4fr; }
.page-two-col--media { grid-template-columns: 1fr 1.3fr; align-items: center; }

/* ---- Feature cards (Formació, Innovació…) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border: 1px solid var(--hairline);
  margin-top: 48px;
}
.feature-card {
  padding: clamp(24px, 3vw, 40px);
  border-right: 1px solid var(--hairline);
}
.feature-card:last-child { border-right: none; }
.feature-card--has-img {
  padding: 0;
  overflow: hidden;
}
.feature-card--has-img > img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.feature-card--has-img .feature-card__body {
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.feature-card__label {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.feature-card__title {
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 12px;
}
.feature-card__text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0;
}

/* ---- Stat block ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--hairline);
  padding-top: 40px;
  margin-top: 40px;
}
.page-section--dark .stat-grid { border-color: rgba(250,250,247,.15); }
.stat__num {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--accent);
}
.stat__label {
  font-family: var(--f-mono);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.5;
}
.page-section--dark .stat__label { color: var(--paper); }

.u-nowrap { white-space: nowrap; }

/* ---- List ---- */
.page-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: var(--t-body);
  line-height: 1.5;
}
.page-section--dark .page-list li { border-color: rgba(250,250,247,.12); }
.page-list li::before {
  content: "–";
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---- Image grid ---- */
.img-grid {
  display: grid;
  gap: 2px;
  margin: 48px 0 0;
}
.img-grid--3 { grid-template-columns: repeat(3, 1fr); }
.img-grid--2 { grid-template-columns: repeat(2, 1fr); }
.img-grid--2-1 { grid-template-columns: 2fr 1fr; }
.img-grid img {
  width: 100%;
  height: clamp(200px, 28vw, 380px);
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform .35s var(--ease);
}
.img-grid img:hover { transform: translateY(-6px); }

/* ---- District visuals ---- */
.district-visuals {
  padding: clamp(28px, 5vw, 72px) var(--gutter);
  background: var(--paper-2);
}
.district-slider {
  max-width: var(--max-w);
  margin: 0 auto;
}
.district-slider__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(24px, 4vw, 44px);
}
.district-slider__head .page-section__title { margin-bottom: 0; }
.district-slider__controls {
  display: flex;
  gap: 10px;
}
.district-slider__arrow {
  width: 46px;
  height: 46px;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: opacity .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.district-slider__arrow:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.district-slider__arrow:disabled {
  opacity: .28;
  cursor: default;
}
.district-slider__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.district-slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 72px) / 4);
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1px;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.district-slider__track:focus { outline: none; }
.district-slider__track::-webkit-scrollbar { display: none; }
.district-slider__item {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  scroll-snap-align: start;
}
.district-slider__item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.district-slider__item img:hover {
  opacity: .92;
  transform: scale(1.025);
}

/* ---- Price table ---- */
.price-table-wrap {
  overflow-x: auto;
  margin-top: 40px;
}
.price-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
}
.price-table th,
.price-table td {
  padding: 16px 20px;
  text-align: left;
  border: 1px solid var(--hairline);
  font-size: 15px;
  vertical-align: top;
}
.price-table thead th {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--paper-2);
  white-space: nowrap;
}
.price-table .pt-cat {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.price-table .pt-label { font-weight: 500; }
.price-table .pt-price {
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.price-notes {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.65;
}
.price-notes p { margin: 0 0 8px; }

/* ---- Contact form ---- */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.form-field--full { grid-column: 1 / -1; }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.form-field input,
.form-field textarea,
.form-field select {
  border: 1px solid var(--hairline-2);
  border-radius: 0;
  padding: 12px 16px;
  font-family: var(--f-body);
  font-size: 15px;
  background: transparent;
  color: var(--ink);
  transition: border-color .2s var(--ease);
  appearance: none;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--ink);
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
}
.form-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.form-check input[type="checkbox"]:checked {
  background: currentColor;
}
.form-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 1.5px solid var(--paper);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.page-section--dark .form-field label { color: rgba(250,250,247,.5); }
.page-section--dark .form-field input,
.page-section--dark .form-field textarea,
.page-section--dark .form-field select {
  color: var(--paper);
  border-color: rgba(250,250,247,.2);
}
.page-section--dark .form-field input:focus,
.page-section--dark .form-field textarea:focus {
  border-color: rgba(250,250,247,.7);
}
.page-section--dark .form-check { color: rgba(250,250,247,.55); }
.page-section--dark .form-check input[type="checkbox"] {
  color: rgba(250,250,247,.7);
}
.page-section--dark .form-check input[type="checkbox"]:checked::after {
  border-color: var(--ink);
}
.form-submit { margin-top: 8px; grid-column: 1 / -1; }
.form-status {
  grid-column: 1 / -1;
  min-height: 1.5em;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}
.form-status--success { color: oklch(0.45 0.11 150); }
.form-status--error { color: oklch(0.52 0.16 28); }
.page-section--dark .form-status { color: rgba(250,250,247,.72); }
.page-section--dark .form-status--success { color: oklch(0.78 0.13 150); }
.page-section--dark .form-status--error { color: oklch(0.74 0.16 38); }
.brevo-admin code {
  border: 1px solid var(--hairline);
  padding: 2px 5px;
  background: var(--paper-2);
}
.brevo-admin__logout { margin-top: 24px; }
.brevo-admin__logout button {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: underline;
}

/* ---- News grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 48px;
}
.news-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.news-card__main { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.news-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--paper-2);
}
.news-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
  display: block;
}
.news-card:hover .news-card__img img { transform: scale(1.04); }
.news-card__body { padding: 20px 0; flex: 1; }
.news-card__date {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  color: var(--ink-4);
  margin-bottom: 8px;
}
.news-card__title {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 500;
  line-height: 1.35;
}
.news-card__video-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 8px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.news-card__video-link svg { width: 13px; height: 13px; fill: currentColor; }
.news-card__video-link:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.news-card__placeholder {
  aspect-ratio: 16/9;
  background: var(--paper-2);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.news-card__placeholder-label {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  color: var(--ink-4);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---- Office / location card ---- */
.offices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}
.office-card {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--hairline);
}
.office-card--has-img {
  padding: 0;
  overflow: hidden;
}
.office-card--has-img .office-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.office-card--has-img .office-card__body {
  padding: clamp(24px, 3vw, 40px);
}
.page-section--dark .office-card { border-color: rgba(250,250,247,.15); }
.office-card__label {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.office-card__title {
  font-size: var(--t-h3);
  font-weight: 500;
  margin: 0 0 16px;
}
.office-card__detail {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-3);
  margin: 0 0 24px;
  white-space: pre-line;
}
.page-section--dark .office-card__detail { color: rgba(250,250,247,.6); }

/* ---- Inline CTA block ---- */
.cta-block {
  margin-top: 48px;
  padding: clamp(32px, 4vw, 56px);
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.page-section--dark .cta-block {
  background: rgba(250,250,247,.06);
}
.cta-block__title {
  font-size: var(--t-h3);
  font-weight: 500;
  margin: 0 0 8px;
}
.cta-block__text {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0;
  max-width: 44ch;
}
.page-section--dark .cta-block__text { color: rgba(250,250,247,.6); }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .page-two-col,
  .page-two-col--wide,
  .page-two-col--media { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card { border-right: none; border-bottom: 1px solid var(--hairline); }
  .feature-card:last-child { border-bottom: none; }
  .offices-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .contact-form { grid-template-columns: 1fr; }
  .img-grid--3,
  .img-grid--2 { grid-template-columns: 1fr 1fr; }
  .img-grid img:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .district-visuals {
    padding: 28px 14px;
  }
  .district-slider__head {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .district-slider__track {
    grid-auto-columns: minmax(220px, 78vw);
  }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---- Fullwidth fixed image ---- */
.full-image {
  width: 100%;
  height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0;
}
.full-image--fixed {
  background-attachment: fixed;
}
@media (max-width: 720px) {
  .full-image--fixed {
    background-attachment: scroll;
  }
  .full-image {
    height: 35vh;
  }
}
