:root {
  --ac-bg: #f5f6f8;
  --ac-bg-alt: #eceff3;
  --ac-panel: #ffffff;
  --ac-line: rgba(34, 47, 62, 0.12);
  --ac-ink: #1f2937;
  --ac-muted: #5f6b7b;
  --ac-accent: #2f5b8a;
  --ac-accent-2: #79a3c8;
  --ac-accent-soft: rgba(47, 91, 138, 0.12);
  --ac-shadow: 0 22px 60px rgba(16, 24, 40, 0.1);
  --ac-radius-xl: 28px;
  --ac-radius-lg: 20px;
  --ac-radius-md: 14px;
  --ac-max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ac-ink);
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(180deg, var(--ac-bg) 0%, var(--ac-bg-alt) 100%);
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ac-bg);
  transition: all .6s ease-out;
}
#preloader::after { animation-delay: -.5s; }
#preloader::before, #preloader::after {
  content: "";
  position: absolute;
  border: 4px solid #59bec5;
  border-radius: 50%;
  animation: animate-preloader 2s cubic-bezier(0,.2,.8,1) infinite;
}
@keyframes animate-preloader {
  0% { width: 10px; height: 10px; top: calc(50% - 5px); left: calc(50% - 5px); opacity: 1; }
  100% { width: 72px; height: 72px; top: calc(50% - 36px); left: calc(50% - 36px); opacity: 0; }
}

.skiptranslate { opacity: 0; display: none; position: absolute !important; top: -5000px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a, area, button, input, label, select, summary, textarea { touch-action: manipulation; }

.ac-shell { width: min(var(--ac-max-width), calc(100% - 40px)); margin: 0 auto; }
.ac-topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid var(--ac-line);
}
.ac-topbar-inner {
  min-height: 78px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.ac-brand { display: flex; align-items: center; gap: 12px; }
.ac-brand img { width: 44px; height: 44px; }
.ac-brand-copy strong, .ac-brand-copy span { display: block; }
.ac-brand-copy strong { font-family: "Playfair Display", serif; font-size: 1.15rem; font-weight: 700; }
.ac-brand-copy span { color: var(--ac-muted); font-size: .92rem; }
.ac-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ac-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--ac-line);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  color: var(--ac-ink);
}
.ac-nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.ac-nav a { padding: 10px 14px; border-radius: 999px; color: var(--ac-muted); font-size: .95rem; }
.ac-nav a.active, .ac-nav a:hover { color: var(--ac-accent); background: var(--ac-accent-soft); }

.ac-main { padding: 24px 0 48px; }
.ac-section { padding: 28px 0; }
.ac-hero {
  min-height: 360px;
  padding: 40px;
  border-radius: var(--ac-radius-xl);
  color: white;
  box-shadow: var(--ac-shadow);
  background:
    linear-gradient(135deg, rgba(18,29,43,.78), rgba(47,91,138,.28)),
    url("../img/around/sagrada-familia.jpg") center/cover;
}
.ac-eyebrow {
  display: inline-flex; width: fit-content; padding: 10px 14px;
  border-radius: 999px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16); font-size: .9rem;
}
.ac-hero h1 {
  margin: 18px 0 14px; max-width: 10ch;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.8rem, 6vw, 5rem); line-height: .95;
}
.ac-hero p {
  max-width: 62ch; margin: 0;
  color: rgba(255,255,255,.88); line-height: 1.7; font-size: 1.05rem;
}
.ac-hero-actions, .ac-filter-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px;
}
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; font-weight: 700;
}
.ac-btn-primary { color: white; background: linear-gradient(135deg, var(--ac-accent), var(--ac-accent-2)); }
.ac-btn-secondary { color: white; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.12); }
.ac-btn-soft { color: var(--ac-accent); background: var(--ac-accent-soft); }

.ac-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.category-pills .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 90ms ease, box-shadow 150ms ease;
  border-radius: 999px;
  border-color: rgba(255,255,255,.24);
  color: white;
  background: rgba(255,255,255,.08);
}
.category-pills .btn:active, .category-pills .btn.tap { transform: scale(0.98); }
.category-pills .btn.active { box-shadow: 0 .25rem .75rem rgba(0,0,0,.12); }
.category-pills .btn.active,
.category-pills .btn[aria-pressed="true"] {
  background: var(--ac-accent);
  color: white;
  border-color: var(--ac-accent);
}
.category-pills .btn.btn-primary {
  background: white;
  color: var(--ac-accent);
  border-color: white;
}
.category-pills .btn.btn-outline-primary { color: white; }

.ac-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: start;
}
.ac-panel {
  border-radius: var(--ac-radius-lg);
  background: var(--ac-panel);
  border: 1px solid var(--ac-line);
  box-shadow: 0 18px 50px rgba(15,23,42,.06);
}
.ac-filter-panel { padding: 22px; }
.ac-filter-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: start;
  margin-bottom: 18px;
}
.ac-kicker {
  color: var(--ac-accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  font-weight: 700;
}
.ac-filter-head h2,
.ac-results-head h2,
.ac-section-head h2 {
  margin: 8px 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  line-height: 1.02;
}
.ac-filter-panel .form-label { font-weight: 600; }
.ac-filter-panel .form-control,
.ac-filter-panel .form-select {
  min-height: 52px; border-radius: 14px; border: 1px solid var(--ac-line); box-shadow: none;
}
.ac-filter-panel .form-control:focus,
.ac-filter-panel .form-select:focus {
  border-color: rgba(47,91,138,.45);
  box-shadow: 0 0 0 4px rgba(47,91,138,.12);
}
.ac-results-head {
  display: flex; justify-content: space-between; gap: 18px; align-items: start;
  padding: 22px; margin-bottom: 18px;
}
.ac-results-meta { display: grid; gap: 10px; justify-items: end; }
.filter-chip {
  border-radius: 999px;
  padding: .5rem .75rem;
  background: var(--ac-accent-soft) !important;
  color: var(--ac-accent) !important;
  border-color: transparent !important;
}
#resultCount.pulse { animation: pulse .25s ease-in-out; }
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.ac-activity-card {
  border: 1px solid var(--ac-line);
  border-radius: 20px;
  overflow: hidden;
  background: white;
}
.ac-activity-card .card-img-top {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.ac-activity-card .card-body { padding: 20px; }
.ac-activity-card .card-title {
  margin-bottom: 10px;
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
}
.ac-activity-card .card-text { line-height: 1.68; }
.btns .btn {
  border-radius: 999px;
  min-height: 38px;
}
.btns .btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--ac-accent), var(--ac-accent-2));
}
.btns .btn-outline-primary {
  border-color: rgba(47,91,138,.22);
  color: var(--ac-accent);
}
.btns .btn-outline-secondary {
  border-color: var(--ac-line);
  color: var(--ac-muted);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.a-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .32rem .65rem; border-radius: 999px; font-size: .78rem; line-height: 1.2;
  border: 1px solid rgba(0,0,0,.12); background: #f6f7f8; color: #222; white-space: nowrap;
}
.a-chip-primary { background: rgba(47,91,138,.12); color: var(--ac-accent); border-color: rgba(47,91,138,.22); }
.a-chip-secondary { background: rgba(108,117,125,.12); color: #6c757d; border-color: rgba(108,117,125,.22); }
.a-chip-success { background: rgba(25,135,84,.12); color: #198754; border-color: rgba(25,135,84,.22); }
.a-chip-info { background: rgba(13,202,240,.12); color: #0aa2c0; border-color: rgba(13,202,240,.22); }
.a-chip-kids { background: rgba(255,193,7,.16); color: #b38600; border-color: rgba(255,193,7,.26); }

.ac-modal { border: 0; border-radius: 22px; overflow: hidden; }
.ac-modal .modal-header,
.ac-modal .modal-footer { border: 0; padding: 20px 24px; }
.ac-modal .modal-body { padding: 0 24px 24px; }
#modalDesc.preline { white-space: pre-line; }
.preline { white-space: pre-line; }

.ac-map-block { padding: 24px; overflow: hidden; }
#mapGeneralWrap { overflow: hidden; }
#mapAll { height: 100%; }
.ratio > #mapAll { position: absolute; inset: 0; }

.ac-footer { padding: 24px 0 42px; }
.ac-footer-box {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 24px 28px; border-radius: var(--ac-radius-lg);
  background: var(--ac-panel); border: 1px solid var(--ac-line); box-shadow: 0 18px 50px rgba(15,23,42,.06);
}
.ac-footer-box p { margin: 0; color: var(--ac-muted); }
.ac-footer-links { display: flex; flex-wrap: wrap; gap: 14px; }

@media (min-width: 992px) {
  #filtres.offcanvas-lg {
    position: sticky;
    top: 102px;
    transform: none !important;
    visibility: visible !important;
  }
}

@media (max-width: 980px) {
  .ac-topbar-inner {
    position: relative;
    flex-wrap: nowrap;
    padding: 14px 0;
  }
  .ac-brand {
    flex: 1;
    min-width: 0;
  }
  .ac-nav-toggle {
    display: inline-flex;
  }
  .ac-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--ac-line);
    border-radius: 22px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 40px rgba(16,24,40,.08);
  }
  .ac-topbar-inner.nav-open .ac-nav {
    display: flex;
  }
  .ac-topbar-inner.nav-open .ac-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .ac-topbar-inner.nav-open .ac-nav-toggle span:nth-child(2) { opacity: 0; }
  .ac-topbar-inner.nav-open .ac-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .ac-nav a {
    width: 100%;
    padding: 12px 14px;
  }
  .ac-layout,
  .ac-results-head,
  .ac-footer-box {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .ac-results-meta { justify-items: start; }
}

@media (max-width: 640px) {
  .ac-shell { width: min(var(--ac-max-width), calc(100% - 24px)); }
  .ac-brand-copy span { display: none; }
  .ac-hero,
  .ac-panel,
  .ac-map-block,
  .ac-footer-box { padding: 24px; }
  .ac-hero h1 { max-width: none; }
}
