/* Malta Expat Guide — warm Mediterranean theme (design 2a "Postcard").
   Selectors are scoped under .site so they win over Tailwind's preflight,
   which guide pages still load for their article content. */

:root {
  --color-bg: #f6efe3;
  --color-surface: #ebdfca;
  --color-card: #fffaf1;
  --color-text: #1b2540;
  --color-accent: #cf142b;
  --color-accent-100: #fbe6e0;
  --color-accent-600: #b01024;
  --color-accent-700: #a20f22;
  --color-navy: #003366;
  --color-divider: color-mix(in srgb, #003366 22%, transparent);
  --tint-terracotta: #f2c9b0;
  --tint-sea: #cfe3ea;
  --tint-sand: #ebdfca;
  --tint-blush: #fbe6e0;
  --photo-fallback: repeating-linear-gradient(135deg, #e3b48a 0 10px, #ecc7a3 10px 20px);
  --font-heading: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --shadow-card: 0 2px 0 rgba(0, 51, 102, .08);
  --shadow-float: 0 12px 40px rgba(0, 51, 102, .18);
  --page-pad: 32px;
}

/* ---------- Base ---------- */
body.site {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.site h1, .site h2, .site h3, .site h4, .site h5, .site h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.site h6, .site .eyebrow {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.site .eyebrow { color: var(--color-accent-700); }
.site p { margin: 0 0 12px; }
.site a { color: var(--color-accent); }
.site :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.site .wrap { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.site .h-section { font-size: 40px; margin-bottom: 20px; }

/* ---------- Buttons & tags ---------- */
.site .btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font: 700 15px/1.2 var(--font-heading);
  color: var(--color-text);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
}
.site .btn-primary { background: var(--color-accent); color: #fff; }
.site .btn-primary:hover { background: var(--color-accent-600); }
.site .btn-secondary { border-color: var(--color-navy); color: var(--color-navy); }
.site .btn-secondary:hover { background: color-mix(in srgb, var(--color-navy) 8%, transparent); }
.site .btn-light { background: #fff; color: var(--color-navy); }
.site .btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 18px; }
.site .btn-block { width: 100%; justify-content: center; padding: 10px 18px; font-size: 14px; }
.site .tag {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.site .tag-neutral { background: var(--color-surface); color: var(--color-navy); }
.site .tag-light { background: #fff; color: var(--color-navy); }

/* ---------- Photos ---------- */
.site .photo {
  background-color: #e8c19c;
  background-image: var(--img, none), var(--photo-fallback);
  background-size: cover, auto;
  background-position: center;
}

/* ---------- Header / nav ---------- */
.site .site-header { min-height: 72px; }
.site .nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
  padding: 0 var(--page-pad);
}
.site .nav-brand {
  font: 800 22px var(--font-heading);
  color: var(--color-navy);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -.01em;
}
.site .nav-brand span { color: var(--color-accent); }
.site .nav-link {
  color: var(--color-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site .nav-link:hover, .site .nav-link[aria-current="page"] { color: var(--color-accent); }
.site .nav-links { display: contents; }
.site .nav .menu-icon { display: none; }
.site .nav .menu-all { padding: 8px 18px; font-size: 14px; }

/* All-sections menu */
.site .menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(27, 37, 64, .45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.site .menu[data-open="true"] { display: flex; }
.site .menu-panel {
  background: var(--color-bg);
  border-radius: 28px;
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 1120px;
  padding: 28px 32px 32px;
}
.site .menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.site .menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.site .menu-sec {
  background: var(--tint, var(--color-card));
  border-radius: 20px;
  padding: 16px 18px;
  color: var(--color-navy);
}
.site .menu-sec-title {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font: 700 19px var(--font-heading);
  color: var(--color-navy);
  text-decoration: none;
}
.site .menu-sec-title b { font-weight: 800; font-size: 14px; opacity: .45; }
.site .menu-sec-title:hover { color: var(--color-accent); }
.site .menu-sec ul { list-style: none; margin: 8px 0 0; padding: 0; }
.site .menu-sec li a {
  display: block;
  padding: 3px 0;
  font-size: 14px;
  color: var(--color-navy);
  text-decoration: none;
  opacity: .85;
}
.site .menu-sec li a:hover, .site .menu-sec li a[aria-current="page"] { color: var(--color-accent); opacity: 1; }
.site .menu-sec li a[aria-current="page"] { font-weight: 600; }
body.site.menu-open { overflow: hidden; }

/* ---------- Footer CTA ---------- */
.site .site-footer { background: var(--color-navy); color: #fff; }
.site .footer-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 40px var(--page-pad);
}
.site .footer-cta h2 { margin: 0; font-size: 36px; color: #fff; }
.site .footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px var(--page-pad) 24px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: 14px;
  opacity: .8;
}
.site .footer-meta a { color: #fff; text-decoration: none; }
.site .footer-meta a:hover { text-decoration: underline; }
.site .footer-meta nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------- Home: postcard hero ---------- */
.site .hero { position: relative; margin: 0 24px; }
.site .hero-photo { height: 560px; border-radius: 32px; }
.site .hero-card {
  position: absolute;
  left: 40px;
  bottom: -40px;
  width: 560px;
  box-sizing: border-box;
  background: var(--color-bg);
  border-radius: 28px;
  padding: 36px;
  box-shadow: var(--shadow-float);
}
.site .hero-card h1 { font-size: 60px; line-height: 1; margin: 0 0 14px; }
.site .hero-card .lede { font-size: 18px; opacity: .8; }
.site .hero-actions { display: flex; gap: 12px; margin-top: 8px; }
.site .sun-badge {
  position: absolute;
  right: 56px;
  bottom: 48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-10deg);
  text-align: center;
  font-family: var(--font-heading);
}
.site .sun-badge b { font-size: 44px; line-height: 1; }
.site .sun-badge span { font-size: 14px; font-weight: 600; }

/* Stages */
.site .stages-wrap { padding-top: 112px; }
.site .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.site .stage {
  background: var(--tint);
  border-radius: 24px;
  padding: 24px;
  color: var(--color-navy);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site .stage h6 { margin: 0; }
.site .stage-title { font: 700 26px var(--font-heading); letter-spacing: -.01em; }
.site .stage-links { font-size: 14px; }
.site .stage-links a { color: var(--color-navy); opacity: .8; text-decoration: none; }
.site .stage-links a:hover { color: var(--color-accent); opacity: 1; text-decoration: underline; }
.site .stage-links .sep { opacity: .5; padding: 0 4px; }

/* Section tiles */
.site .block { padding-top: 48px; }
.site .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.site .tile {
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-card);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.site .tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 51, 102, .12); }
.site .tile-photo {
  height: 130px;
  background-color: var(--tint);
  background-image: linear-gradient(to top, rgba(0, 51, 102, .45), transparent 60%), var(--img, none);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px 18px;
}
.site .tile-photo b { font: 800 40px var(--font-heading); color: #fff; opacity: .9; }
.site .tile-body { padding: 20px 22px 24px; }
.site .tile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.site .tile-head h3 { margin: 0; font-size: 24px; }
.site .tile-body p { margin: 8px 0 0; opacity: .75; }

/* Quick facts */
.site .facts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: start; }
.site .facts .h-section { margin: 0; }
.site .card {
  background: var(--color-card);
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
}
.site .card p:last-child { margin-bottom: 0; }

/* Weather */
.site .seasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.site .season { background: var(--tint); border-radius: 24px; padding: 22px; color: var(--color-navy); }
.site .season h6 { margin: 0 0 6px; }
.site .season-temp { font: 800 38px var(--font-heading); letter-spacing: -.02em; }
.site .season-months { font-size: 14px; }
.site .season p { margin: 12px 0 0; font-size: 14px; color: var(--color-text); opacity: .8; }
.site .weather-notes { margin-top: 16px; }
.site .weather-notes ul { margin: 0; padding-left: 20px; }
.site .weather-notes li { margin-bottom: 8px; }
.site .page-end { height: 48px; }

/* ---------- Section page ---------- */
.site .sec-hero {
  margin: 0 24px;
  background: var(--tint, var(--tint-terracotta));
  border-radius: 32px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: end;
  color: var(--color-navy);
}
.site .crumbs { font-size: 14px; margin-bottom: 20px; }
.site .crumbs a { color: inherit; text-decoration: none; }
.site .crumbs a:hover { text-decoration: underline; }
.site .crumbs b { font-weight: 600; }
.site .sec-hero h1 { font-size: 96px; line-height: .95; margin: 0; color: var(--color-navy); }
.site .sec-hero .sec-num { display: block; font: 800 20px var(--font-heading); color: var(--color-accent-700); margin-bottom: 8px; letter-spacing: 0; }
.site .sec-hero p { font-size: 19px; }
.site .guides { padding: 32px 24px 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.site .guide-card {
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.site .guide-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 51, 102, .12); }
.site .guide-card .photo { height: 110px; }
.site .guide-card-body { padding: 18px 22px 22px; }
.site .guide-card h6 { color: var(--color-accent-700); margin: 0 0 4px; }
.site .guide-card h4 { margin: 0 0 6px; font-size: 20px; }
.site .guide-card p {
  margin: 0;
  opacity: .75;
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Guide (article) page ---------- */
.site .g-hero { position: relative; margin: 0 24px; }
.site .g-hero .photo { height: 380px; border-radius: 32px; }
.site .g-hero-card {
  position: absolute;
  left: 40px;
  bottom: -40px;
  width: 640px;
  max-width: calc(100% - 80px);
  box-sizing: border-box;
  background: var(--color-bg);
  border-radius: 28px;
  padding: 32px 36px;
  box-shadow: var(--shadow-float);
}
.site .g-hero-card .crumbs { margin-bottom: 14px; color: var(--color-navy); }
.site .g-hero-card h1 { font-size: 52px; line-height: 1; margin: 0 0 12px; color: var(--color-text); }
.site .g-hero-card p { font-size: 18px; opacity: .8; margin: 0; }
.site .g-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding: 88px var(--page-pad) 0;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}
.site .g-aside { position: sticky; top: 24px; }
.site .g-aside-card { background: var(--tint, var(--color-card)); border-radius: 24px; padding: 20px 22px; color: var(--color-navy); }
.site .g-aside-card h6 { margin: 0 0 10px; }
.site .g-aside-card h6 a { color: inherit; text-decoration: none; }
.site .g-aside-card h6 a:hover { color: var(--color-accent); }
.site .g-aside-card ul { list-style: none; margin: 0; padding: 0; }
.site .g-aside-card li a {
  display: block;
  padding: 6px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  color: var(--color-navy);
  text-decoration: none;
  font-size: 15px;
}
.site .g-aside-card li a:hover { background: rgba(255, 255, 255, .5); }
.site .g-aside-card li a[aria-current="page"] { background: #fff; color: var(--color-accent-700); font-weight: 600; }
.site .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 32px var(--page-pad) 48px; box-sizing: border-box; }
.site .pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-card);
  border-radius: 20px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--color-navy);
  box-shadow: var(--shadow-card);
}
.site .pager a:hover { color: var(--color-accent); }
.site .pager a.next { text-align: right; grid-column: 2; }
.site .pager h6 { margin: 0; opacity: .6; }
.site .pager b { font: 700 20px var(--font-heading); }

/* Article content (existing guide markup, styled with Tailwind utilities) */
.site .article { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.site .article .content-block,
.site .article > div.bg-white {
  background: var(--color-card);
  border: 0;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}
.site .article h2, .site .article h3, .site .article h4, .site .article h5 {
  font-family: var(--font-heading);
  letter-spacing: -.01em;
  line-height: 1.2;
}
.site .article .content-block > h2:first-child,
.site .article .content-block > h3:first-child { color: var(--color-navy); }
.site .article .text-slate-600 { color: #3e4762; }
.site .article .text-slate-800 { color: var(--color-text); }
.site .article .leading-relaxed { line-height: 1.65; }
.site .article a:not([class]) { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.site .article table th { font-family: var(--font-heading); color: var(--color-navy); }
.site .article .rounded-3xl, .site .article .rounded-2xl { border-radius: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site .nav-links { display: none; }
  .site .tiles, .site .guides, .site .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .site .seasons { grid-template-columns: repeat(2, 1fr); }
  .site .g-layout { grid-template-columns: 1fr; }
  .site .g-aside { position: static; }
  .site .sec-hero h1 { font-size: 72px; }
}

@media (max-width: 760px) {
  :root { --page-pad: 20px; }
  .site .site-header { min-height: 60px; }
  .site .nav { height: 60px; gap: 12px; }
  .site .nav-brand { font-size: 18px; }
  .site .nav .menu-all { display: none; }
  .site .nav .menu-icon { display: inline-flex; }
  .site .h-section { font-size: 28px; }

  .site .menu { padding: 0; }
  .site .menu-panel { border-radius: 0; min-height: 100%; padding: 12px 20px 32px; box-shadow: none; }
  .site .menu-head { height: 48px; }
  .site .menu-grid { grid-template-columns: 1fr; gap: 10px; }

  .site .hero { margin: 0 12px; }
  .site .hero-photo { height: 260px; border-radius: 24px; }
  .site .hero-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin: -48px 12px 0;
    background: var(--color-card);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 51, 102, .15);
  }
  .site .hero-card h1 { font-size: 36px; margin-bottom: 10px; }
  .site .hero-card .lede { font-size: 16px; }
  .site .hero-card .eyebrow, .site .hero-actions .btn-secondary { display: none; }
  .site .hero-actions .btn-primary { width: 100%; justify-content: center; padding: 10px 18px; font-size: 14px; }
  .site .sun-badge { right: 14px; top: 14px; bottom: auto; width: 88px; height: 88px; }
  .site .sun-badge b { font-size: 26px; }
  .site .sun-badge span { font-size: 11px; }

  .site .stages-wrap { padding-top: 28px; padding-left: 12px; padding-right: 12px; }
  .site .stages-wrap .eyebrow { padding: 0 8px; }
  .site .stages { grid-template-columns: 1fr; gap: 10px; }
  .site .stage { border-radius: 20px; padding: 16px 18px; gap: 2px; }
  .site .stage-title { font-size: 20px; }

  .site .block { padding-top: 28px; }
  .site .block.wrap { padding-left: 12px; padding-right: 12px; }
  .site .block .h-section { padding: 0 8px; }
  .site .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .site .tile {
    background: var(--tint);
    color: var(--color-navy);
    border-radius: 20px;
    padding: 16px;
    min-height: 120px;
    justify-content: space-between;
    box-shadow: none;
    box-sizing: border-box;
  }
  .site .tile-photo { display: none; }
  .site .tile::before { content: attr(data-n); font: 800 22px var(--font-heading); opacity: .4; }
  .site .tile-body { padding: 0; }
  .site .tile-head h3 { font-size: 17px; line-height: 1.15; }
  .site .tile-head .tag, .site .tile-body p { display: none; }

  .site .facts { grid-template-columns: 1fr; gap: 12px; }
  .site .card { padding: 22px 20px; }
  .site .seasons { grid-template-columns: 1fr 1fr; gap: 10px; }
  .site .season { border-radius: 20px; padding: 16px; }
  .site .season-temp { font-size: 26px; }
  .site .season p { display: none; }

  .site .footer-cta { flex-direction: column; align-items: flex-start; padding: 32px 20px; }
  .site .footer-cta h2 { font-size: 30px; line-height: 1.05; }

  .site .sec-hero { margin: 0 12px; grid-template-columns: 1fr; gap: 16px; padding: 28px 22px; border-radius: 24px; }
  .site .sec-hero h1 { font-size: 52px; }
  .site .sec-hero p { font-size: 17px; }
  .site .crumbs { margin-bottom: 12px; font-size: 13px; }
  .site .guides { grid-template-columns: 1fr; padding: 20px 12px 32px; gap: 12px; }

  .site .g-hero { margin: 0 12px; }
  .site .g-hero .photo { height: 200px; border-radius: 24px; }
  .site .g-hero-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    margin: -48px 12px 0;
    background: var(--color-card);
    border-radius: 24px;
    padding: 22px;
  }
  .site .g-hero-card h1 { font-size: 34px; }
  .site .g-hero-card p { font-size: 16px; }
  .site .g-layout { padding-top: 24px; gap: 20px; }
  .site .article .content-block { padding: 22px 20px; }
  .site .pager { grid-template-columns: 1fr; padding-top: 24px; }
  .site .pager a.next { grid-column: 1; }
}
