:root {
  --bg: #f5f8f7;
  --surface: #ffffff;
  --ink: #172126;
  --muted: #64727a;
  --line: #dfe8e7;
  --brand: #087f8c;
  --brand-dark: #07545c;
  --sun: #f2b84b;
  --leaf: #4f8a5b;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(23, 33, 38, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar,
.nav,
main,
.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand-logo {
  width: 168px;
  height: 52px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.search {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbfb;
}

.search input,
.search button {
  height: 44px;
  border: 0;
  font: inherit;
}

.search input {
  min-width: 0;
  padding: 0 18px;
  background: transparent;
}

.search button,
.refresh-button {
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-weight: 750;
}

.search button {
  padding: 0 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.weather-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-pill strong {
  color: var(--brand-dark);
}

.nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px;
}

.nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #334047;
  font-weight: 700;
  font-size: 0.9rem;
}

.nav a:hover {
  background: #e7f2f2;
  color: var(--brand-dark);
}

.city-filter button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #334047;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
}

.city-filter button:hover,
.city-filter button.active {
  background: #e7f2f2;
  color: var(--brand-dark);
}

main {
  padding: 28px 0 42px;
}

.rss-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
  min-height: 300px;
  padding: 34px;
  margin-bottom: 24px;
  border-radius: 0;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(5, 33, 38, 0.34), rgba(5, 33, 38, 0.88)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1600&q=82") center / cover;
}

.rss-hero .eyebrow {
  color: #fff;
}

.rss-hero h1 {
  margin-bottom: 10px;
}

.rss-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.live-box {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.live-box span,
.live-box strong {
  display: block;
}

.live-box span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.feed-count {
  color: var(--muted);
  font-weight: 800;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  gap: 18px;
}

.lead-card,
.news-card,
.beach-grid article,
.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lead-card {
  display: block;
  position: relative;
  min-height: 470px;
}

.lead-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(6, 27, 32, 0.82));
}

.lead-content {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
  bottom: 26px;
  color: #fff;
}

.tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead-card .tag {
  color: #fff;
  background: rgba(8, 127, 140, 0.9);
  padding: 6px 9px;
  border-radius: 999px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead-content p {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.news-card.compact {
  display: grid;
  grid-template-rows: 210px auto;
}

.news-card div {
  padding: 16px;
}

.news-card h2,
.news-card h3 {
  margin: 5px 0 0;
  line-height: 1.16;
}

.ad-band {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 24px 0;
  border: 1px dashed #b8cac9;
  border-radius: var(--radius);
  background: #eef6f5;
  color: var(--muted);
  text-align: center;
}

.ad-band strong,
.ad-band span {
  display: block;
}

.ad-band span,
.ad-box span {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.section-head.slim {
  margin-bottom: 12px;
}

.section-head.slim h2 {
  font-size: 1.08rem;
}

.refresh-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
}

.header-refresh {
  min-height: 44px;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.feed-grid.only-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  background: transparent;
  border-top: 0;
}

.feed-card {
  min-width: 0;
}

.feed-grid.only-feed .feed-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border-radius: var(--radius);
  box-shadow: none;
}

.feed-grid.only-feed .card-link {
  display: flex;
  min-height: 100%;
  flex: 1;
  flex-direction: column;
}

.feed-card img {
  aspect-ratio: 16 / 10;
  height: auto;
}

.feed-grid.only-feed .feed-card img {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
}

.empty-state {
  grid-column: 1 / -1;
}

.feed-card .content {
  padding: 14px;
}

.feed-grid.only-feed .feed-card .content {
  display: flex;
  min-height: 220px;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.feed-card h3 {
  margin: 5px 0 8px;
  font-size: 1.08rem;
  line-height: 1.22;
  display: -webkit-box;
  min-height: 2.64em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feed-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  min-height: 4.15em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.feed-grid.only-feed .meta {
  margin-top: auto;
}

.like-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fcfc;
  color: #334047;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.like-button:hover,
.like-button.liked {
  border-color: #f0b5bf;
  background: #fff0f3;
  color: #b42342;
}

.like-button:disabled {
  cursor: default;
  opacity: 0.8;
}

.like-icon {
  color: #e23b59;
  font-size: 1rem;
  line-height: 1;
}

.meta {
  color: #7a878d;
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 112px;
}

.widget {
  padding: 18px;
  box-shadow: none;
}

.weather-list {
  display: grid;
  gap: 10px;
}

.weather-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.weather-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.weather-list span {
  color: var(--muted);
}

.ad-box {
  min-height: 250px;
  display: grid;
  place-items: center;
  background: #fff8e8;
  border-style: dashed;
  color: #7b6633;
  text-align: center;
}

.event-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.event-list li {
  padding-left: 12px;
  border-left: 3px solid var(--sun);
}

.event-list strong,
.event-list span {
  display: block;
}

.event-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-links a,
.category-grid a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fcfc;
  color: #26343a;
  font-weight: 750;
  font-size: 0.9rem;
}

.quick-links a:hover,
.category-grid a:hover {
  border-color: #a7cccc;
  background: #edf8f7;
}

.beach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.beach-grid img {
  aspect-ratio: 16 / 11;
  height: auto;
}

.beach-grid h3,
.beach-grid p {
  padding: 0 14px;
}

.beach-grid h3 {
  margin: 14px 0 5px;
}

.beach-grid p {
  color: var(--muted);
  margin-bottom: 16px;
}

.category-band {
  margin-top: 34px;
}

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

.page-hero {
  min-height: 310px;
  display: grid;
  align-items: end;
  padding: 34px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 38, 44, 0.2), rgba(7, 38, 44, 0.84)),
    var(--hero-image, url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1600&q=82")) center / cover;
}

.page-hero h1 {
  max-width: 880px;
  margin-bottom: 10px;
}

.page-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.content-panel,
.listing-card,
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-panel {
  padding: 28px;
}

.article-body {
  color: #26343a;
  font-size: 1.05rem;
}

.article-body h2 {
  margin-top: 28px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-meta {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 20px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.listing-card img {
  aspect-ratio: 16 / 10;
  height: auto;
}

.listing-card div {
  padding: 16px;
}

.listing-card h2,
.listing-card h3 {
  margin-bottom: 8px;
  line-height: 1.16;
}

.listing-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.info-card {
  padding: 18px;
}

.info-card h3 {
  margin-bottom: 8px;
}

.info-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  color: var(--ink);
}

.site-footer p {
  max-width: 560px;
  margin: 6px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: flex-end;
}

.developer-credit {
  margin: 0;
  align-self: end;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .hero-grid,
  .rss-hero,
  .portal-layout,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .topbar,
  .nav,
  main,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    min-height: auto;
    padding: 12px 0 10px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand small,
  .weather-pill span {
    display: none;
  }

  .brand-logo {
    width: 126px;
    height: 42px;
  }

  .weather-pill {
    padding: 8px 10px;
  }

  .lead-card {
    min-height: 430px;
  }

  .lead-content {
    left: 18px;
    right: 18px;
  }

  .feed-grid,
  .feed-grid.only-feed,
  .beach-grid,
  .sidebar,
  .category-grid,
  .listing-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .feed-grid.only-feed .feed-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 214px;
  }

  .feed-grid.only-feed .card-link {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .feed-grid.only-feed .feed-card img {
    width: 132px;
    min-height: 148px;
    aspect-ratio: auto;
  }

  .feed-grid.only-feed .feed-card .content {
    min-height: 148px;
    padding: 12px;
  }

  .feed-card h3 {
    min-height: 2.44em;
    font-size: 0.98rem;
  }

  .feed-card p {
    min-height: 3.95em;
    font-size: 0.86rem;
  }

  .like-button {
    grid-column: 1 / -1;
    margin: 0 12px 12px;
  }

  .page-hero,
  .content-panel {
    padding: 20px;
  }

  .rss-hero {
    padding: 22px;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }

  .site-footer nav {
    justify-content: flex-start;
    margin-top: 18px;
  }
}
