/*
 * ESDI Online — fulla d'estils compartida pel redisseny (portada i reserves).
 * Colors, tipografia i espaiat extrets dels mockups disseny/Main.dc.html i
 * disseny/Reserves.dc.html.
 */

:root {
  --bg: #F4F3EF;
  --ink: #111111;
  --ink-soft: #4A4A4A;
  --ink-muted: #C9C9C9;
  --border: #DDDBD4;
  --border-dark: #3A3A3A;
  --white: #FFFFFF;
  --accent: #FF5A1F;
  --accent-soft: #FF8A4C;
  --accent-hover: #B23A00;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-head: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--ink);
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

.wrap {
  width: 100%;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Capçalera ───────────────────────────────────────────────────────── */

.site-header {
  background: var(--ink);
  color: var(--white);
}

.site-header .wrap {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  min-height: 44px;
}

.brand:hover,
.brand:focus-visible {
  color: var(--white);
}

.brand img {
  height: 26px;
  width: auto;
  filter: invert(1);
}

.brand .brand-online {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.18em;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.main-nav a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 6px;
  font-weight: 600;
}

.lang-switch {
  display: flex;
  margin-left: 8px;
  border: 1px solid #5A5A5A;
  border-radius: 8px;
  overflow: hidden;
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--white);
  text-decoration: none;
  padding: 10px 12px;
  min-height: 44px;
  min-width: 44px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

/* ── Contenidor principal ───────────────────────────────────────────── */

main {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 56px;
  padding-bottom: 72px;
}

h1,
h2 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0;
}

section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: 28px;
}

.section-head a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.section-head a:hover {
  text-decoration: underline;
}

/* ── Capçal (hero) ──────────────────────────────────────────────────── */

.hero {
  gap: 12px;
}

.hero h1 {
  font-size: 52px;
  line-height: 1.05;
  max-width: 760px;
}

.hero p {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ── Bloc "Primer cop a ESDI?" ──────────────────────────────────────── */

.panel-dark {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}

.panel-dark .intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 320px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.panel-dark h2 {
  font-size: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  align-self: flex-start;
  margin-top: 8px;
}

.btn-accent:hover,
.btn-accent:focus-visible {
  background: #e64f16;
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
  align-self: flex-start;
}

.btn-dark:hover,
.btn-dark:focus-visible {
  background: #2a2a2a;
  color: var(--white);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  flex: 2 1 520px;
}

.steps li {
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.steps .num {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-soft);
}

.steps .label {
  font-weight: 600;
}

.steps .desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.steps .desc a {
  color: var(--white);
}

/* ── Targetes (comptes, reserves) ──────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-grid-compact .card {
  min-height: 44px;
  padding: 18px 20px;
  gap: 4px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
}

.card:hover,
.card:focus-visible {
  border-color: var(--ink);
}

.card svg {
  flex-shrink: 0;
}

.card .card-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.card .card-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.card .badge {
  margin-top: auto;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 999px;
}

.card-wide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.card-wide {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  gap: 18px;
  align-items: center;
}

.card-wide:hover,
.card-wide:focus-visible {
  border-color: var(--ink);
}

.card-wide .card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-wide .card-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.card-wide .card-desc {
  font-size: 15px;
  color: var(--ink-soft);
}

/* ── Peu de pàgina ──────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ── Pàgina de reserves ─────────────────────────────────────────────── */

.res-main {
  gap: 40px;
  padding-top: 48px;
}

.res-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.res-top .back-link {
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.res-top .back-link:hover {
  text-decoration: underline;
}

.res-top h1 {
  font-size: 48px;
  line-height: 1.05;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tablist [role='tab'] {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font: 600 15px var(--font-body);
  cursor: pointer;
  background: var(--white);
  color: var(--ink);
  border: 1px solid #BDBAB0;
}

.tablist [role='tab'][aria-selected='true'] {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.res-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.res-content {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.res-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.res-panel h2 {
  font-size: 26px;
}

.res-panel p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.res-panel[hidden] {
  display: none;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.room-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.room-card:hover,
.room-card:focus-visible {
  border-color: var(--ink);
}

.room-card .card-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.room-card .note {
  font-size: 14px;
  color: var(--ink-soft);
}

.room-card .cta {
  font-size: 15px;
  color: var(--ink-soft);
}

.schedule-card h2 {
  font-size: 22px;
}

.schedule-scroll {
  overflow-x: auto;
}

table.schedule {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 15px;
}

table.schedule th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--ink);
}

table.schedule td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

table.schedule tr:last-child td {
  border-bottom: none;
}

.rules-aside {
  flex: 1 1 300px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-aside h2 {
  font-size: 22px;
}

.rules-aside ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: #E4E4E4;
}

.rules-aside .btn-accent {
  align-self: flex-start;
}

.rules-aside .contact {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ── Redirecció /espais/ ────────────────────────────────────────────── */

.redirect-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.redirect-box {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.redirect-box img {
  height: 32px;
  margin-bottom: 8px;
}

.redirect-box a.btn-dark {
  text-decoration: none;
}

/* ── /guies/ ───────────────────────────────────────────────────────── */

.g-main {
  gap: 40px;
  padding-top: 48px;
}

.g-hero {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: flex-end;
  justify-content: space-between;
}

.g-hero-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 520px;
}

.g-hero-text h1 {
  font-size: 52px;
  line-height: 1.05;
}

.g-hero-text p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 600px;
}

.g-search {
  flex: 1 1 320px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.g-search label {
  font-size: 14px;
  font-weight: 600;
}

.g-search input {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #8F8C84;
  border-radius: 10px;
  background: var(--white);
  font: 400 16px var(--font-body);
  color: var(--ink);
  width: 100%;
}

.g-start {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.g-start .intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 420px;
}

.g-start h2 {
  font-size: 26px;
}

.g-start p.lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #D6D6D6;
}

.g-cat h2 {
  font-size: 24px;
}

.g-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.g-card {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
}

.g-card:hover,
.g-card:focus-visible {
  border-color: var(--ink);
}

.g-card .meta {
  font-size: 13px;
  font-weight: 600;
  color: #5C5C5C;
}

.g-card .title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.g-card .desc {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.g-card .open {
  margin-top: auto;
  font-size: 15px;
  font-weight: 600;
}

.g-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.g-crumb a,
.g-crumb button {
  background: none;
  border: 0;
  padding: 12px 0;
  font: 600 14px var(--font-body);
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  min-height: 44px;
}

.g-crumb .sep {
  color: #8F8C84;
}

.g-crumb [aria-current='page'] {
  color: var(--ink-soft);
  text-decoration: none;
}

.g-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.g-sidebar {
  flex: 1 1 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-sidebar .cat-label {
  margin: 0;
  padding: 12px 12px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5C5C5C;
}

.g-sidebar button {
  text-align: left;
  border: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font: 400 15px var(--font-body);
  background: transparent;
  color: var(--ink);
}

.g-sidebar button[aria-current='page'] {
  font-weight: 600;
  background: var(--ink);
  color: var(--white);
}

.g-article {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.g-head {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g-head h1 {
  font-size: 34px;
  line-height: 1.1;
}

.g-head p.intro {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #D6D6D6;
  max-width: 640px;
}

.g-head .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.g-head .btn-copy {
  background: transparent;
  color: var(--white);
  border: 1px solid #5A5A5A;
  font: 600 15px var(--font-body);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}

.g-notice {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 6px 0 0 var(--accent);
}

.g-notice strong {
  font-size: 15px;
}

.g-notice span {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.g-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.g-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.g-step-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.g-step-num {
  flex: none;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: 22px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
}

.g-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.g-step-body h2 {
  font-size: 21px;
  line-height: 1.25;
}

.g-step-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.g-step-body > a {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.g-shots {
  margin-left: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.g-shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-shots img {
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
}

.g-shots figcaption {
  font-size: 13px;
  line-height: 1.4;
  color: #5C5C5C;
}

.g-appgrid {
  margin-left: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.g-appgrid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-appgrid img {
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
}

.g-appgrid .app-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
}

.g-appgrid .app-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.g-mfa-box {
  border: 2px solid var(--accent-hover);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 20px 60px;
  background: var(--white);
}

.g-mfa-box .warn {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
}

.g-mfa-box .stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.g-mfa-box .stores img {
  height: 40px;
}

.g-mfa-alt {
  margin: 12px 0 0 60px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.g-tip {
  background: #FFF1E8;
  border: 1px solid #F3C9AE;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.g-tip strong {
  font-size: 15px;
}

.g-tip span {
  font-size: 15px;
  line-height: 1.5;
  color: #3A3A3A;
}

.g-prevnext {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.g-prevnext button {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 240px;
  min-height: 44px;
}

.g-prevnext button.next {
  text-align: right;
  align-items: flex-end;
}

.g-prevnext .label {
  font-size: 13px;
  color: #5C5C5C;
}

.g-prevnext .title {
  font-weight: 600;
}

.g-cau {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.g-cau a {
  font-weight: 600;
  padding: 10px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 38px;
  }

  .res-top h1 {
    font-size: 34px;
  }

  .panel-dark {
    padding: 24px;
  }

  main {
    gap: 40px;
    padding-top: 32px;
  }

  .g-hero-text h1 {
    font-size: 32px;
  }

  .g-shots,
  .g-appgrid,
  .g-mfa-box,
  .g-mfa-alt {
    margin-left: 0;
  }
}
