/* =========================================================
   Modern refresh CSS for the provided WordPress/MH Magazine page
   - Keeps all links, images, content, emails, widgets intact
   - Styles existing classes/IDs (no markup changes required)
   - Safe to load AFTER the theme CSS to override it
   ========================================================= */

/* ---------- Design tokens ---------- */
:root{
  --bg: #0b1220;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.14);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  --brand: #9AEDF7;   /* Sky */
  --brand-2: #C7F5F9; /* Cyan */
  --brand-3: #EBFBFC; /* Azure */

  --shadow: 0 18px 50px rgba(0,0,0,.40);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.28);

  --radius: 18px;
  --radius-sm: 12px;

  --max: 1180px;
  --content: 760px;
  --gutter: clamp(16px, 3.2vw, 32px);

  --font: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- Base / reset-ish ---------- */
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(154,237,247,.22), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(199,245,249,.16), transparent 60%),
    radial-gradient(900px 600px at 30% 120%, rgba(235,251,252,.10), transparent 55%),
    linear-gradient(180deg, #070b14 0%, #0b1220 35%, #060912 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{ max-width: 100%; height: auto; }
a{
  color: var(--brand);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover, a:focus{
  color: var(--brand-3);
  text-decoration: underline;
}
a:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 10px;
}

p{ margin: 0 0 1em; color: var(--text); }
strong{ color: var(--brand-3); font-weight: 700; }

/* Utility: make legacy alignleft play nicer on modern layout */
.alignleft{
  float: left;
  margin: 0.25rem 1rem 0.75rem 0;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 640px){
  .alignleft{
    float: none;
    margin: 0 0 1rem 0;
    display: block;
  }
}

/* ---------- Layout containers ---------- */
.mh-container{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mh-container-outer{
  /* give the whole page a bit of breathing room */
  padding-top: 10px;
}

.mh-wrapper{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(18px, 2.4vw, 28px);
  align-items: start;
  padding-top: 18px;
  padding-bottom: 30px;
}

@media (max-width: 980px){
  .mh-wrapper{
    grid-template-columns: 1fr;
  }
}

/* ---------- Header ---------- */
.mh-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(6,9,18,.88), rgba(6,9,18,.55));
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.mh-custom-header{
  padding: 18px 0 10px;
}

.mh-header-text-link{
  display: inline-block;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.mh-header-title{
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: .2px;
  color: var(--brand-3);
}
.mh-header-tagline{
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Nav ---------- */
.mh-main-nav-wrap{
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.mh-navigation .menu{
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mh-navigation .menu > li{
  margin: 0;
  padding: 0;
}

.mh-navigation .menu > li > a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.mh-navigation .menu > li > a:hover{
  background: rgba(154,237,247,.10);
  border-color: rgba(154,237,247,.32);
  color: var(--brand-3);
  text-decoration: none;
}

.mh-navigation .current_page_parent > a,
.mh-navigation .current-menu-item > a{
  background: rgba(154,237,247,.14);
  border-color: rgba(154,237,247,.45);
  color: var(--brand-3);
}

/* ---------- Main content card ---------- */
#main-content.mh-content{
  min-width: 0;
}

article.hentry{
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.entry-header{
  padding: 22px clamp(18px, 2.4vw, 26px) 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(900px 280px at 15% 0%, rgba(154,237,247,.12), transparent 65%),
    radial-gradient(900px 280px at 85% 0%, rgba(199,245,249,.10), transparent 65%);
}

.entry-title{
  margin: 0 0 10px;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.18;
  letter-spacing: .2px;
  color: var(--brand-3);
}

.mh-meta.entry-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
.mh-meta.entry-meta span{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.mh-meta.entry-meta i{
  color: rgba(154,237,247,.90);
}

/* ---------- Article body ---------- */
.entry-content{
  padding: 18px clamp(18px, 2.4vw, 26px) 22px;
}

.entry-content > p,
.entry-content > div,
.entry-content > figure{
  max-width: var(--content);
}

.entry-thumbnail{
  margin: 0 0 14px;
  max-width: none;
}
.entry-thumbnail img{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

/* Make inline images feel intentional */
.entry-content img{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
}

/* Nice readable text rhythm */
.entry-content p{
  font-size: 15.5px;
  color: rgba(255,255,255,.88);
}
.entry-content br{ line-height: 1.8; }

/* Links inside content */
.entry-content a{
  font-weight: 700;
}
.entry-content a.thirstylink{
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Shareaholic blocks: give them a subtle wrapper if they render */
.shareaholic-canvas{
  max-width: var(--content);
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}

/* ---------- Post navigation ---------- */
.mh-post-nav-wrap{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.mh-post-nav{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}
.mh-post-nav a{
  display: block;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}
.mh-post-nav a:hover{
  color: var(--brand-3);
  text-decoration: none;
}

@media (max-width: 640px){
  .mh-post-nav-wrap{ grid-template-columns: 1fr; }
}

/* ---------- Comments heading / respond ---------- */
#mh-comments.mh-section-title{
  margin: 22px 0 8px;
  color: var(--brand-3);
  font-weight: 800;
}

.comment-respond{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.comment-reply-title{
  margin: 0 0 8px;
  font-weight: 800;
}
.must-log-in{
  color: var(--muted);
  margin: 0;
}

/* ---------- Sidebar widgets ---------- */
.mh-sidebar{
  position: sticky;
  top: 92px; /* under sticky header */
}

.mh-widget{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  padding: 14px 14px 12px;
  margin: 0 0 14px;
  overflow: hidden;
}

.mh-widget-title{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--brand-3);
}
.mh-widget-title-inner{
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(154,237,247,.12);
  border: 1px solid rgba(154,237,247,.28);
}

/* Pages list styling (keeps existing ULs intact) */
.widget_pages ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
.widget_pages ul > li{
  margin: 0;
  padding: 0;
}
.widget_pages a{
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  color: rgba(255,255,255,.86);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}
.widget_pages a:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(154,237,247,.22);
  color: var(--brand-3);
}
.widget_pages ul.children{
  margin: 6px 0 10px 10px;
  padding-left: 10px;
  border-left: 1px dashed rgba(255,255,255,.18);
}
.widget_pages ul.children a{
  font-weight: 600;
  color: rgba(255,255,255,.78);
}

/* Latest / custom posts widgets */
.mh-custom-posts-widget{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.mh-custom-posts-item{
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.mh-custom-posts-thumb img{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
}
.mh-custom-posts-small-title{
  margin: 0 0 6px;
  font-weight: 800;
  line-height: 1.25;
}
.mh-custom-posts-small-title a{
  color: rgba(255,255,255,.90);
  text-decoration: none;
}
.mh-custom-posts-small-title a:hover{
  color: var(--brand-3);
  text-decoration: underline;
}
.mh-custom-posts-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}
.mh-custom-posts-meta i{ color: rgba(154,237,247,.85); }

/* ---------- Footer ---------- */
.mh-footer{
  margin-top: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.mh-footer a{ color: rgba(255,255,255,.85); }
.mh-footer a:hover{ color: var(--brand-3); }

.mh-copyright-wrap{
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px 0 22px;
  background: rgba(0,0,0,.18);
}
.mh-copyright{
  margin: 0;
  color: rgba(255,255,255,.70);
  font-size: 13px;
}

/* ---------- Bootstrap row/cols inside widgets: tighten spacing ---------- */
.row{ margin-left: -10px; margin-right: -10px; }
[class*="col-"]{ padding-left: 10px; padding-right: 10px; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 980px){
  .mh-sidebar{ position: static; top: auto; }
}
@media (max-width: 520px){
  .mh-navigation .menu{ gap: 8px; }
  .mh-navigation .menu > li > a{ padding: 9px 10px; }
  .mh-meta.entry-meta span{ width: fit-content; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; animation: none !important; }
}
