/* =============================================================================
   index.css — homepage styles
   ============================================================================= */

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  height: 450px;
  background-image: url('/img/barcelona-eixample-from-the-air-1280.webp');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.hero-text-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-text {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px 60px;
  color: #fff;
}

.hero-text .eyebrow {
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-text .subtitle {
  font-size: 18px;
  opacity: 0.9;
}

/* ── SHARED SECTION STYLES ── */
.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 20px;
}

/* ── POPULAR ATTRACTIONS ── */
.attractions {
  padding: 40px 0 0;
  background: #fff;
}

.attractions-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.attractions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.attraction-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0,0,0,0.06), 0 16px 30px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.attraction-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.08), 0 22px 45px rgba(0,0,0,0.12);
}

.attraction-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.attraction-card-body {
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.attraction-card-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
  margin: 0;
  text-align: center;
}

.btn-discover {
  display: block;
  width: 100%;
  margin-top: auto;
  background: #C9A84C;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  border-radius: 20px;
  text-decoration: none;
  text-align: center;
}

.btn-discover:hover {
  background: #b8963e;
}

/* ── OUR GUIDES ── */
.guides {
  padding: 40px 0 0;
  background: #fff;
}

.guides-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 24px 10px;
  border-radius: 16px;
  min-height: 200px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.06), 0 16px 30px rgba(0,0,0,0.08);
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.guide-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.30);
}

.guide-card h3,
.guide-card .guide-arrow {
  position: relative;
  z-index: 1;
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.08), 0 22px 45px rgba(0,0,0,0.12);
}

.guide-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.guide-card .guide-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
  margin-top: auto;
}

.guide-card .guide-arrow::after {
  content: '→';
  font-size: 40px;
}

/* ── BARCELONA BY MONTH ── */
.bymonth {
  padding: 40px 0 0;
  background: #fff;
}

.bymonth-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.bymonth-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 20px;
}

.bymonth-title span {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 20px;
  color: #222;
}

.months-bar {
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.06), 0 16px 30px rgba(0,0,0,0.08);
}

.month-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: filter .2s ease;
}

.month-item:hover {
  filter: brightness(1.15);
}

.m-jan { background: #2C3E50; }
.m-feb { background: #374f66; }
.m-mar { background: #4A6E8C; }
.m-apr { background: #7a9db8; }
.m-may { background: #B8924E; }
.m-jun { background: #c9a45f; }
.m-jul { background: #C4673A; }
.m-aug { background: #d4784a; }
.m-sep { background: #b85c30; }
.m-oct { background: #B8924E; }
.m-nov { background: #4A6E8C; }
.m-dec { background: #2C3E50; }

/* ── EXPLORE YOUR WAY ── */
.explore {
  padding: 40px 0 0;
  background: #fff;
}

.explore-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.explore-item {
  padding: 0 30px;
  border-left: 1px solid #dcdcdc;
  text-decoration: none;
  color: inherit;
  transition: opacity .2s ease;
  display: flex;
  flex-direction: column;
}

.explore-item:first-child {
  padding-left: 0;
  border-left: none;
}

.explore-item:hover {
  opacity: 0.75;
}

.explore-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
}

.explore-item p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.explore-item .explore-arrow {
  display: inline-block;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #B8924E;
}

.explore-item .explore-arrow::after {
  content: ' →';
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { background-attachment: scroll; height: 380px; }
  .hero-text h1 { font-size: 36px; }
  .hero-text .subtitle { font-size: 15px; }
  .attractions-grid { grid-template-columns: repeat(3, 1fr); }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  .month-item { font-size: 12px; padding: 16px 0; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .explore-item { border-left: none; border-top: 1px solid #dcdcdc; padding: 16px 0 0; }
  .explore-item:first-child { border-top: none; padding-top: 0; }
}

@media (max-width: 480px) {
  .hero { height: 320px; }
  .hero-text { padding: 0 16px 40px; }
  .hero-text .eyebrow { font-size: 11px; letter-spacing: 0.5px; }
  .hero-text h1 { font-size: 28px; }
  .hero-text .subtitle { font-size: 13px; }
  .attractions-inner,
  .guides-inner { padding: 0; background: #fff; }
  .attractions-inner .section-title,
  .guides-inner .section-title { padding: 0 16px; }
  /* CSS Grid horizontal scroll.
     grid-auto-columns: max-content lets each track size to its item's own width.
     Cards get width: 42vw; spacer pseudo-elements get width: 16px — so they
     each create correctly-sized tracks (not all forced to the same 42%). */
  .attractions-grid,
  .guides-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 0 0 8px;
    scrollbar-width: none;
    background: #fff;
  }
  .attractions-grid::-webkit-scrollbar,
  .guides-grid::-webkit-scrollbar { display: none; }
  .attractions-grid::before,
  .guides-grid::before,
  .attractions-grid::after,
  .guides-grid::after {
    content: '';
    display: block;
    width: 6px;
  }
  .attraction-card { width: 42vw; }
  .guide-card { width: 42vw; min-height: 180px; }
  .months-bar { flex-wrap: wrap; border-radius: 12px; }
  .month-item { flex: 0 0 25%; font-size: 13px; padding: 14px 0; }
  .explore-grid { grid-template-columns: 1fr; }
  .explore-item { border-left: none; border-top: 1px solid #dcdcdc; padding: 16px 0 0; }
  .explore-item:first-child { border-top: none; padding-top: 0; }
  .section-title,
  .bymonth-title { font-size: 20px; }
}
