/* Single Post Styles — Style Envie */
/* NymphaTrial and Sofia Pro are loaded via your theme's enqueued font files */

:root {
  --se-black: #0a0a0a;
  --se-white: #fafafa;
  --se-gray:  #f2f2f0;
  --se-mid:   #999;
  --se-rule:  #e0e0e0;
  --se-font-display: 'NymphaTrial', Georgia, serif;
  --se-font-body:    'Sofia Pro', sans-serif;
}

/* ── FULL-WIDTH OVERRIDES ──
 *
 * Hello Elementor applies max-width constraints via:
 *   1. $content_width (800px) → we override via hello_elementor_content_width filter
 *   2. .site-main { max-width } in theme.css
 *   3. .page-content { max-width } in theme.css
 *   4. Elementor's .elementor-container inline styles
 *
 * Our single.php now uses <main class="site-main se-post-wrap"> so the
 * element is BOTH .site-main (for Hello Elementor) and .se-post-wrap (for us).
 */

/* Override the theme's .site-main width */
body.single-post main.site-main,
body.single-post main.site-main.se-post-wrap,
body.single-post #content.site-main,
body.single-post .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Override .page-content (used by Hello Elementor's own single template) */
body.single-post .page-content {
  max-width: 100% !important;
  width: 100% !important;
}

/* Override Elementor container widths if they wrap our content */
body.single-post .elementor-container,
body.single-post .elementor-section-boxed > .elementor-container,
body.single-post .elementor-widget-container,
body.single-post .elementor-widget-theme-post-content .elementor-widget-container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── BASE WRAP ── */

.se-post-wrap * { box-sizing: border-box; }

.se-post-wrap {
  background: var(--se-white);
  font-family: var(--se-font-body);
  color: var(--se-black);
  padding: 0 0 80px;
  max-width: 100% !important;
  width: 100% !important;
}

/* ── HERO ── */

.se-post-hero {
  position: relative;
  width: 100%;
  max-height: 580px;
  overflow: hidden;
  background: var(--se-black);
}

.se-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.82;
}

.se-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.72) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 48px 60px;
}

.se-post-hero-inner { max-width: 760px; }

.se-post-cat {
  display: inline-block;
  font-family: var(--se-font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--se-white);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 5px 14px;
  margin-bottom: 18px;
  text-decoration: none;
}

.se-post-cat:hover { border-color: #fff; }

.se-post-hero-title {
  font-family: var(--se-font-display);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 300;
  line-height: 1.12;
  color: var(--se-white);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.se-post-meta-hero {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

.se-post-meta-hero a { color: inherit; text-decoration: none; }
.se-post-meta-hero a:hover { color: #fff; }
.se-post-meta-hero span { margin: 0 10px; opacity: 0.4; }

/* ── PLAIN HEADER FALLBACK ── */

.se-post-header-plain {
  background: var(--se-gray);
  padding: 72px 60px 52px;
  text-align: center;
  border-bottom: 1px solid var(--se-rule);
}

.se-post-header-plain .se-post-cat {
  color: var(--se-black);
  border-color: rgba(0,0,0,0.3);
}

.se-post-header-plain .se-post-hero-title { color: var(--se-black); }
.se-post-header-plain .se-post-meta-hero { color: var(--se-mid); }

/* ── POST BODY / CONTENT ── */

.se-post-body {
  width: 100%;
  max-width: 100%;
  padding: 64px 60px 0;
  box-sizing: border-box;
}

.se-post-body p {
  font-size: 16px;
  line-height: 1.85;
  font-weight: 300;
  color: #2a2a2a;
  margin: 0 0 1.6em;
}

.se-post-body h2 {
  font-family: var(--se-font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--se-black);
  margin: 2.4em 0 0.8em;
  letter-spacing: -0.01em;
}

.se-post-body h3 {
  font-family: var(--se-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--se-black);
  margin: 2em 0 0.8em;
}

.se-post-body img {
  width: 100%;
  height: auto;
  display: block;
  margin: 2.4em 0;
}

.se-post-body blockquote {
  margin: 2.4em 0;
  padding: 28px 40px;
  border-left: 2px solid var(--se-black);
  background: var(--se-gray);
  font-family: var(--se-font-display);
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  color: var(--se-black);
}

.se-post-body blockquote p { font-size: inherit; font-family: inherit; font-style: inherit; color: inherit; margin: 0; }

.se-post-body a {
  color: var(--se-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.se-post-body ul,
.se-post-body ol {
  padding-left: 1.4em;
  margin: 0 0 1.6em;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 300;
  color: #2a2a2a;
}

/* ── DIVIDER ── */

.se-rule-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 56px 60px 0;
}

/* ── TAGS ── */

.se-post-tags {
  width: 100%;
  padding: 0 60px;
  margin: 32px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.se-post-tags-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--se-mid);
  margin-right: 4px;
}

.se-post-tags a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--se-black);
  border: 1px solid var(--se-rule);
  padding: 5px 14px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.se-post-tags a:hover {
  border-color: var(--se-black);
  background: var(--se-black);
  color: var(--se-white);
}

/* ── AUTHOR ── */

.se-author-box {
  width: 100%;
  margin: 48px 0 0;
  padding: 0 60px;
}

.se-author-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 32px;
  background: var(--se-gray);
  border-top: 2px solid var(--se-black);
}

.se-author-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.se-author-info-name {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--se-mid);
  margin: 0 0 4px;
}

.se-author-info-title {
  font-family: var(--se-font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--se-black);
  margin: 0 0 8px;
}

.se-author-info-bio {
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
  color: #555;
  margin: 0;
}

/* ── RELATED POSTS ── */

.se-related {
  max-width: 1100px;
  margin: 72px auto 0;
  padding: 0 24px;
}

.se-related-heading {
  font-family: var(--se-font-body);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--se-mid);
  margin: 0 0 32px;
  text-align: center;
}

.se-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.se-related-item { position: relative; overflow: hidden; }
.se-related-item a { display: block; text-decoration: none; }

.se-related-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.se-related-item:hover img { transform: scale(1.04); }

.se-related-item-placeholder {
  aspect-ratio: 3/4;
  background: #f2f2f0;
  width: 100%;
  display: block;
}

.se-related-item-info { padding: 16px 4px 0; }

.se-related-item-cat {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--se-mid);
  margin: 0 0 6px;
}

.se-related-item-title {
  font-family: var(--se-font-display);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--se-black);
  line-height: 1.25;
  margin: 0;
}

/* ── PREV/NEXT NAV ── */

.se-post-nav {
  max-width: 1100px;
  margin: 64px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--se-rule);
  padding-top: 40px;
  gap: 24px;
}

.se-post-nav a {
  text-decoration: none;
  color: var(--se-black);
  flex: 1;
}

.se-post-nav-label {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--se-mid);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.se-post-nav-title {
  font-family: var(--se-font-display);
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  transition: opacity 0.2s;
}

.se-post-nav a:hover .se-post-nav-title { opacity: 0.5; }
.se-post-nav .se-nav-next { text-align: right; }

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  .se-post-hero-overlay { padding: 32px 24px; }
  .se-post-header-plain { padding: 52px 24px 36px; }
  .se-post-body { padding: 40px 24px 0; }
  .se-post-tags { padding: 0 24px; }
  .se-author-box { padding: 0 24px; }
  .se-rule-divider { margin: 40px 24px 0; }
  .se-related-grid { grid-template-columns: 1fr 1fr; }
  .se-related-grid .se-related-item:last-child { display: none; }
  .se-author-inner { flex-direction: column; gap: 16px; }
  .se-post-nav { flex-direction: column; }
  .se-nav-next { text-align: left; }
}

@media (max-width: 480px) {
  .se-post-body { padding: 32px 16px 0; }
  .se-post-tags { padding: 0 16px; }
  .se-author-box { padding: 0 16px; }
  .se-rule-divider { margin: 32px 16px 0; }
  .se-related-grid { grid-template-columns: 1fr; }
  .se-related-grid .se-related-item:last-child { display: block; }
}
