/* PortPedia visual system — nautical palette */
:root {
  --navy: #0b2545;
  --navy-deep: #061a36;
  --navy-soft: #1d3a6e;
  --teal: #1e8a87;
  --teal-bright: #2bb3ad;
  --teal-deep: #0e5e5b;
  --gold: #d4a44d;
  --gold-bright: #e9b85a;
  --sand: #f4ecd8;
  --sand-light: #faf6ec;
  --cream: #fffaf0;
  --ink: #15233b;
  --ink-soft: #3a4a66;
  --muted: #6b7891;
  --line: #e3dec7;
  --line-soft: #ece8d6;
  --danger: #b3413c;

  --serif: 'DM Serif Display', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 1px 3px rgba(11, 37, 69, 0.05);
  --shadow-md: 0 6px 20px rgba(11, 37, 69, 0.10);
  --shadow-lg: 0 18px 48px rgba(11, 37, 69, 0.18);

  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.62;
}
img { max-width: 100%; display: block; }

a { color: var(--teal-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, .display { font-family: var(--serif); color: var(--navy); letter-spacing: -0.01em; line-height: 1.15; font-weight: 400; margin: 0 0 .5em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; margin-top: 1.6rem; }
h3 { font-size: 1.25rem; margin-top: 1.2rem; color: var(--navy-deep); }
h4 { font-size: 1.05rem; color: var(--navy-deep); }
p  { margin: 0 0 1em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ----- header ----- */
.site-header {
  background: var(--navy);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner { max-width: 1180px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-family: var(--serif); font-size: 1.4rem; }
.brand:hover { color: var(--gold); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand small { display: block; font-family: var(--sans); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); margin-top: 2px; }
.primary ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.primary a { color: #e8eef7; font-size: .95rem; font-weight: 500; padding: .35rem 0; border-bottom: 2px solid transparent; }
.primary a:hover { color: var(--gold-bright); border-color: var(--gold); text-decoration: none; }
.search-form { margin-left: auto; display: flex; gap: .4rem; }
.search-form input[type=search], .search-form select { font-family: var(--sans); padding: .5rem .8rem; border: 0; border-radius: 6px; background: rgba(255,255,255,.95); color: var(--ink); font-size: .92rem; outline: none; }
.search-form input[type=search] { width: 220px; }
.search-form button { background: var(--gold); color: var(--navy-deep); border: 0; padding: .5rem 1rem; font-weight: 700; border-radius: 6px; cursor: pointer; font-family: var(--sans); }
.search-form button:hover { background: var(--gold-bright); }

/* ----- hero (home) ----- */
.hero {
  position: relative;
  min-height: 540px;
  background: var(--navy-deep) center/cover no-repeat;
  color: #fff;
  display: flex; align-items: center;
  border-bottom: 6px solid var(--gold);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(6,26,54,.85) 0%, rgba(6,26,54,.45) 55%, rgba(11,37,69,.30) 100%);
}
.hero-inner { position: relative; padding: 4rem 1.25rem 4.5rem; max-width: 1180px; margin: 0 auto; width: 100%; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); max-width: 760px; margin-bottom: .5rem; }
.hero h1 em { color: var(--gold-bright); font-style: italic; }
.hero .lede { font-size: 1.18rem; max-width: 580px; color: rgba(255,255,255,.92); margin-bottom: 2rem; }
.hero-search {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.5);
  padding: .55rem;
  border-radius: 14px;
  display: flex; gap: .4rem; max-width: 720px;
  box-shadow: var(--shadow-lg);
}
.hero-search input { flex: 1 1 220px; border: 0; padding: .85rem 1rem; font-size: 1rem; border-radius: 10px; outline: none; background: transparent; color: var(--ink); }
.hero-search select { border: 0; background: var(--sand-light); padding: .85rem 1rem; border-radius: 10px; font-family: var(--sans); font-size: .95rem; color: var(--ink); cursor: pointer; }
.hero-search button { border: 0; background: var(--gold); color: var(--navy-deep); padding: .85rem 1.6rem; font-weight: 700; font-size: 1rem; border-radius: 10px; cursor: pointer; }
.hero-search button:hover { background: var(--gold-bright); }

.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; max-width: 760px; margin-top: 2.2rem; }
.hero-stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-left: 3px solid var(--gold); padding: .8rem 1rem; border-radius: 8px; backdrop-filter: blur(4px); }
.hero-stat .v { display: block; font-family: var(--serif); font-size: 1.5rem; color: #fff; line-height: 1; }
.hero-stat .l { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); margin-top: .35rem; }

/* ----- region tiles ----- */
.section { padding: 3.5rem 0; }
.section-light { background: var(--sand-light); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 2.2rem; }
.section-head .eyebrow { display: inline-block; color: var(--teal-deep); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .6rem; }
.section-head h2 { font-size: 2.1rem; margin: 0 0 .5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

.region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.region-tile { position: relative; height: 260px; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-md); display: block; color: #fff; }
.region-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.region-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,26,54,.05) 30%, rgba(6,26,54,.85) 100%); }
.region-tile .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem; z-index: 2; }
.region-tile h3 { color: #fff; margin: 0 0 .25rem; font-size: 1.45rem; }
.region-tile p { color: rgba(255,255,255,.92); font-size: .92rem; margin: 0; }
.region-tile .count { display: inline-block; margin-top: .5rem; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold-bright); }
.region-tile:hover img { transform: scale(1.06); }
.region-tile:hover { text-decoration: none; }

/* ----- featured port grid ----- */
.port-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.port-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.port-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.port-card .pc-img { background: var(--navy-soft) center/cover no-repeat; height: 160px; position: relative; }
.port-card .pc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(6,26,54,.6)); }
.port-card .pc-region { position: absolute; top: .65rem; left: .65rem; background: var(--gold); color: var(--navy-deep); font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 4px; font-weight: 700; }
.port-card .pc-flag { position: absolute; top: .55rem; right: .65rem; font-size: 1.6rem; }
.port-card .pc-body { padding: 1rem 1.1rem 1.15rem; flex: 1; display: flex; flex-direction: column; }
.port-card .pc-title { font-family: var(--serif); color: var(--navy); font-size: 1.18rem; margin: 0 0 .3rem; line-height: 1.25; }
.port-card .pc-country { color: var(--ink-soft); font-size: .85rem; margin: 0 0 .5rem; }
.port-card .pc-snip { font-size: .9rem; color: var(--ink-soft); flex: 1; line-height: 1.5; }

/* ----- main page layout ----- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; padding: 2.2rem 0 3.5rem; }
.main { min-width: 0; }
.sidebar { position: relative; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

/* ----- breadcrumbs ----- */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--teal-deep); }
.crumbs span { margin: 0 .4rem; color: var(--muted); }

/* ----- port detail header ----- */
.port-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--teal-deep) 100%); color: #fff; border-radius: var(--radius); padding: 2rem 2rem 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.port-hero::before { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(212, 164, 77, .14); }
.port-hero h1 { color: #fff; margin: 0 0 .25rem; font-size: 2.5rem; position: relative; }
.port-hero .ph-flag { font-size: 2rem; vertical-align: -.25rem; margin-right: .5rem; }
.port-hero .ph-meta { color: rgba(255,255,255,.85); font-size: .98rem; position: relative; }
.port-hero .ph-meta a { color: var(--gold-bright); }
.port-hero .ph-region { display: inline-block; background: var(--gold); color: var(--navy-deep); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 4px; font-weight: 700; margin-bottom: .8rem; position: relative; }

/* port quick facts strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1.5rem; overflow: hidden; }
.facts > div { padding: .9rem 1.1rem; border-right: 1px solid var(--line-soft); }
.facts > div:last-child { border-right: 0; }
.facts .l { font-size: .67rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.facts .v { font-size: .98rem; color: var(--navy); font-weight: 600; }

/* shore excursion list */
.excursions { display: grid; grid-template-columns: 1fr; gap: .9rem; margin: 1.4rem 0; }
.exc { background: #fff; border: 1px solid var(--line-soft); border-left: 4px solid var(--teal); border-radius: 8px; padding: 1rem 1.15rem; box-shadow: var(--shadow-sm); }
.exc h4 { margin: 0 0 .35rem; font-family: var(--sans); font-size: 1.08rem; color: var(--navy); font-weight: 600; }
.exc h4 .num { display: inline-block; background: var(--teal); color: #fff; font-size: .72rem; padding: .15rem .5rem; border-radius: 4px; margin-right: .55rem; vertical-align: 1px; font-weight: 700; }
.exc .meta { font-size: .8rem; color: var(--muted); margin-bottom: .4rem; display: flex; gap: 1.3rem; flex-wrap: wrap; }
.exc .meta strong { color: var(--navy); font-weight: 600; }
.exc p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* attractions list */
.attractions-list { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.4rem; margin: .7rem 0 1.5rem; padding-left: 0; list-style: none; }
.attractions-list li { display: flex; justify-content: space-between; gap: .7rem; padding: .35rem 0; border-bottom: 1px dotted var(--line); font-size: .94rem; }
.attractions-list .nm { color: var(--navy); }
.attractions-list .km { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
@media (max-width: 600px) { .attractions-list { grid-template-columns: 1fr; } }

/* practical info table */
.practical { background: var(--sand-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1rem 0 1.5rem; }
.practical h3 { margin-top: 0; color: var(--navy-deep); }
.practical dl { margin: 0; display: grid; grid-template-columns: 140px 1fr; gap: .6rem 1.2rem; font-size: .94rem; }
.practical dt { color: var(--ink-soft); font-weight: 600; }
.practical dd { margin: 0; color: var(--ink); }
@media (max-width: 540px) { .practical dl { grid-template-columns: 1fr; gap: .15rem .8rem; } .practical dd { margin-bottom: .6rem; } }

/* ----- sidebar widgets ----- */
.box { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.2rem 1.3rem 1.3rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.box h3 { margin: 0 0 .8rem; font-family: var(--sans); font-size: .82rem; color: var(--teal-deep); letter-spacing: .14em; text-transform: uppercase; padding-bottom: .55rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.box ul { margin: 0; padding: 0; list-style: none; }
.box li { padding: .55rem 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.box li:last-child { border-bottom: 0; }
.box li a { color: var(--navy); font-weight: 500; }
.box li a:hover { color: var(--teal); text-decoration: none; }
.box li .sub { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }

.recommend a { color: var(--navy); font-weight: 500; }
.recommend li { padding: .7rem 0; }
.recommend .kicker { display: block; font-size: .7rem; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .15rem; font-weight: 700; }

/* ----- tables ----- */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table th { background: var(--navy); color: #fff; padding: .75rem 1rem; text-align: left; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.table td { padding: .75rem 1rem; border-top: 1px solid var(--line-soft); font-size: .94rem; }
.table tr:hover td { background: var(--sand-light); }

/* country / region pages */
.region-hero {
  position: relative; height: 320px; border-radius: var(--radius); overflow: hidden;
  background: var(--navy-deep) center/cover no-repeat; margin-bottom: 1.6rem;
  display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-md);
}
.region-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,26,54,.20) 30%, rgba(6,26,54,.85) 100%); }
.region-hero .rh-text { position: relative; padding: 1.6rem 2rem; }
.region-hero h1 { color: #fff; margin: 0 0 .35rem; font-size: 2.5rem; }
.region-hero p { color: rgba(255,255,255,.92); margin: 0; font-size: 1.05rem; max-width: 640px; }

/* country list with flags */
.country-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .55rem 1.2rem; margin: 1rem 0; padding: 0; list-style: none; }
.country-list li { padding: .45rem 0; border-bottom: 1px dotted var(--line); }
.country-list a { color: var(--navy); }
.country-list .flg { font-size: 1.1rem; margin-right: .5rem; vertical-align: -1px; }
.country-list .ct { color: var(--muted); font-size: .82rem; margin-left: .35rem; }

/* pagination */
.pager { display: flex; gap: .35rem; flex-wrap: wrap; margin: 2rem 0 1rem; align-items: center; justify-content: center; }
.pager a, .pager span { padding: .55rem .85rem; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 6px; font-size: .9rem; font-weight: 500; }
.pager a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.pager .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* misc */
.muted { color: var(--muted); }
.tagpill { display: inline-block; background: var(--sand); color: var(--navy-deep); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: .22rem .55rem; border-radius: 4px; font-weight: 700; }
.callout { background: #fff8e6; border: 1px solid var(--gold); border-left: 4px solid var(--gold); padding: .85rem 1.1rem; border-radius: 8px; margin: 1rem 0; font-size: .94rem; }

/* footer */
.site-footer { background: var(--navy-deep); color: #c9d3e2; padding: 3rem 0 1.5rem; margin-top: 3rem; border-top: 4px solid var(--gold); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .9rem; padding-bottom: .55rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer a { color: #c9d3e2; font-size: .9rem; }
.site-footer a:hover { color: var(--gold-bright); }
.footer-resources li { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer-resources li:last-child { border-bottom: 0; }
.footer-resources .kicker { display: block; font-size: .65rem; color: var(--gold-bright); letter-spacing: .14em; text-transform: uppercase; }
.footer-bottom { max-width: 1180px; margin: 2.5rem auto 0; padding: 1.4rem 1.25rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #8c97ad; text-align: center; }

/* in-content article styling */
.article { font-size: 1.02rem; line-height: 1.72; color: var(--ink); }
.article p { margin: 0 0 1.05em; }
.article h2 { font-size: 1.55rem; padding-bottom: .35rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.article h3 { font-size: 1.18rem; }
.article ul li { margin-bottom: .35rem; }
.article a { color: var(--teal-deep); border-bottom: 1px dotted var(--teal); }
.article a:hover { color: var(--gold); border-color: var(--gold); }

/* responsive */
@media (max-width: 720px) {
  h1 { font-size: 1.85rem; }
  .header-inner { gap: .8rem; }
  .primary { order: 3; width: 100%; }
  .primary ul { gap: .9rem; flex-wrap: wrap; justify-content: flex-start; }
  .search-form { width: 100%; margin-left: 0; }
  .search-form input[type=search] { flex: 1; width: auto; }
  .hero { min-height: 460px; }
  .hero-inner { padding: 2.4rem 1.25rem 2.8rem; }
  .hero-search { flex-wrap: wrap; }
  .hero-search input { flex: 1 1 100%; }
  .hero-search select, .hero-search button { flex: 1; }
  .port-hero { padding: 1.4rem 1.4rem 1.4rem; }
  .port-hero h1 { font-size: 1.85rem; }
  .layout { padding: 1.4rem 0 2rem; gap: 1.5rem; }
  .region-hero { height: 240px; }
  .region-hero h1 { font-size: 1.7rem; }
  .region-hero .rh-text { padding: 1.1rem 1.2rem; }
}
