/*
Theme Name: Releaf Theme
Theme URI: https://releaf.in
Author: Releaf
Author URI: https://releaf.in
Description: Official Releaf.in WordPress theme — matches the Next.js site. Designed for use with Elementor page builder.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: releaf-theme
Tags: elementor, business, green, sanitation
*/

/* ============================================================
   RELEAF BRAND DESIGN TOKENS
   ============================================================ */
:root {
  --forest-green:   #2d6a2d;
  --dark-forest:    #1a3d1f;
  --leaf-green:     #5cb85c;
  --bright-leaf:    #8BC34A;
  --lime-text:      #9Be564;
  --gold:           #b8860b;
  --cream:          #faf8f0;
  --card-white:     #ffffff;
  --muted-text:     #6b7280;
  --border-color:   #d6d3c7;
  --radius:         0.75rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--cream);
  color: var(--dark-forest);
  line-height: 1.6;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.1;
  color: var(--dark-forest);
}

/* ============================================================
   UTILITY CLASSES (matching Tailwind tokens used in Next.js)
   ============================================================ */
.text-primary    { color: var(--forest-green); }
.text-leaf       { color: var(--bright-leaf); }
.text-cream      { color: var(--cream); }
.text-muted      { color: var(--muted-text); }
.text-gold       { color: var(--gold); }

.bg-primary      { background-color: var(--forest-green); }
.bg-dark-forest  { background-color: var(--dark-forest); }
.bg-secondary    { background-color: #f0ede1; }
.bg-cream        { background-color: var(--cream); }
.bg-card         { background-color: var(--card-white); }

.rounded-2xl     { border-radius: 1rem; }
.rounded-full    { border-radius: 9999px; }
.shadow-lg       { box-shadow: 0 10px 30px rgba(0,0,0,0.12); }

/* ============================================================
   WORDPRESS CONTENT AREA
   ============================================================ */
.site-main { min-height: 60vh; }

.wp-block-image img,
.wp-block-cover { border-radius: var(--radius); }

/* ============================================================
   ELEMENTOR GLOBAL OVERRIDES
   ============================================================ */
.elementor-section .elementor-container { max-width: 1280px; }

/* ============================================================
   HEADER  (replicated from Next.js header.tsx)
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: transparent;
  padding: 1rem 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 90px;
  transition: background 0.3s;
}

#site-header.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

#site-header .site-logo img { height: 56px; width: auto; object-fit: contain; }

/* Hamburger button */
#nav-toggle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #000;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#nav-toggle:hover { background: var(--forest-green); }
#nav-toggle:hover svg { stroke: #fff; }
#nav-toggle svg { width: 28px; height: 28px; stroke: #111; fill: none; stroke-width: 2; }

/* Fullscreen nav overlay */
#nav-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.2);
  opacity: 0; visibility: hidden;
  transition: all 0.4s;
}
#nav-overlay.open { opacity: 1; visibility: visible; }

#nav-panel {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: #fff;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 2rem 3.5rem 3rem;
}
#nav-overlay.open #nav-panel { transform: translateY(0); }

#nav-close {
  position: absolute; top: 1.75rem; right: 2rem;
  background: none; border: none;
  cursor: pointer; font-size: 2rem; line-height: 1;
}

.nav-desktop { display: grid; grid-template-columns: 42% 58%; min-height: 90vh; padding-top: 5rem; }

.nav-products-col { border-right: 1px solid #e5e7eb; padding: 2rem 3.5rem 2rem 0; }
.nav-products-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.5rem; }
.nav-product-card { text-align: center; }
.nav-product-card img { height: 80px; width: 100%; object-fit: contain; margin-bottom: 1rem; }
.nav-product-card h3 { font-family: system-ui, sans-serif; font-size: 1rem; font-weight: 500; }
.nav-product-card .tag { color: var(--forest-green); font-style: italic; font-size: 0.875rem; margin-top: 0.25rem; }

.nav-links-col { padding: 2rem 0 2rem 3.5rem; }
.nav-links-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 3rem; }
.nav-links-grid a.nav-main { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 600; display: block; margin-bottom: 2rem; }
.nav-links-grid ul { list-style: none; }
.nav-links-grid ul li + li { margin-top: 1rem; }
.nav-links-grid ul a { font-size: 1.0625rem; color: #374151; transition: color 0.2s; }
.nav-links-grid ul a:hover { color: var(--forest-green); }

.nav-bottom-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 3rem; margin-top: 3.5rem; }
.nav-bottom-row a { font-family: Georgia, serif; font-size: 1.5rem; font-weight: 600; }

@media (max-width: 1023px) {
  .nav-desktop { display: none; }
}

/* Mobile nav */
.nav-mobile { display: none; padding-top: 5rem; }
@media (max-width: 1023px) { .nav-mobile { display: block; } }
.nav-mobile-item { border-bottom: 1px solid #e5e7eb; padding: 1.25rem 0; }
.nav-mobile-item span { font-size: 1.25rem; font-weight: 600; }
.nav-mobile-ctas { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.nav-mobile-ctas a {
  display: flex; align-items: center; justify-content: center;
  height: 50px; border-radius: 9999px;
  font-size: 1rem; font-weight: 500;
  transition: all 0.2s;
}
.btn-outline-nav { border: 1px solid #111; }
.btn-solid-nav { background: #111; color: #fff; }

/* ============================================================
   HERO SECTION  (replicated from hero.tsx)
   ============================================================ */
.releaf-hero {
  position: relative;
  height: 100vh; min-height: 600px;
  width: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}

.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.2); }

.hero-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}

.hero-tagline {
  font-family: system-ui, sans-serif;
  font-size: clamp(1.25rem, 3vw, 2.625rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime-text);
  text-shadow: 0 3px 8px rgba(0,0,0,0.9);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: Georgia, serif;
  font-size: clamp(2.25rem, 7vw, 5.125rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 6px 18px rgba(0,0,0,0.95);
  max-width: 1100px;
}
.hero-headline .accent { color: var(--bright-leaf); }

/* Hero CTA button — exact from Next.js */
.hero-btn {
  display: inline-block;
  width: 170px; height: 55px;
  border-radius: 10px;
  border: 1px solid #fff;
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: all 0.5s ease-in;
  z-index: 1;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  margin-top: 2.5rem;
}
.hero-btn::before, .hero-btn::after {
  content: "";
  position: absolute; top: 0;
  width: 0; height: 100%;
  transform: skew(15deg);
  transition: all 0.5s;
  z-index: -1;
}
.hero-btn::before { left: -10px; background: #2d6a2e; }
.hero-btn::after  { right: -10px; background: #6eb54d; }
.hero-btn:hover::before, .hero-btn:hover::after { width: 58%; }
.hero-btn span { color: #2d6a2e; font-size: 1.125rem; font-weight: 700; transition: color 0.3s ease-in; }
.hero-btn:hover span { color: #fff; }

/* Slider dots */
.hero-dots {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 20; display: flex; gap: 0.75rem;
}
.hero-dot {
  height: 12px; width: 12px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.6);
  border: none; cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.active { background: #fff; width: 32px; }

/* ============================================================
   IMPACT COUNTER SECTION
   ============================================================ */
.releaf-impact {
  background: var(--forest-green);
  color: #fff;
  padding: 4rem 1.5rem;
}
.impact-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 2rem; text-align: center;
}
@media (min-width: 768px) { .impact-grid { grid-template-columns: repeat(4,1fr); } }
.impact-stat-number {
  font-family: Georgia, serif; font-size: clamp(2rem,4vw,3.5rem); font-weight: 700;
}
.impact-stat-label { font-size: 0.9375rem; opacity: 0.85; margin-top: 0.25rem; }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.releaf-about {
  background: #f0ede1;
  padding: 5rem 1.5rem;
}
.about-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 3rem;
}
@media (min-width: 1024px) { .about-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; } }

.about-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; }
.about-img-grid img { width: 100%; object-fit: cover; border-radius: 1rem; }
.about-img-col1 img:first-child { height: 192px; }
.about-img-col1 img:last-child  { height: 256px; }
.about-img-col2 img:first-child { height: 256px; margin-top: 2rem; }
.about-year-badge {
  background: var(--forest-green); color: #fff;
  border-radius: 1rem; padding: 1.5rem;
  text-align: center; margin-top: 1rem;
}
.about-year-badge .year { font-family: Georgia, serif; font-size: 2.5rem; font-weight: 700; }
.about-year-badge .label { font-size: 0.875rem; margin-top: 0.25rem; }

.about-float-badge {
  position: absolute; bottom: -1.5rem; right: -1.5rem;
  width: 128px; height: 128px; border-radius: 50%;
  background: var(--gold); color: var(--dark-forest);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.about-float-badge .num { font-family: Georgia, serif; font-size: 1.875rem; font-weight: 700; }
.about-float-badge .txt { font-size: 0.8125rem; font-weight: 500; }

.about-badge-pill {
  display: inline-block;
  background: rgba(45,106,45,0.1); color: var(--forest-green);
  border-radius: 9999px; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500; margin-bottom: 1.25rem;
}
.about-heading { font-size: clamp(1.75rem,3vw,3rem); font-weight: 700; margin-bottom: 1.5rem; }
.about-heading span { color: var(--forest-green); }
.about-body { color: var(--muted-text); font-size: 1.0625rem; line-height: 1.75; }
.about-body + .about-body { margin-top: 1rem; }

.about-highlights {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 2.5rem;
}
.highlight-card {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: #fff; border-radius: 0.75rem; padding: 1rem;
}
.highlight-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 0.5rem; background: rgba(45,106,45,0.1);
  color: var(--forest-green); font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.highlight-title { font-family: Georgia, serif; font-weight: 600; font-size: 0.9375rem; }
.highlight-desc  { font-size: 0.8125rem; color: var(--muted-text); margin-top: 0.125rem; }

/* ============================================================
   CTA BUTTON (reusable)
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--forest-green); color: #fff;
  border-radius: 0.75rem; padding: 0.75rem 1.75rem;
  font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--dark-forest); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--forest-green);
  border: 2px solid var(--forest-green);
  border-radius: 0.75rem; padding: 0.75rem 1.75rem;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--forest-green); color: #fff; }

/* ============================================================
   SOLUTIONS SECTION
   ============================================================ */
.releaf-solutions { background: var(--cream); padding: 5rem 1.5rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-badge {
  display: inline-block;
  background: rgba(45,106,45,0.1); color: var(--forest-green);
  border-radius: 9999px; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500; margin-bottom: 1rem;
}
.section-heading { font-size: clamp(1.75rem,3vw,3rem); font-weight: 700; }
.section-sub { color: var(--muted-text); font-family: system-ui,sans-serif; font-size: 1.0625rem; margin-top: 1rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.solutions-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  margin-bottom: 3rem;
}
.sol-tab {
  display: flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.75rem 1.5rem;
  font-weight: 500; cursor: pointer; border: none;
  background: #f0ede1; color: var(--dark-forest);
  transition: all 0.2s;
  font-size: 0.9375rem;
}
.sol-tab.active, .sol-tab:hover {
  background: var(--forest-green); color: #fff; box-shadow: 0 4px 14px rgba(45,106,45,0.3);
}

.solution-panel { display: none; }
.solution-panel.active { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .solution-panel.active { grid-template-columns: 1fr 1fr; } }

.solution-img-wrap { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 4/3; }
.solution-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.solution-img-caption {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(6px);
  border-radius: 0.75rem; padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 0.75rem; box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.sol-icon-box {
  width: 48px; height: 48px; border-radius: 0.5rem;
  background: var(--forest-green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.sol-caption-title { font-family: Georgia,serif; font-weight: 600; font-size: 0.9375rem; }
.sol-caption-sub { font-size: 0.8125rem; color: var(--muted-text); }

.solution-heading { font-size: clamp(1.5rem,2.5vw,2rem); font-weight: 700; margin-bottom: 1rem; }
.solution-desc { color: var(--muted-text); font-size: 1.0625rem; line-height: 1.75; margin-bottom: 2rem; }
.solution-features { list-style: none; }
.solution-features li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0; font-size: 1rem; color: var(--dark-forest);
}
.solution-features li::before {
  content: "✓";
  color: var(--forest-green); font-weight: 700; font-size: 1.125rem; flex-shrink: 0;
}
.solution-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
.releaf-why { background: var(--dark-forest); color: var(--cream); padding: 5rem 1.5rem; }
.releaf-why .section-heading { color: var(--cream); }
.releaf-why .section-sub { color: rgba(250,248,240,0.75); }
.why-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.why-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem; padding: 2rem;
  transition: background 0.2s;
}
.why-card:hover { background: rgba(255,255,255,0.12); }
.why-icon { font-size: 2rem; margin-bottom: 1rem; }
.why-title { font-family: Georgia,serif; font-size: 1.1875rem; font-weight: 600; color: var(--cream); margin-bottom: 0.5rem; }
.why-desc  { font-size: 0.9375rem; color: rgba(250,248,240,0.7); line-height: 1.6; }

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.releaf-projects { background: #f0ede1; padding: 5rem 1.5rem; }
.projects-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.project-card { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.project-card:hover img { transform: scale(1.06); }
.project-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem;
}
.project-name { color: #fff; font-family: Georgia,serif; font-size: 1.1875rem; font-weight: 700; }
.project-loc  { color: rgba(255,255,255,0.8); font-size: 0.875rem; margin-top: 0.25rem; }

/* ============================================================
   CLIENTS / LOGOS
   ============================================================ */
.releaf-clients { background: var(--cream); padding: 4rem 1.5rem; }
.clients-inner { max-width: 1280px; margin: 0 auto; }
.clients-logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 2.5rem; margin-top: 2.5rem;
}
.client-logo { opacity: 0.6; transition: opacity 0.2s; }
.client-logo:hover { opacity: 1; }
.client-logo img { height: 40px; width: auto; object-fit: contain; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.releaf-cta { background: var(--cream); padding: 3rem 1.5rem; }
.cta-box {
  max-width: 1280px; margin: 0 auto;
  background: var(--forest-green); border-radius: 1.25rem;
  padding: 3rem 2rem;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2rem;
}
@media (min-width: 768px) {
  .cta-box { flex-direction: row; justify-content: space-between; text-align: left; padding: 3rem 3.5rem; }
}
.cta-heading { font-family: Georgia,serif; font-size: clamp(1.375rem,2.5vw,2rem); font-weight: 700; color: #fff; }
.cta-sub { color: rgba(255,255,255,0.8); margin-top: 0.5rem; font-size: 1rem; }
.btn-cta {
  background: var(--cream); color: var(--dark-forest);
  border-radius: 0.75rem; padding: 0.875rem 2rem;
  font-size: 1rem; font-weight: 700; white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-cta:hover { opacity: 0.9; }

/* ============================================================
   FOOTER  (replicated from footer.tsx)
   ============================================================ */
#site-footer { background: var(--dark-forest); color: var(--cream); }

.footer-main {
  max-width: 1280px; margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid; gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.footer-logo img { height: 52px; margin-bottom: 1rem; }
.footer-about { font-size: 0.9375rem; color: rgba(250,248,240,0.7); line-height: 1.7; }

.footer-col h4 { font-family: Georgia,serif; font-size: 1.0625rem; font-weight: 600; color: var(--cream); margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: 0.75rem; }
.footer-col a { font-size: 0.9375rem; color: rgba(250,248,240,0.65); transition: color 0.2s; }
.footer-col a:hover { color: var(--cream); }

.footer-contact { font-size: 0.9375rem; color: rgba(250,248,240,0.7); }
.footer-contact p { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.75rem; }

.footer-social { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.social-btn:hover { background: var(--forest-green); }
.social-btn svg { width: 18px; height: 18px; fill: var(--cream); }

/* Instagram icon fix */
.social-btn[aria-label="Instagram"] svg {
  fill: none;
  stroke: var(--cream);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-bottom {
  border-top: 1px solid rgba(250,248,240,0.1);
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.875rem; color: rgba(250,248,240,0.5);
}

/* ============================================================
   ELEMENTOR COMPATIBILITY — make sure sections fill width
   ============================================================ */
.elementor-section.elementor-section-full_width .elementor-container { max-width: 100% !important; }

/* Let Elementor-edited sections override theme styles */
.elementor-section { margin: 0 !important; }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 767px) {
  #site-header { padding: 1rem 1.25rem; }
  .about-highlights { grid-template-columns: 1fr; }
  .nav-products-grid { grid-template-columns: repeat(2,1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .footer-main { grid-template-columns: 1fr; } }
