/*
Theme Name: MrUSA
Theme URI: https://example.com
Author: Your Studio
Description: An editorial magazine-style WordPress theme for wellness, lifestyle and world-affairs publishing. Built custom for this project.
Version: 1.0
Requires PHP: 7.4
Text Domain: mrusa
*/

:root{
  --paper:#EFF1E7;
  --cloud:#FFFFFF;
  --ink:#1B2A22;
  --moss:#4B6355;
  --amber:#D9A441;
  --plum:#7A4B5E;
  --line: rgba(27,42,34,0.12);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{ overflow-x:hidden; max-width:100%; }
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Manrope', sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  max-width:100%;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
.wrap{max-width:1180px; margin:0 auto; padding:0 28px; min-width:0;}

/* Prevents CSS Grid/Flexbox items from expanding past their track to fit
   their content's "natural" size — the #1 cause of mobile horizontal
   overflow in grid/flex layouts. */
.home-layout, .home-layout > *,
.footer-grid, .footer-grid > *,
.article-grid, .article-grid > *,
.side-stack, .side-stack > *,
.newsletter, .newsletter > *,
.masthead-row > *,
.bento, .feature-card, .feature-body,
.mini-card, .single-wrap, .single-content,
.single-layout, .single-main, .single-sidebar, .related-item, .related-text,
.category-top, .category-hero, .category-support-stack, .support-card, .support-body,
.category-section, .grid-3col, .grid-3col > *,
.single-strap, .single-meta-row, .share-btn-label, .single-media, .photo-caption{
  min-width:0;
}
h1, h2, h3, h4,
.feature-title, .art-title, .single-title, .quote-text, .art-dek, .feature-dek{
  overflow-wrap:break-word;
  word-break:break-word;
}
.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:10.5px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  font-weight:700;
  display:inline-block;
  align-self:flex-start;
  padding:6px 12px;
  border-radius:6px;
  background:var(--ink);
  color:var(--paper);
}

/* Category badge colors — richer, more saturated tones (not pale
   pastels) with white text for strong contrast. One distinct color per
   category, reused across eyebrow tags, nav pills, story-list tags,
   and section headings. */
.c-fitness.eyebrow, .story-cat.c-fitness, .pill.c-fitness, .cat-heading-badge.c-fitness{ background:#33513F; color:#FFFFFF; }
.c-nutrition.eyebrow, .story-cat.c-nutrition, .pill.c-nutrition, .cat-heading-badge.c-nutrition{ background:#8C5E1E; color:#FFFFFF; }
.c-mind.eyebrow, .story-cat.c-mind, .pill.c-mind, .cat-heading-badge.c-mind{ background:#5C3350; color:#FFFFFF; }
.c-world.eyebrow, .story-cat.c-world, .pill.c-world, .cat-heading-badge.c-world{ background:#2F4F73; color:#FFFFFF; }
.c-lifestyle.eyebrow, .story-cat.c-lifestyle, .pill.c-lifestyle, .cat-heading-badge.c-lifestyle{ background:#7A3654; color:#FFFFFF; }
.c-entertainment.eyebrow, .story-cat.c-entertainment, .pill.c-entertainment, .cat-heading-badge.c-entertainment{ background:#4A3F73; color:#FFFFFF; }
.pill.c-fitness, .pill.c-nutrition, .pill.c-mind, .pill.c-world, .pill.c-lifestyle, .pill.c-entertainment{ border-color:transparent; }

.cat-heading-badge{
  display:inline-block;
  align-self:flex-start;
  padding:8px 16px;
  border-radius:10px;
  font-family:'Fraunces', serif;
  font-weight:500;
  font-size:20px;
  color:#FFFFFF;
}

/* MASTHEAD */
header.masthead{ padding:22px 0 16px; border-bottom:1px solid var(--line); }
.masthead-row{ display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; min-width:0; position:relative; }
.logo{ flex-shrink:0; }
.logo-lockup{ display:flex; align-items:center; gap:10px; }
.logo-lockup img{ max-height:42px; width:auto; display:block; }
.logo-text{ line-height:1.1; letter-spacing:-0.01em; white-space:nowrap; }
nav.primary-nav{ display:flex; gap:28px; font-size:14px; font-weight:600; }
nav.primary-nav ul{ list-style:none; display:flex; gap:28px; }
nav.primary-nav a:hover{ color:var(--plum); }
.nav-toggle-checkbox{ display:none; }
.menu-toggle{ display:none; font-size:22px; line-height:1; cursor:pointer; flex-shrink:0; }
.masthead-meta{ font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--moss); text-align:right; }

/* TICKER */
.dispatch{ background:var(--ink); color:var(--paper); overflow:hidden; white-space:nowrap; position:relative; border-bottom:1px solid var(--line); }
.dispatch-track{ display:inline-flex; align-items:center; gap:0; animation:scrollTicker 38s linear infinite; padding:10px 0; }
.dispatch:hover .dispatch-track{ animation-play-state:paused; }
.dispatch-item{ display:inline-flex; align-items:center; font-family:'IBM Plex Mono', monospace; font-size:12.5px; letter-spacing:0.01em; padding:0 28px; border-right:1px solid rgba(239,241,231,0.22); }
.dispatch-tag{ color:var(--amber); margin-right:10px; font-weight:600; }
.dispatch-tag.world{ color:#9BB6E8; } .dispatch-tag.mind{ color:#D9A441; } .dispatch-tag.body{ color:#8FBF9F; } .dispatch-tag.lifestyle{ color:#E8B4C8; }
@keyframes scrollTicker{ 0%{ transform:translateX(0); } 100%{ transform:translateX(-50%); } }

/* HOME LAYOUT — unified grid so mobile order can differ from desktop */
.home-layout{
  display:grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-areas:
    "hero side"
    "adslot adslot"
    "rail rail"
    "grid grid";
  column-gap:20px;
  padding-top:56px;
}
.area-hero{ grid-area:hero; padding-bottom:20px; }
.area-side{ grid-area:side; padding-bottom:20px; }
.area-adslot{ grid-area:adslot; }
.area-rail{ grid-area:rail; padding:6px 0 40px; }
.area-grid{ grid-area:grid; padding:10px 0 64px; }

.feature-card{ background:var(--cloud); border-radius:22px; overflow:hidden; position:relative; display:flex; flex-direction:column; min-height:460px; }
.feature-media{ height:280px; background:radial-gradient(circle at 30% 20%, rgba(217,164,65,0.55), transparent 55%), radial-gradient(circle at 75% 70%, rgba(122,75,94,0.5), transparent 50%), linear-gradient(135deg, #4B6355, #1B2A22); position:relative; }
.feature-media img{ width:100%; height:100%; object-fit:cover; }
.feature-media::after{ content:""; position:absolute; inset:0; background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 26px); pointer-events:none; }
.feature-body{ padding:28px 30px 32px; flex:1; display:flex; flex-direction:column; gap:14px; }
.feature-title{ font-family:'Fraunces', serif; font-weight:500; font-size:34px; line-height:1.12; letter-spacing:-0.01em; }
.feature-title a:hover{ color:var(--plum); }
.feature-dek{ color:var(--moss); font-size:15px; line-height:1.6; max-width:46ch; }
.feature-foot{ margin-top:auto; display:flex; align-items:center; gap:14px; font-size:13px; font-weight:600; color:var(--plum); }
.feature-foot .dot{ width:4px; height:4px; border-radius:50%; background:var(--line); }

.side-stack{ display:flex; flex-direction:column; gap:20px; }
.mini-card{ background:var(--cloud); border-radius:22px; padding:22px 24px; }
.stories-card{ height:100%; padding:0; overflow:hidden; }
.stories-card-header{
  background:#146670;
  color:#FFFFFF;
  font-family:'IBM Plex Mono', monospace;
  font-size:12.5px;
  font-weight:800;
  letter-spacing:0.1em;
  text-transform:uppercase;
  padding:18px 24px;
}
.stories-card-body{ padding:6px 24px 4px; }
.story-line{ display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px solid var(--line); }
.story-line:last-child{ border-bottom:none; }
.story-title{ font-family:'Fraunces', serif; font-size:15.5px; font-weight:500; line-height:1.35; }
.story-title:hover{ color:var(--plum); }
.story-cat{ font-family:'IBM Plex Mono', monospace; font-size:9.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; white-space:nowrap; flex-shrink:0; display:inline-block; padding:4px 8px; border-radius:5px; background:var(--ink); color:var(--paper); }

.category-block{ margin-bottom:44px; }
.category-block:last-child{ margin-bottom:0; }
.category-block-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:18px; }
.category-block-head h3{ font-family:'Fraunces', serif; font-weight:500; font-size:20px; }

/* CATEGORY RAIL */
.rail-scroll{ display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; }
.pill{ font-size:13.5px; font-weight:700; padding:10px 18px; border-radius:999px; border:1px solid var(--line); white-space:nowrap; }
.pill.active{ background:var(--ink); color:var(--paper); border-color:var(--ink); }

/* ARTICLE GRID */
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:24px; }
.section-head h2{ font-family:'Fraunces', serif; font-weight:500; font-size:26px; }
.see-all{ font-size:13px; font-weight:700; color:var(--plum); }
.article-grid{ display:grid; grid-template-columns: repeat(6, 1fr); gap:20px; }
.art{ background:var(--cloud); border-radius:18px; overflow:hidden; display:flex; flex-direction:column; }
.art .thumb{ height:150px; display:flex; align-items:center; justify-content:center; overflow:hidden; background-size:cover; background-position:center; }
.art .thumb img{ width:100%; height:100%; object-fit:contain; }
.art.c-fitness .thumb{ background-image:linear-gradient(145deg,#8FBF9F,#4B6355); }
.art.c-mind .thumb{ background-image:linear-gradient(145deg,#D9A441,#7A4B5E); }
.art.c-nutrition .thumb{ background-image:linear-gradient(145deg,#E8D9A8,#8FBF9F); }
.art.c-world .thumb{ background-image:linear-gradient(145deg,#9BB6E8,#1B2A22); }
.art.c-lifestyle .thumb{ background-image:linear-gradient(145deg,#E8B4C8,#7A4B5E); }
.art.c-entertainment .thumb{ background-image:linear-gradient(145deg,#B79CE0,#4A3F73); }
.art-body{ padding:18px 20px 20px; display:flex; flex-direction:column; gap:8px; flex:1; }
.art-title{ font-family:'Fraunces', serif; font-size:18px; font-weight:500; line-height:1.28; }
.art-title a:hover{ color:var(--plum); }
.art-dek{ font-size:13px; color:var(--moss); line-height:1.5; }
.span-3{ grid-column: span 3; } .span-2{ grid-column: span 2; } .span-4{ grid-column: span 4; }

/* NEWSLETTER */
.newsletter{ background:var(--ink); color:var(--paper); border-radius:26px; padding:48px 44px; display:flex; align-items:center; justify-content:space-between; gap:40px; margin-bottom:64px; flex-wrap:wrap; }
.newsletter h3{ font-family:'Fraunces', serif; font-weight:500; font-size:28px; max-width:14ch; line-height:1.2; }
.newsletter p{ color:#B9C7BE; font-size:14px; margin-top:10px; max-width:34ch; }
.nl-form{ display:flex; gap:10px; min-width:340px; }
.nl-form input{ flex:1; min-width:0; background:rgba(239,241,231,0.08); border:1px solid rgba(239,241,231,0.25); border-radius:10px; padding:13px 16px; color:var(--paper); font-family:'Manrope'; }
.nl-form input::placeholder{ color:#8FA096; }
.nl-btn{ background:var(--amber); color:var(--ink); font-weight:700; border:none; border-radius:10px; padding:13px 22px; cursor:pointer; }

footer.site-footer{ border-top:1px solid var(--line); padding:56px 0 34px; }
.footer-grid{
  display:grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap:32px;
  padding-bottom:40px;
  margin-bottom:28px;
  border-bottom:1px solid var(--line);
  align-items:start;
}
.footer-col{ min-width:0; }
.footer-col h4{
  font-family:'IBM Plex Mono', monospace;
  font-size:12px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--moss);
  margin-bottom:16px;
}
.footer-brand .logo-lockup{ margin-bottom:10px; }
.footer-brand .logo-lockup img{ max-height:32px; }
.footer-tagline{ font-size:13.5px; color:var(--moss); line-height:1.6; max-width:32ch; margin-bottom:18px; }
.footer-list{ list-style:none; display:flex; flex-direction:column; gap:11px; }
.footer-list a{ font-size:14px; color:var(--ink); }
.footer-list a:hover{ color:var(--plum); }
.social-icons{ display:flex; gap:10px; }
.social-icon{
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--ink);
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.social-icon svg{ width:17px; height:17px; }
.social-icon:hover{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.foot-row{ display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--moss); flex-wrap:wrap; gap:10px; }

@media (max-width: 980px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}
@media (max-width: 560px){
  .footer-grid{ grid-template-columns: 1fr; }
  .grid-3col{ grid-template-columns:1fr; }
  .support-thumb{ width:84px; height:72px; }
  .support-title{ font-size:14.5px; }
}

/* SINGLE / PAGE CONTENT */
.single-wrap{ max-width:760px; margin:0 auto; padding:56px 28px 80px; }

.single-layout{ display:grid; grid-template-columns: 1fr 340px; gap:48px; padding-top:56px; padding-bottom:80px; align-items:start; min-width:0; }
.single-main{ min-width:0; max-width:760px; }
.single-title{ font-family:'Fraunces', serif; font-weight:500; font-size:40px; line-height:1.15; margin:16px 0 14px; overflow-wrap:break-word; }
.single-strap{ font-size:19px; line-height:1.55; color:var(--moss); font-weight:500; margin-bottom:18px; max-width:62ch; }
.single-meta-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:30px; flex-wrap:wrap; }
.single-meta{ font-size:13px; color:var(--moss); }
.share-btn{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--cloud); border:1px solid var(--line); border-radius:999px;
  padding:9px 16px; font-family:'Manrope', sans-serif; font-size:13px; font-weight:700;
  color:var(--ink); cursor:pointer; flex-shrink:0; transition:background .15s ease, border-color .15s ease;
}
.share-btn:hover{ background:var(--paper); border-color:var(--moss); }
.share-btn svg{ width:15px; height:15px; }
.single-media{ margin-bottom:34px; }
.single-thumb{ border-radius:18px; overflow:hidden; height:420px; }
.photo-caption{ font-size:12.5px; color:var(--moss); font-style:italic; line-height:1.5; margin-top:10px; }
.single-content figure{ margin:20px 0; }
.single-content figure img{ margin:0 0 8px; }
.single-content figcaption{ font-size:12.5px; color:var(--moss); font-style:italic; line-height:1.5; }
.single-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.single-content{ font-size:17px; line-height:1.8; }
.single-content p{ margin-bottom:20px; }
.single-content h2{ font-family:'Fraunces', serif; font-size:26px; margin:36px 0 14px; }
.single-content h3{ font-family:'Fraunces', serif; font-size:21px; margin:28px 0 12px; }
.single-content a{ color:var(--plum); text-decoration:underline; }
.single-content img{ border-radius:14px; margin:20px 0; }
.single-content ul, .single-content ol{ margin:0 0 20px 22px; }

/* CATEGORY PAGE */
.category-header{ padding-top:56px; padding-bottom:8px; min-width:0; }
.category-header h1{ font-family:'Fraunces', serif; font-weight:500; font-size:42px; margin:10px 0 12px; overflow-wrap:break-word; }
.category-desc{ color:var(--moss); font-size:16px; line-height:1.6; max-width:60ch; }

.category-top{ display:grid; grid-template-columns: 1.6fr 1fr; gap:20px; padding-top:32px; padding-bottom:8px; min-width:0; }
.category-hero{ min-width:0; }
.category-hero .feature-card{ min-height:auto; }
.category-hero .feature-media{ height:300px; }
.category-hero .feature-title{ font-size:28px; }
.category-hero .feature-dek{ max-width:60ch; }
.category-support-stack{ display:flex; flex-direction:column; gap:20px; min-width:0; }
.support-card{ display:flex; gap:14px; background:var(--cloud); border-radius:18px; padding:14px; align-items:center; min-width:0; }
.support-thumb{ flex-shrink:0; width:110px; height:88px; border-radius:12px; overflow:hidden; background:var(--paper); display:block; }
.support-thumb img{ width:100%; height:100%; object-fit:cover; }
.support-body{ display:flex; flex-direction:column; gap:6px; min-width:0; flex:1; }
.support-title{ font-family:'Fraunces', serif; font-size:16px; font-weight:500; line-height:1.3; overflow-wrap:break-word; }
.support-card:hover .support-title{ color:var(--plum); }
.support-meta{ font-family:'IBM Plex Mono', monospace; font-size:10.5px; color:var(--moss); }

.category-section{ padding-top:36px; padding-bottom:36px; min-width:0; }
.grid-3col{ display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; }

/* Social media embeds (Instagram, X/Twitter, Facebook, TikTok, YouTube,
   etc.) — center them and keep them within the article's width instead
   of the default left-aligned, sometimes-oversized platform styling. */
.single-content .instagram-media,
.single-content .twitter-tweet,
.single-content .tiktok-embed,
.single-content .fb-post,
.single-content iframe,
.single-content .wp-embed-container,
.single-content .wp-block-embed,
.single-content blockquote{
  display:block !important;
  margin:26px auto !important;
  max-width:100%;
}
.single-content .wp-block-embed iframe{ width:100%; }
.single-content .wp-block-embed__wrapper{ position:relative; }

.single-sidebar{ min-width:0; position:sticky; top:24px; margin-top:-8px; }
.related-card{ padding-top:14px; }
.related-card .eyebrow{ margin-bottom:14px; }
.related-item{ display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }
.related-item:last-child{ border-bottom:none; }
.related-item:hover .related-title{ color:var(--plum); }
.related-thumb{ flex-shrink:0; width:64px; height:64px; border-radius:12px; overflow:hidden; }
.related-thumb img{ width:100%; height:100%; object-fit:cover; }
.related-text{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.related-title{ font-family:'Fraunces', serif; font-size:14.5px; font-weight:500; line-height:1.3; overflow-wrap:break-word; }
.related-date{ font-family:'IBM Plex Mono', monospace; font-size:10.5px; color:var(--moss); }
.related-empty{ font-size:13.5px; color:var(--moss); }

/* AD SLOTS */
.ad-slot{
  max-width:1180px;
  margin:8px auto 40px;
  padding:16px;
  border:1px dashed var(--line);
  border-radius:14px;
  text-align:center;
  overflow:hidden;
}
.single-content .ad-slot{ max-width:100%; margin:32px 0; }

@media (max-width: 860px){
  .home-layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "adslot"
      "rail"
      "grid"
      "side";
  }
  .area-side{ padding-top:8px; padding-bottom:40px; }
  .article-grid{ grid-template-columns:1fr 1fr; }
  .span-3,.span-4,.span-2{ grid-column:span 2; }
  .newsletter{ flex-direction:column; align-items:flex-start; }
  .nl-form{ width:100%; min-width:0; }
  .single-thumb{ height:260px; }
  .single-media{ margin-bottom:24px; }
  .single-strap{ font-size:16.5px; }
  .single-layout{ grid-template-columns:1fr; gap:32px; }
  .single-main{ max-width:100%; }
  .single-sidebar{ position:static; }
  .category-top{ grid-template-columns:1fr; padding-top:10px; padding-bottom:4px; }
  .category-hero .feature-media{ height:170px; }
  .category-hero .feature-title{ font-size:22px; }
  .grid-3col{ grid-template-columns:1fr 1fr; }
  .category-header{ padding-top:20px; padding-bottom:0; }
  .category-header h1{ font-size:26px; margin:6px 0 6px; }
  .category-desc{ font-size:14px; }

  /* Hamburger dropdown — nav is fully hidden until toggled, so it can
     never push the page wider than the viewport. */
  .menu-toggle{ display:block; order:1; }
  .masthead-meta{ order:2; }
  nav.primary-nav{
    display:none;
    width:100%;
    order:3;
  }
  .nav-toggle-checkbox:checked ~ nav.primary-nav{ display:block; }
  nav.primary-nav ul{
    flex-direction:column;
    gap:0;
    width:100%;
    padding-top:14px;
  }
  nav.primary-nav li{ border-top:1px solid var(--line); }
  nav.primary-nav a{ display:block; padding:14px 2px; }
}

