/* ============================================================
   Atlasway Blog — style.css
   Tokens match main site style.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1C2E4A;
  --navy-d:  #111E31;
  --gold:    #C8933A;
  --gold-l:  #E8B86A;
  --cream:   #F8F6F1;
  --cream-d: #EDEBE4;
  --white:   #fff;
  --text:    #1A1A1A;
  --mid:     #444;
  --muted:   #717171;
  --border:  #DDD9D0;
  --border-l:#ECEAE4;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --radius:    8px;
  --radius-lg: 12px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container        { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }
.container--narrow{ max-width: 720px;  margin: 0 auto; padding: 0 1.25rem; }

/* ============================================================
   NAV — matches main site
   ============================================================ */

nav {
  background: var(--navy-d);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-d);
  font-family: var(--font-sans);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  transition: color .15s;
}

.nav-links a:hover { color: #fff; }

.nav-cta {
  background: var(--gold);
  color: var(--navy-d) !important;
  padding: .4rem 1.1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background .15s;
}

.nav-cta:hover { background: var(--gold-l) !important; }

/* Dropdown */
.has-dropdown { position: relative; }

.nav-drop-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.65);
  font-size: .85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: 0;
  transition: color .15s;
}

.nav-drop-btn:hover { color: #fff; }

.nav-arrow { font-size: .65rem; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  list-style: none;
  min-width: 200px;
  padding: .5rem 0;
  z-index: 200;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: .5rem 1rem;
  font-size: .82rem;
  color: var(--mid);
  transition: background .1s;
}

.nav-dropdown a:hover { background: var(--cream); color: var(--navy); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .2s;
}

/* ============================================================
   BLOG HERO
   ============================================================ */

.blog-hero {
  background: var(--navy-d);
  padding: 4rem 2rem 4.5rem;
}

.blog-hero__label {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-l);
  margin-bottom: 1rem;
}

.blog-hero__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  color: #fff;
  line-height: 1.2;
  max-width: 600px;
  margin-bottom: 1rem;
}

.blog-hero__description {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  max-width: 520px;
  line-height: 1.75;
}

/* ============================================================
   FILTERS
   ============================================================ */

.blog-filters {
  background: var(--white);
  border-bottom: 1px solid var(--border-l);
  padding: 1rem 0;
  position: sticky;
  top: 60px;
  z-index: 90;
}

.blog-filters__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 500;
  padding: .4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover  { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy-d); border-color: var(--navy-d); color: #fff; }

/* ============================================================
   POST GRID
   ============================================================ */

.blog-grid { padding: 3rem 0 5rem; }

.post-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border-l);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.post-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--cream-d);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__body { padding: 1.5rem; }

.post-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.post-card__pillar {
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold);
  background: rgba(200,147,58,.1);
  padding: .2rem .6rem;
  border-radius: 999px;
}

.post-card__date { font-size: .75rem; color: var(--muted); }

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy-d);
  line-height: 1.3;
  margin-bottom: .6rem;
}

.post-card__excerpt {
  font-size: .85rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__link { font-size: .82rem; font-weight: 500; color: var(--navy); }

.blog-loading, .blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  padding: 3rem 0;
}

/* ============================================================
   POST HERO
   ============================================================ */

.post-hero {
  background: var(--navy-d);
  padding: 3.5rem 0 0;
}

.post-hero__back {
  display: inline-block;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 1.5rem;
  transition: color .15s;
}

.post-hero__back:hover { color: rgba(255,255,255,.85); }

.post-hero__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.post-hero__pillar {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-l);
  background: rgba(200,147,58,.15);
  border: 1px solid rgba(200,147,58,.25);
  padding: .25rem .75rem;
  border-radius: 999px;
}

.post-hero__date { font-size: .78rem; color: rgba(255,255,255,.35); }

.post-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  line-height: 1.2;
  max-width: 680px;
  padding-bottom: 2.5rem;
}

.post-hero__image {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.post-hero__image img {
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 480px;
  object-fit: cover;
}

/* ============================================================
   POST PROSE
   ============================================================ */

.post-content { padding: 3.5rem 0 5rem; }

.post-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.post-prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy-d);
  margin: 2.5rem 0 .75rem;
  line-height: 1.25;
}

.post-prose h2:first-child { margin-top: 0; }

.post-prose h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin: 1.75rem 0 .4rem;
}

.post-prose p {
  font-size: .95rem;
  color: var(--mid);
  line-height: 1.85;
  margin-bottom: .85rem;
}

.post-prose p:last-child { margin-bottom: 0; }

.post-prose ul, .post-prose ol {
  margin: .5rem 0 1.25rem 1.25rem;
  color: var(--mid);
  font-size: .95rem;
  line-height: 1.8;
}

.post-prose li { margin-bottom: .35rem; }

.post-prose a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-prose a:hover { color: var(--gold); }
.post-prose strong { font-weight: 600; color: var(--navy-d); }

.post-prose blockquote {
  border-left: 3px solid var(--gold);
  background: var(--cream-d);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .9rem;
  color: var(--mid);
  line-height: 1.7;
}

/* Tables — scrollable on mobile */
.post-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin: 1.25rem 0 1.5rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.post-prose thead { background: var(--cream-d); }

.post-prose th {
  color: var(--navy-d);
  font-weight: 500;
  padding: .65rem .9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.post-prose td {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--border-l);
  color: var(--mid);
  vertical-align: top;
  white-space: normal;
  min-width: 120px;
}

.post-prose tr:last-child td { border-bottom: none; }
.post-prose tr:nth-child(even) td { background: var(--cream); }

/* ============================================================
   FAQ
   ============================================================ */

.post-faq {
  margin: 2.5rem 0;
  border-top: 1px solid var(--border-l);
  padding-top: 2rem;
}

.post-faq h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy-d);
  margin-bottom: 1.25rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-l);
  padding: .9rem 0;
}

.faq-item:first-of-type { border-top: 1px solid var(--border-l); }

.faq-question {
  font-size: .9rem !important;
  font-weight: 500 !important;
  color: var(--navy-d) !important;
  margin-bottom: .35rem !important;
}

.faq-answer {
  font-size: .86rem !important;
  color: var(--muted) !important;
  line-height: 1.75 !important;
  margin-bottom: 0 !important;
}

/* ============================================================
   POST CTA
   ============================================================ */

.post-cta {
  background: var(--navy-d);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}

.post-cta__heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: .6rem;
}

.post-cta__text {
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.5rem;
}

.post-cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 500;
  padding: .75rem 1.5rem;
  border-radius: 4px;
  transition: all .15s;
}

.btn--primary { background: var(--gold); color: var(--navy-d); }
.btn--primary:hover { background: var(--gold-l); }
.btn--outline { border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.8); }
.btn--outline:hover { border-color: rgba(255,255,255,.6); color: #fff; }

/* ============================================================
   FOOTER — matches main site
   ============================================================ */

footer {
  background: var(--navy-d);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 1.5rem;
}

.footer-brand p {
  color: rgba(255,255,255,.4);
  font-size: .82rem;
  margin-top: .75rem;
  max-width: 240px;
  line-height: 1.7;
}

.footer-col h5 {
  color: rgba(255,255,255,.4);
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }

.footer-col a { color: rgba(255,255,255,.55); font-size: .82rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p, .footer-bottom a { color: rgba(255,255,255,.3); font-size: .75rem; }
.footer-bottom a:hover { color: rgba(255,255,255,.6); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }

  .nav-links.nav__links--open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy-d);
    padding: 1.25rem 2rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .nav-hamburger { display: flex; }

  .post-grid { grid-template-columns: 1fr; }

  .blog-hero { padding: 2.5rem 1.25rem 3rem; }
  .blog-filters__inner { padding: 0 1.25rem; }

  .post-hero__title { font-size: 1.7rem; }
  .post-hero__image { padding: 0 1.25rem; }

  .post-cta { padding: 1.75rem 1.25rem; }
  .post-cta__heading { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .post-card__body { padding: 1.1rem; }
}
