/*
Theme Name: SHP – Travel & Lifestyle
Theme URI: https://sandyhuongpham.com
Author: Sandy Huong Pham
Author URI: https://sandyhuongpham.com
Description: Minimal editorial theme for SHP – a Vietnamese travel & lifestyle blog by Sandy Huong Pham.
Version: 1.3.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shp
Tags: blog, travel, lifestyle, minimal, elementor
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #ffffff;
  --text:    #0f0f0f;
  --border:  #e5e5e5;
  --muted:   #888888;
  --accent:  #9b7b5a;
  --dark:    #111111;

  --font-head: 'Be Vietnam Pro', sans-serif;
  --font-body: 'Be Vietnam Pro', sans-serif;

  --max-w: 1200px;
  --max-w-narrow: 860px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .65; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p { margin-bottom: 1.25rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}
.container--narrow {
  max-width: var(--max-w-narrow);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section--sm { padding-block: clamp(2rem, 4vw, 4rem); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background .3s, border-color .3s;
}
#site-header.scrolled {
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding-inline: clamp(1rem, 4vw, 3rem);
  max-width: var(--max-w);
  margin-inline: auto;
}

/* Logo */
.site-logo {
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.site-logo__name {
  font-family: var(--font-head);
  font-weight: 200;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: 0.18em;
  color: var(--text);
  text-transform: uppercase;
}
.site-logo__sub {
  font-size: .55rem;
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.site-logo { align-items: flex-start; }

/* Hero is now white — header stays dark-text throughout, no inversion needed. */


/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-left: .75rem;
}
.lang-switch a {
  color: var(--muted);
  transition: color .2s;
  line-height: 1;
}
.lang-switch a:hover  { color: var(--text); opacity: 1; }
.lang-switch a.is-active { color: var(--text); }
.lang-switch__sep { color: var(--border); line-height: 1; }

.primary-nav + .lang-switch { margin-left: 1.25rem; }


/* ============================================================
   PRIMARY NAVIGATION
   ============================================================ */
.primary-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0; margin: 0;
  gap: 0;
}

.primary-nav li { position: relative; }

.primary-nav > ul > li > a {
  display: block;
  padding: .4rem .9rem;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  transition: color .2s;
}
.primary-nav > ul > li > a:hover { color: var(--accent); opacity: 1; }

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 200px;
  list-style: none;
  padding: .5rem 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.primary-nav .sub-menu li a {
  display: block;
  padding: .45rem 1.2rem;
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--text);
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.primary-nav .sub-menu li a:hover {
  color: var(--accent);
  background: #fafafa;
  opacity: 1;
}

/* Last menu group's dropdowns align to the right edge */
.primary-nav > ul:last-child .sub-menu { left: auto; right: 0; transform: none; }
.primary-nav > ul:last-child li:hover > .sub-menu { transform: translateY(0); }

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.hero__bg { display: none; }
.hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 720px;
}
.hero__eyebrow {
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero__sub {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.65;
}
.hero__ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background .25s, color .25s;
  cursor: pointer;
}
.btn--light {
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn--light:hover { background: #fff; color: var(--text); opacity: 1; }

.btn--outline {
  color: var(--text);
  border-color: var(--text);
  background: transparent;
}
.btn--outline:hover { background: var(--text); color: #fff; opacity: 1; }

.btn--dark {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}
.btn--dark:hover { background: #333; opacity: 1; }

.btn--accent {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.btn--accent:hover { background: #7a5c3e; border-color: #7a5c3e; opacity: 1; }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.section-label {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 200;
  margin-bottom: 1rem;
}
.section-header { text-align: center; margin-bottom: 3rem; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }

.cat-card {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  aspect-ratio: 3/4;
  display: flex;
  align-items: flex-end;
}
.cat-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
  opacity: .55;
}
.cat-card:hover .cat-card__img { transform: scale(1.05); }
.cat-card__body {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  color: #fff;
  width: 100%;
}
.cat-card__label {
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: .4rem;
  font-weight: 400;
}
.cat-card__title {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 200;
  line-height: 1.2;
}

/* ============================================================
   POST CARDS
   ============================================================ */
.post-card { display: flex; flex-direction: column; }
.post-card__thumb {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f5f5f5;
  margin-bottom: 1.25rem;
}
.post-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}
.post-card__cat {
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card__date {
  font-size: .65rem;
  color: var(--muted);
  font-weight: 400;
}
.post-card__title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 200;
  line-height: 1.35;
  margin-bottom: .6rem;
}
.post-card__title a:hover { opacity: .65; }
.post-card__excerpt {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}
.post-card__read-more {
  margin-top: 1rem;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.post-card__read-more::after { content: '→'; }

/* Post grid (index / archive) */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 2.5rem; }

/* ============================================================
   ABOUT STRIP (white)
   ============================================================ */
.about-strip {
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-block: clamp(4rem, 8vw, 7rem);
}
.about-strip .container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-strip__label {
  font-size: .6rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 400;
}
.about-strip__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 200;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.about-strip__text {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.about-strip__image { border-radius: 0; overflow: hidden; }
.about-strip__image img { width: 100%; height: 480px; object-fit: cover; }

/* ============================================================
   ABOUT PAGE — PILLARS
   ============================================================ */
.about-pillar {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.about-pillar__label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.about-pillar__title {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  margin-bottom: .75rem;
}
.about-pillar__text {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ============================================================
   CONNECT SECTION
   ============================================================ */
.connect-section {
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--bg);
}
.connect-section .container--narrow { text-align: center; }
.connect-section .section-label { justify-content: center; }

.connect-form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.connect-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-field {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.form-field label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.form-field input,
.form-field textarea {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: .7rem 0;
  background: transparent;
  font-size: .9rem;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--text); }
.form-field textarea { resize: vertical; min-height: 120px; }

.connect-form__submit { text-align: center; margin-top: .5rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer { border-top: 1px solid var(--border); }

.footer-social {
  padding: 2rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  border-bottom: 1px solid var(--border);
}
.footer-social__label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-social__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}
.footer-social__links a {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-social__links a svg { width: 16px; height: 16px; }

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  list-style: none;
}
.footer-links li + li::before {
  content: '—';
  padding-inline: .75rem;
  color: var(--border);
}
.footer-links a {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-links a:hover { color: var(--text); opacity: 1; }

.footer-copyright {
  text-align: center;
  padding: 1.25rem;
  font-size: .65rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: .06em;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-header { padding-top: 8rem; padding-bottom: 3rem; text-align: center; }
.single-header .container--narrow { }
.post-eyebrow {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.single-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 200;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: .7rem;
  color: var(--muted);
  font-weight: 400;
}
.post-meta-row span { display: flex; align-items: center; gap: .3rem; }

.single-featured-img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  margin-bottom: 4rem;
}

.single-content {
  padding-bottom: 4rem;
}
.entry-content {
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 300;
}
.entry-content h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 200; margin: 2.5rem 0 1rem; }
.entry-content h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 300; margin: 2rem 0 .75rem; }
.entry-content p { margin-bottom: 1.4rem; }
.entry-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-size: 1.1rem;
  font-weight: 200;
  color: var(--muted);
  font-style: italic;
}
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption {
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  margin-top: .5rem;
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.post-tags a {
  display: inline-block;
  padding: .3rem .9rem;
  border: 1px solid var(--border);
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}
.post-tags a:hover { border-color: var(--text); color: var(--text); opacity: 1; }

/* Prev/Next nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-block: 3rem;
}
.post-nav__item {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.post-nav__item:first-child { border-right: 1px solid var(--border); }
.post-nav__item--next { text-align: right; align-items: flex-end; }
.post-nav__dir {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-nav__title {
  font-size: .9rem;
  font-weight: 200;
  line-height: 1.35;
  color: var(--text);
}

/* Related posts */
.related-posts { margin-bottom: 4rem; }
.related-posts .section-label { margin-bottom: 2rem; }

/* Comments */
.comments-area {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  margin-top: 3rem;
}
.comments-area h2 {
  font-size: 1.4rem;
  font-weight: 200;
  margin-bottom: 2rem;
}
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.comment-author { font-size: .8rem; font-weight: 500; }
.comment-meta { font-size: .7rem; color: var(--muted); margin-bottom: .75rem; }

/* Comment form */
.comment-form { margin-top: 2.5rem; }
.comment-form h3 { font-size: 1.2rem; font-weight: 200; margin-bottom: 1.5rem; }
.comment-form .form-submit { margin-top: 1rem; }
.comment-form input[type="submit"] {
  cursor: pointer;
  padding: .75rem 2rem;
  background: var(--text);
  color: #fff;
  border: none;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s;
}
.comment-form input[type="submit"]:hover { background: #333; }

/* ============================================================
   INNER PAGE
   ============================================================ */
.page-hero {
  padding-top: 7rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}
.page-hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 200;
  letter-spacing: -0.02em;
}

/* ============================================================
   ARCHIVE / INDEX with SIDEBAR
   ============================================================ */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  padding-bottom: 5rem;
}

/* Sidebar */
.widget {
  margin-bottom: 2.5rem;
}
.widget-title {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 300;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a:hover { color: var(--accent); opacity: 1; }

.search-form { display: flex; }
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  padding: .6rem .8rem;
  font-size: .85rem;
  font-weight: 300;
  outline: none;
  background: transparent;
}
.search-form button {
  padding: .6rem 1rem;
  background: var(--text);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: .75rem;
  transition: background .2s;
}
.search-form button:hover { background: #333; }

/* Archive header */
.archive-header {
  padding-top: 7rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.archive-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 200;
}

/* ============================================================
   404 & SEARCH
   ============================================================ */
.error-page, .search-page {
  padding-top: 10rem;
  padding-bottom: 6rem;
  text-align: center;
}
.error-code {
  font-size: clamp(6rem, 15vw, 14rem);
  font-weight: 200;
  line-height: 1;
  color: var(--border);
  margin-bottom: 0;
}
.error-title {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 200;
  margin-bottom: 1rem;
}
.error-text { color: var(--muted); margin-bottom: 2rem; }

/* Search results */
.search-results-count {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .about-strip .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-strip__image { display: block; }
  .about-strip__image img { height: 320px; }
}

@media (max-width: 900px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  #sidebar { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   MOBILE NAV OVERLAY — active on any screen when .mobile-nav-open
   ============================================================ */
#mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 999;
  overflow-y: auto;
  padding: 5rem 2rem 2rem;
}
body.mobile-nav-open { overflow: hidden; }
body.mobile-nav-open #mobile-nav { display: block; }

#mobile-nav nav ul {
  list-style: none;
  padding: 0; margin: 0;
}
#mobile-nav nav > ul > li > a {
  font-size: 1.1rem;
  font-weight: 200;
  letter-spacing: .05em;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  display: block;
  width: 100%;
  text-transform: none;
  color: var(--text);
}
#mobile-nav nav > ul > li > a:hover { color: var(--accent); opacity: 1; }
#mobile-nav nav .sub-menu {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
  border: none;
  min-width: 0;
  padding: 0 0 0 1.5rem;
  display: none;
}
#mobile-nav nav .sub-menu.is-open { display: block; }
#mobile-nav nav .sub-menu li a {
  padding: .55rem 0;
  font-size: .9rem;
  border-bottom: 1px solid #f5f5f5;
  display: block;
  width: 100%;
  color: var(--muted);
}
#mobile-nav .lang-switch {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  /* Header */
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  /* Lang switch is inside the mobile overlay — hide it in the header bar */
  #site-header .lang-switch { display: none; }

  /* Compact spacing */
  .section { padding-block: clamp(1.75rem, 4vw, 3rem); }
  .section--sm { padding-block: clamp(1.25rem, 3vw, 2rem); }
  .page-hero { padding-top: 5rem; padding-bottom: 1.25rem; margin-bottom: 2rem; }
  .about-strip { padding-block: 2.5rem; }

  .category-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .connect-form__row { grid-template-columns: 1fr; }
  .footer-social { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-links { gap: 0; }

  .hero__title { font-size: clamp(2rem, 8vw, 3.5rem); }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; align-items: center; }

  /* Extra compact on small phones */
  .section { padding-block: 1.75rem; }
  .section--sm { padding-block: 1.25rem; }
  .page-hero { padding-top: 4.5rem; padding-bottom: 1rem; margin-bottom: 1.25rem; }
  .about-strip { padding-block: 2rem; }
  .about-strip .container { gap: 1.5rem; }
  .about-strip__image img { height: 220px; }
  .section-header { margin-bottom: 1.75rem; }
}

/* ============================================================
   ELEMENTOR OVERRIDES
   ============================================================ */
.elementor-section,
.elementor-container { max-width: 100%; }

/* Full-width template */
body.template-full-width #primary { width: 100%; max-width: 100%; }
body.template-blank #site-header,
body.template-blank #site-footer,
body.template-blank .connect-section { display: none; }

/* ============================================================
   WP ALIGNMENT CLASSES
   ============================================================ */
.alignleft { float: left; margin: 0 2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 2rem; }
.aligncenter { margin-inline: auto; display: block; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide { margin-inline: -3rem; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.divider { border: none; border-top: 1px solid var(--border); margin-block: 2rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
