/* ============================================
   PALMA YACHT CREW — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  --navy:       #0D2B3E;
  --navy-dark:  #071A27;
  --navy-mid:   #1A3D56;
  --navy-pale:  #E8EFF5;
  --brass:      #B8892E;
  --brass-light:#D4A84B;
  --teal:       #1A8FAB;
  --teal-light: #E6F5F8;
  --bg:         #F6F4F0;
  --bg-white:   #FFFFFF;
  --text:       #131C24;
  --text-mid:   #546070;
  --text-light: #8A9AAA;
  --border:     #D6DCE2;
  --border-light:#ECF0F3;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 4px rgba(13,43,62,.06);
  --shadow:    0 4px 16px rgba(13,43,62,.10);
  --shadow-lg: 0 12px 40px rgba(13,43,62,.14);

  --max-w: 1160px;
  --max-w-article: 780px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; margin-bottom: .5rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; }
p  { margin-bottom: 1.1rem; }
ul, ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
li { margin-bottom: .35rem; }

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--article {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 4rem 0; }
.section--lg { padding: 6rem 0; }
.section--sm { padding: 2.5rem 0; }
.text-center { text-align: center; }
.text-mid { color: var(--text-mid); }

/* --- Eyebrow / Label --- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: .65rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 20px rgba(0,0,0,.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-main {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: .02em;
}
.logo-sub {
  font-family: var(--font-sans);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-top: 2px;
}

/* Nav */
.nav { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  white-space: nowrap;
  position: relative;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: var(--brass-light); }

/* Dropdown */
.nav-item { position: relative; }
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .2s ease;
}
.dropdown a {
  display: block;
  padding: .5rem .75rem;
  font-size: .85rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-weight: 400;
}
.dropdown a:hover { background: var(--navy-pale); color: var(--navy); }

/* CTA button in nav */
.nav-cta {
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy) !important;
  background: var(--brass-light);
  padding: .45rem 1rem;
  border-radius: var(--radius-sm);
  margin-left: .5rem;
  transition: background .2s, transform .1s;
}
.nav-cta:hover { background: var(--brass); transform: translateY(-1px); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: all .3s;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-mid) 55%, #1A5070 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='.8' fill='rgba(255,255,255,.12)'/%3E%3C/svg%3E") repeat;
  opacity: .5;
}
.hero .container { position: relative; }
.hero-eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; margin-bottom: 1.1rem; max-width: 740px; }
.hero-lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,.78);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stat-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--brass-light);
  line-height: 1;
}
.hero-stat span {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  letter-spacing: .05em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  line-height: 1;
  text-decoration: none;
}
.btn-primary {
  background: var(--brass-light);
  color: var(--navy-dark);
  border-color: var(--brass-light);
}
.btn-primary:hover { background: var(--brass); border-color: var(--brass); color: var(--navy-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.35);
}
.btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); transform: translateY(-1px); }
.btn-sm { padding: .55rem 1.1rem; font-size: .82rem; }

/* ============================================
   CARDS
   ============================================ */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
.card-grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.card-icon--navy { background: var(--navy-pale); }
.card-icon--teal { background: var(--teal-light); }
.card-icon--brass { background: #FDF3DF; }
.card h3 { color: var(--navy); margin-bottom: .4rem; font-size: 1.1rem; }
.card p { font-size: .9rem; color: var(--text-mid); margin-bottom: 0; flex: 1; }
.card-arrow {
  margin-top: 1rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.card-arrow::after { content: '→'; }

/* Feature card (larger) */
.feature-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.feature-card h2 { color: #fff; }
.feature-card p { color: rgba(255,255,255,.75); }

/* ============================================
   LOCATION BADGE GRID
   ============================================ */
.location-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.location-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: .45rem 1rem;
  font-size: .83rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: all .2s;
}
.location-badge:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.location-badge .flag { font-size: 1rem; }
.location-badge .members {
  font-size: .72rem;
  color: var(--text-light);
  font-weight: 400;
}
.location-badge:hover .members { color: rgba(255,255,255,.65); }

/* ============================================
   ARTICLE LAYOUT
   ============================================ */
.article-hero {
  background: var(--navy);
  padding: 3.5rem 0 3rem;
  color: #fff;
}
.article-hero h1 { color: #fff; margin-bottom: .75rem; }
.article-hero .lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 620px;
  margin-bottom: 1.25rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  flex-wrap: wrap;
}
.article-meta strong { color: rgba(255,255,255,.8); font-weight: 500; }

/* TOC */
.toc {
  background: var(--navy-pale);
  border: 1px solid var(--border);
  border-left: 3px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-mid);
  margin-bottom: .75rem;
  font-family: var(--font-sans);
  font-weight: 600;
}
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .25rem; font-size: .9rem; }
.toc a { color: var(--navy); font-weight: 500; }
.toc a:hover { color: var(--teal); }

/* Article body */
.article-body { padding: 3rem 0 4rem; }
.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border-light);
}
.article-body h2:first-child { margin-top: 0; border-top: none; }
.article-body h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; }

/* Callout boxes */
.callout {
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  font-size: .92rem;
}
.callout--info { background: var(--teal-light); border-left: 3px solid var(--teal); }
.callout--warning { background: #FFF8E6; border-left: 3px solid var(--brass-light); }
.callout--tip { background: var(--navy-pale); border-left: 3px solid var(--navy); }
.callout strong { display: block; margin-bottom: .3rem; color: var(--navy); }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.data-table th {
  background: var(--navy);
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .05em;
}
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border-light); }
.data-table tr:hover td { background: var(--navy-pale); }
.data-table td:first-child { font-weight: 500; color: var(--navy); }

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  overflow: hidden;
}
.faq-q {
  padding: 1rem 1.25rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  background: var(--bg-white);
  transition: background .2s;
}
.faq-q:hover { background: var(--navy-pale); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--teal); flex-shrink: 0; margin-left: 1rem; }
.faq-a {
  padding: 0 1.25rem 1rem;
  font-size: .9rem;
  color: var(--text-mid);
  background: var(--bg-white);
}

/* ============================================
   SIDEBAR LAYOUT (article + sidebar)
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.article-sidebar { position: sticky; top: 90px; }
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-card h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-mid);
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 1rem;
}
.sidebar-card ul { padding: 0; list-style: none; margin: 0; }
.sidebar-card ul li { border-bottom: 1px solid var(--border-light); padding: .5rem 0; font-size: .88rem; }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { color: var(--navy); font-weight: 500; }
.sidebar-card ul li a:hover { color: var(--teal); }

/* ============================================
   COMMUNITY BANNER
   ============================================ */
.community-section {
  background: var(--navy);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.community-section h2 { color: #fff; margin-bottom: .75rem; }
.community-section p { color: rgba(255,255,255,.72); max-width: 560px; margin: 0 auto 2rem; }
.community-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.community-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--brass-light);
  line-height: 1;
}
.community-stat span { font-size: .82rem; color: rgba(255,255,255,.6); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  padding: .75rem 0;
  font-size: .82rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-mid); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span { margin: 0 .4rem; }

/* ============================================
   HUB PAGE HEADER
   ============================================ */
.hub-hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
  padding: 3.5rem 0 3rem;
  color: #fff;
}
.hub-hero h1 { color: #fff; margin-bottom: .75rem; }
.hub-hero p { color: rgba(255,255,255,.72); max-width: 580px; font-size: 1.05rem; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1.5rem;
}
.footer-brand .logo-main { color: #fff; }
.footer-brand p {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  margin-top: .75rem;
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h5 {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: .9rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul li a {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav.nav--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    gap: .25rem;
  }
  .nav.nav--open .nav-cta { text-align: center; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 .75rem;
  }
  .dropdown a { color: rgba(255,255,255,.65); font-size: .83rem; }
  .dropdown a:hover { background: transparent; color: #fff; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .community-stats { gap: 1.5rem; }
  .hero-stat-row { gap: 1.5rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .card-grid--4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ============================================
   IMAGE SUPPORT
   ============================================ */

/* Hero sections with background photo */
.hero.has-bg,
.hub-hero.has-bg,
.article-hero.has-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}
.hero.has-bg::before,
.article-hero.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,26,39,.72) 0%, rgba(7,26,39,.58) 100%);
}
.hub-hero.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,26,39,.82) 0%, rgba(7,26,39,.72) 100%);
}
.hero.has-bg .container,
.hub-hero.has-bg .container,
.hub-hero.has-bg .container--article,
.article-hero.has-bg .container,
.article-hero.has-bg .container--article {
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  .hero.has-bg,
  .hub-hero.has-bg,
  .article-hero.has-bg {
    background-attachment: scroll;
  }
}

/* Full-width scenic image break between sections */
.img-break {
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: block;
}
@media (max-width: 768px) {
  .img-break {
    height: 260px;
    background-attachment: scroll;
  }
}

/* In-article figure image */
.article-img {
  margin: 2.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0,0,0,.13);
}
.article-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
.article-img figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .55rem .75rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Portrait image floated into article text */
.article-img--portrait {
  float: right;
  width: 300px;
  margin: 0 0 1.5rem 2rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0,0,0,.15);
}
.article-img--portrait img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  display: block;
}
@media (max-width: 640px) {
  .article-img--portrait {
    float: none;
    width: 100%;
    margin: 1.5rem 0;
  }
  .article-img img { height: 260px; }
}

/* Two images side by side */
.img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.img-pair img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
@media (max-width: 600px) {
  .img-pair { grid-template-columns: 1fr; }
}
