/*
Theme Name: RSustain Carbon (World Class)
Theme URI: https://rsustain.org/
Author: RSustain
Description: World-class, lightweight WordPress theme for RSustain Carbon.
Version: 2.0.0
Text Domain: rsustain-carbon
*/

/* ---------- Global Layout System (World-class baseline) ---------- */
:root{
  --brand:#0f5b46;
  --brand2:#0b3f33;
  --gold:#c5a059;

  --bg:#f3f5f7;
  --text:#0f172a;
  --muted:#475569;

  --card:#ffffff;
  --border:#e5e7eb;

  --radius:18px;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.10);
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.6;
}

img{ max-width:100%; height:auto; }

a{ color:inherit; }
a:hover{ opacity:0.95; }

/* Optional premium boxed shell. If you want full-width, see bottom note. */
.site-shell{
  max-width: 1280px;
  margin: 22px auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Consistent inner container */
.rs-container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Main content spacing */
.site-main{
  padding: 26px 0 46px;
}

/* ---------- Accessibility ---------- */
.skip-link{
  position:absolute;
  left:-999px; top:auto;
  width:1px; height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 18px;
  top: 18px;
  width:auto; height:auto;
  background:#fff;
  padding:10px 14px;
  border-radius: 10px;
  z-index:9999;
  border:1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
:focus-visible{
  outline: 3px solid rgba(197,160,89,0.65);
  outline-offset: 3px;
}

/* ---------- Top strip ---------- */
.top-strip{
  background: var(--brand);
  color:#fff;
}
.top-strip-inner{
  padding: 10px 0;
}
.ticker{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  font-size: 13px;
  letter-spacing: .2px;
}
.ticker strong{
  letter-spacing: .6px;
}
.ticker span{
  opacity:.95;
  white-space:nowrap;
}

/* ---------- Header ---------- */
.site-header{
  background:#fff;
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 0;
  gap: 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
}
.custom-logo{
  max-height: 64px;
  width:auto;
}
.brand-name{
  text-decoration:none;
  font-weight:800;
  color: var(--text);
  letter-spacing:-0.3px;
  font-size: 16px;
}

/* Nav */
.primary-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap: 22px;
  align-items:center;
}
.primary-nav a{
  text-decoration:none;
  color: var(--text);
  font-weight:700;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 10px;
  display:inline-flex;
}
.primary-nav a:hover{
  background: rgba(15, 91, 70, 0.08);
}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a{
  background: rgba(15, 91, 70, 0.12);
}

/* Mobile toggle */
.menu-toggle{
  display:none;
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius: 12px;
  font-weight:800;
  cursor:pointer;
}

/* Mobile dropdown area */
.primary-nav.is-open{
  display:block;
}
@media (max-width: 920px){
  .menu-toggle{ display:inline-flex; }
  .primary-nav{ display:none; width:100%; }
  .header-inner{
    flex-wrap:wrap;
  }
  .primary-nav ul{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    padding: 14px 0 6px;
  }
  .primary-nav a{
    width:100%;
    padding: 12px 12px;
  }
}

/* ==========================================================
   FOOTER – UPDATED (NON-BLACK, INSTITUTIONAL GREEN-SLATE)
   ========================================================== */

.site-footer{
  position:relative;
  color: rgba(255,255,255,0.92);

  /* Balanced, non-black, institutional */
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(34,197,94,0.14), transparent 60%),
    radial-gradient(800px 420px at 88% 10%, rgba(14,165,233,0.10), transparent 55%),
    linear-gradient(180deg, #0f3d34 0%, #0b2f29 55%, #08231f 100%);
}

/* subtle top highlight line */
.site-footer::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(14,165,233,0.0),
    rgba(34,197,94,0.85),
    rgba(14,165,233,0.0)
  );
}

/* layout */
.footer-inner{
  padding: 46px 0 34px;
  display:grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}

/* left brand column */
.footer-brand h3{
  margin:0 0 10px;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.footer-tagline{
  margin:0;
  color: rgba(255,255,255,0.82);
  max-width: 56ch;
}
.footer-mini-note{
  margin: 12px 0 0;
  color: rgba(255,255,255,0.75);
  font-weight: 700;
}

/* headings */
.footer-col h4{
  margin:0 0 12px;
  font-size: 12px;
  letter-spacing: .9px;
  text-transform:uppercase;
  color: rgba(255,255,255,0.72);
}

/* links */
.site-footer a{
  text-decoration:none;
  color: rgba(255,255,255,0.82);
  display:block;
  padding: 6px 0;
}
.site-footer a:hover{
  color: #ffffff;
  transform: translateX(2px);
}

/* contact styling */
.footer-contact{
  margin-top: 8px;
}
.footer-contact-item{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 4px 0;
}
.footer-ico{
  width: 18px;
  display:inline-flex;
  justify-content:center;
  opacity: .95;
}

/* address */
.footer-address{
  margin-top: 12px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* bottom bar */
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 16px 0 18px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  display:flex;
  justify-content:space-between;
  gap: 14px;
  flex-wrap:wrap;
}

/* responsive */
@media (max-width: 980px){
  .footer-inner{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .footer-inner{ grid-template-columns: 1fr; }
}

/* ---------- Content defaults ---------- */
.entry-title{
  margin: 10px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.6px;
}
.entry-content{
  color: var(--text);
}
.entry-content p{
  margin: 0 0 14px;
  color: #111827;
}

/* ---------- Helpful blocks ---------- */
.card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
  overflow:hidden;
}
.card-pad{ padding: 18px; }

/* ---------- Full-width option ---------- */
/*
If you want the entire site full-width (no boxed shell), replace .site-shell with:
.site-shell{
  max-width:none;
  margin:0;
  border-radius:0;
  box-shadow:none;
  background:#fff;
}
*/
.footer-tagline{
  color: rgba(255,255,255,0.78);
}
/* =========================================================
   RESPONSIVE FIX PACK (Mobile + Tablet)
   Add at END of style.css
   ========================================================= */

/* Base: prevent overflow */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

/* Global container padding */
.rs-container {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Ensure cards behave */
.card { border-radius: 16px; }
.card-pad { padding: 16px !important; }

/* -----------------------------------------
   HEADER / NAV FIXES
----------------------------------------- */
.rs-header,
header.site-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
}

/* If your header uses a grid/flex row */
.rs-header .header-inner,
.site-header .header-inner,
header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap; /* critical for small screens */
}

/* Logo size */
.site-logo img,
.custom-logo {
  width: auto;
  max-height: 44px;
}

/* Menu links: prevent overflow */
.rs-nav a,
nav a {
  white-space: nowrap;
}

/* -----------------------------------------
   HERO FIXES (Home + Global)
----------------------------------------- */
.hero,
.hero-grade1,
.hero-small,
.hero-wrap {
  border-radius: 16px;
}

/* Your hero inner grid (we target inline grids safely) */
@media (max-width: 980px) {
  /* Any inline “display:grid; grid-template-columns:” inside hero should stack */
  .rs-container section.card > .card-pad > div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Headline sizing */
@media (max-width: 980px) {
  h1 {
    font-size: clamp(28px, 6.5vw, 40px) !important;
    line-height: 1.06 !important;
  }
  .rs-container p {
    font-size: 16px !important;
  }
}

/* Buttons stack nicely */
@media (max-width: 980px) {
  .rs-container a[style*="border-radius:999px"],
  .rs-container a[style*="border-radius: 999px"] {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Timezone pills wrap */
@media (max-width: 980px) {
  .rs-container span[style*="border-radius:999px"] {
    display: inline-flex !important;
    flex-wrap: nowrap;
    max-width: 100%;
  }
}

/* Make live rates widget full width on mobile */
@media (max-width: 980px) {
  .rs-container .card .card-pad div[style*="LIVE CARBON RATES"],
  .rs-container div[style*="LIVE CARBON RATES"] {
    width: 100% !important;
  }
}

/* -----------------------------------------
   3-COLUMN and 4-COLUMN sections -> collapse
----------------------------------------- */
@media (max-width: 980px) {
  /* Any inline grid using repeat(3,1fr) or repeat(4,1fr) -> 2 cols */
  .rs-container div[style*="repeat(3, 1fr)"],
  .rs-container div[style*="repeat(3,1fr)"],
  .rs-container div[style*="repeat(4, 1fr)"],
  .rs-container div[style*="repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 640px) {
  /* -> 1 col for phones */
  .rs-container div[style*="repeat(3, 1fr)"],
  .rs-container div[style*="repeat(3,1fr)"],
  .rs-container div[style*="repeat(4, 1fr)"],
  .rs-container div[style*="repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* -----------------------------------------
   Tables / widgets should scroll if needed
----------------------------------------- */
table { width: 100%; border-collapse: collapse; }
@media (max-width: 640px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* -----------------------------------------
   Footer: stack columns
----------------------------------------- */
@media (max-width: 980px) {
  footer .footer-inner,
  .rs-footer .footer-inner,
  .site-footer .footer-inner,
  footer .card-pad > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 640px) {
  footer .footer-inner,
  .rs-footer .footer-inner,
  .site-footer .footer-inner,
  footer .card-pad > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* -----------------------------------------
   Reduce excessive padding on small screens
----------------------------------------- */
@media (max-width: 640px) {
  .card-pad { padding: 14px !important; }
  section.card { margin-top: 10px !important; }
}
