/* =========================================
   NEXT LEVEL LEAF - GLOBAL STYLES
   Version: 10 (Consolidated Master + Phase 5 Polish)
   ========================================= */

:root {
  --bg-dark: #050505;
  --card-bg: #111;
  --text-main: #cfcfcf;
  --text-head: #ffffff;
  --green: #39FF14;
  --gold: #D4AF37;
  --border: rgba(255, 255, 255, 0.1);
  --font-head: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --header-h: 70px; /* JS updates this dynamically */
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-head);
  margin-top: 0;
  text-transform: uppercase;
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- UTILITIES --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- SOCIAL BAR --- */
.custom-social-bar {
  background: #000;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.custom-social-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}
.custom-social-bar img {
  width: 20px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.custom-social-bar img:hover { opacity: 1; }

/* --- HEADER & NAV --- */
header {
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: transform 0.3s ease;
}
/* Hide header on scroll down */
header.scrolled-down { transform: translateY(-100%); }

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #fff;
}

/* Desktop Menu */
.menu {
  display: flex;
  gap: 30px;
}
.menu a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #ccc;
}
.menu a:hover { color: var(--green); }

/* Hamburger (Mobile Only) */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  position: absolute;
  transition: 0.3s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }

/* Hamburger Active State */
.hamburger.active span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); bottom: 9px; background-color: var(--green); }

/* --- HERO SECTIONS --- */
main { padding: 40px 0; min-height: 80vh; }

.hero-card {
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 40px;
}
.hero-card h1 { font-size: 2.8rem; margin-bottom: 20px; line-height: 1.1; }
.hero-card p {
  max-width: 700px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  color: #bbb;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  margin: 5px;
}
.btn:hover {
  background: #2ed612;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}
.btn.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: #fff;
}
.btn.outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.05);
}

/* --- LEGAL & UTILITY GRIDS --- */
/* Used on Legal pages, Sitemap, Transparency Hub */
.grid-2, .legal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 24px;
}

/* --- PILLS (Used on AI/Transparency pages) --- */
.pill-row {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px;
}
.pill {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18); color: #cfcfcf;
  font-family: "Montserrat", sans-serif; font-weight: 900;
  text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.02em;
}

/* --- FOOTER --- */
footer {
  background: #000;
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 { color: var(--gold); margin-bottom: 20px; }
.footer-col a {
  display: block;
  color: #888;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.legal-text {
  font-size: 0.75rem;
  color: #555;
  line-height: 1.6;
  border-top: 1px solid #111;
  padding-top: 30px;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
  /* Mobile Menu Logic */
  .hamburger { display: block; }
  
  .menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: auto;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    align-items: center;
    padding: 80px 0 40px;
    gap: 25px;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    border-bottom: 1px solid var(--green);
  }
  .menu.active { transform: translateY(0); }
  .menu a { font-size: 1.4rem; color: #fff; }

  .footer-grid, .grid-2, .legal-grid-2 { grid-template-columns: 1fr; }
  
  /* --- PHASE 5 MICRO POLISH (Integrated) --- */
  
  /* A) TOP BAR + HEADER: make it shorter */
  .custom-social-bar .container { padding: 4px 10px; gap: 8px; }
  .custom-social-bar img { width: 20px; }
  
  header { padding: 8px 0; }
  .nav-bar { gap: 12px; }
  .logo { font-size: 1.1rem; }
  
  /* B) HAMBURGER TWEAKS */
  .hamburger { width: 28px; height: 18px; }
  
  /* C) HERO DENSITY */
  main { padding: 10px 0 40px; }
  .hero-card { padding: 30px 15px; }
  .hero-card h1 { font-size: 1.5rem; margin-bottom: 10px; }
  .hero-card p { font-size: 0.95rem; line-height: 1.4; margin-bottom: 15px; }
  
  /* D) BUTTONS */
  .btn { width: 100%; display: block; margin: 10px 0; }
  
  /* E) LEGAL CARD PADDING */
  .legal-card { padding: 25px 20px; }
}
/* =========================================
   RESTORE HOME / CATALOG COMPONENT STYLES
   (Fixes “broken layout” on core pages)
   ========================================= */

/* Section headers used on Home/Catalog pages */
.section-header{
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--text-head);
  text-transform: uppercase;
  margin: 50px 0 20px;
  border-left: 4px solid var(--green);
  padding-left: 14px;
}

/* Button variants your HTML uses */
.btn{ cursor:pointer; }
.btn-primary{
  background: var(--green);
  color:#000;
}
.btn-primary:hover{
  background:#fff;
  box-shadow: 0 0 15px rgba(57,255,20,0.35);
}
.btn-secondary{
  background: transparent;
  color:#fff;
  border:1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover{
  background: rgba(255,255,255,0.08);
  border-color:#fff;
}

/* Actions row used inside cards */
.actions{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

/* Product line cards grid */
.b2b-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap:24px;
  margin-top: 24px;
  margin-bottom: 40px;
}
.b2b-card{
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: transform .2s ease, border-color .2s ease;
}
.b2b-card:hover{
  transform: translateY(-4px);
  border-color: rgba(57,255,20,0.6);
}
.b2b-card .card-media{
  width:100%;
  height:220px;
  background:#000;
  border-bottom: 1px solid var(--border);
}
.b2b-card .card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.b2b-card .card-body{
  padding: 22px;
  display:flex;
  flex-direction:column;
  flex:1;
}
.b2b-card .card-title{
  font-family: var(--font-head);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: var(--text-head);
  margin-bottom: 8px;
}
.b2b-card .card-desc{
  color:#bdbdbd;
  font-size: .95rem;
  line-height:1.5;
  margin-bottom: 16px;
}
.card-spacer{ flex:1; }

/* Split layout blocks */
.split-layout{
  display:flex;
  gap:40px;
  align-items:center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin-top: 35px;
}
.split-layout.reverse{ flex-direction: row-reverse; }
.split-layout img{ max-width: 320px; border-radius: 10px; }
.split-layout h3{
  font-family: var(--font-head);
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--text-head);
}
.split-layout p{ margin: 0 0 12px; color:#bdbdbd; }

/* Utility used for the badge */
.contain-pad{
  padding: 30px;
  max-width: 260px;
  margin: 0 auto;
}

/* Mobile adjustments for the restored components */
@media (max-width: 768px){
  .section-header{ font-size: 1.25rem; margin: 28px 0 14px; }

  .b2b-card .card-media{ height: 180px; }
  .b2b-card .card-body{ padding: 16px; }
  .b2b-card .card-title{ font-size: 1.05rem; }
  .b2b-card .card-desc{ font-size: .92rem; }

  .split-layout{ padding: 18px; gap: 16px; flex-direction: column; text-align:center; }
  .split-layout.reverse{ flex-direction: column; }
  .split-layout img{ max-width: 100%; }
}
/* =========================================
   BEVERAGES & CREATIVE PAGE STYLES
   (Fixes the "Stacked" layout on sub-pages)
   ========================================= */

/* 1. Fix the Split Sections (Industry & White Label) */
.split-section {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.split-section.reverse {
  flex-direction: row-reverse;
}

.split-media {
  flex: 1;
}

.split-media img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.split-content {
  flex: 1;
  padding: 20px;
}

.split-content h3 {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
}

.split-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #fff;
}

.split-content p {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 20px;
}

/* 2. Fix the Creative Studio Box */
.creative-box {
  background: linear-gradient(145deg, #111, #0a0a0a);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 60px 30px;
  text-align: center;
  margin: 60px auto;
  position: relative;
  overflow: hidden;
}

.creative-tag {
  display: inline-block;
  background: #222;
  color: #ff00ff; /* Neon Pink for Creative */
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 0, 255, 0.3);
}

/* 3. Fix the Sticky Sub-Nav */
.subnav-sticky {
  position: sticky;
  top: 70px; /* Below the main header */
  z-index: 900;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  margin-bottom: 40px;
}

.subnav-inner {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.pill {
  padding: 8px 16px;
  border-radius: 50px;
  background: #222;
  color: #ccc;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: 0.2s;
}

.pill.green:hover { background: var(--green); color: #000; }
.pill.gold:hover { background: var(--gold); color: #000; }
.pill:hover { background: #fff; color: #000; }

/* Mobile Adjustments for Beverages */
@media (max-width: 768px) {
  .split-section, .split-section.reverse {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
  }
  
  .subnav-sticky { top: 60px; } /* Adjust for mobile header height */
  .subnav-inner { flex-wrap: wrap; }
}
/* =========================================
   MOBILE STACK & BEVERAGES FIX (v12 Final)
   ========================================= */

/* --- 1. Fix the Subnav Pills (Colors & Layout) --- */
.pill.green { border-color: rgba(57,255,20,0.7); color: var(--green); }
.pill.gold  { border-color: rgba(212,175,55,0.7); color: var(--gold); }

.subnav-sticky {
  position: sticky;
  z-index: 998;
  background: #000; /* Solid background prevents transparency */
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.subnav-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

/* --- 2. Mobile Specific Stack (Social -> Header -> Subnav) --- */
@media (max-width: 768px) {
  :root {
    --social-h: 44px; /* Adjusted to 44px per refinement */
  }

  /* Make Social Bar Sticky & Visible */
  .custom-social-bar {
    position: sticky;
    top: 0;
    z-index: 1002;
    background: #000;
    display: block !important;
  }

  /* Push Header down so it doesn't cover Social Bar */
  header {
    top: var(--social-h);
    z-index: 1001;
  }

  /* Push Subnav down so it sits under Header */
  .subnav-sticky {
    top: calc(var(--social-h) + var(--header-h, 60px));
  }

  /* Force Pills into one swipeable row (No stacking!) */
  .subnav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 15px;
    justify-content: flex-start;
  }
  
  /* Hide scrollbar */
  .subnav-inner::-webkit-scrollbar { display: none; }

  /* Fix Pill Sizing */
  .pill {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 14px;
  }
}

/* --- 3. Fix "Beverages" Page Styling (The Huge Text Issue) --- */
.split-section {
  display: flex;
  gap: 30px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin: 30px 0;
}
.split-section.reverse { flex-direction: row-reverse; }

.split-media { flex: 1; }
.split-media img { width: 100%; border-radius: 12px; }

.split-content { flex: 1.2; }
.split-content h2 { 
  font-size: 1.8rem; 
  line-height: 1.2; 
  margin-bottom: 15px; 
  color: #fff;
}
.split-content h3 { 
  font-size: 0.9rem; 
  color: var(--gold); 
  text-transform: uppercase; 
  letter-spacing: 1px;
}

/* Creative Box (The Pink Section) */
.creative-box {
  background: linear-gradient(145deg, #111, #0a0a0a);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  margin: 40px 0;
}

/* Mobile Adjustments for Beverages */
@media (max-width: 768px) {
  .split-section, .split-section.reverse {
    flex-direction: column;
    padding: 20px;
    text-align: center;
    gap: 20px;
  }
  /* Fix the "Huge Text" */
  .split-content h2 { font-size: 1.4rem; } 
  .hero-card h1 { font-size: 1.8rem; }
}
/* =========================================
   v13: FINAL MOBILE FIX (No Subnav + Stack)
   ========================================= */

/* 1. SAFETY NET: Hide subnav everywhere (in case HTML remains) */
.subnav-sticky { display: none !important; }

/* 2. MOBILE STACK: Social -> Header */
@media (max-width: 768px) {
  :root { --social-h: 44px; }

  /* Social Bar: Sticky at top */
  .custom-social-bar {
    position: sticky;
    top: 0;
    z-index: 1002;
    background: #000;
    display: block !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* Header: Sticks BELOW social bar */
  header {
    top: var(--social-h) !important;
    z-index: 1001;
  }
  
  /* Remove extra gap since subnav is gone */
  main { padding-top: 10px; }
}

/* 3. BEVERAGES PAGE STYLING (Restores correct text size/layout) */
.split-section {
  display: flex;
  gap: 30px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin: 30px 0;
}
.split-section.reverse { flex-direction: row-reverse; }

.split-media { flex: 1; }
.split-media img { width: 100%; border-radius: 12px; }

.split-content { flex: 1.2; }
.split-content h2 { 
  font-size: 1.8rem; 
  line-height: 1.2; 
  margin-bottom: 15px; 
  color: #fff;
}
.split-content h3 { 
  font-size: 0.9rem; 
  color: var(--gold); 
  text-transform: uppercase; 
  letter-spacing: 1px;
}
.creative-box {
  background: linear-gradient(145deg, #111, #0a0a0a);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  margin: 40px 0;
}

/* Mobile Adjustments for Beverages Content */
@media (max-width: 768px) {
  .split-section, .split-section.reverse {
    flex-direction: column;
    padding: 20px;
    text-align: center;
    gap: 20px;
  }
  .split-content h2 { font-size: 1.4rem; } 
  .hero-card h1 { font-size: 1.8rem; }
  h1 { font-size: 1.8rem !important; }
}