/* ========================================
   1. CSS CUSTOM PROPERTIES
   ======================================== */
:root {
  --color-dark-green: #2A4A0E;
  --color-light-green: #96C83D;
  --color-warm: #8B7A65;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-surface: #F4F9EE;
  --color-surface-light: #EAF2DC;
  --color-body-text: #3A3530;
  --color-muted: #8B7A65;
  --color-heading: #1A1A1A;
  --color-footer-bg: #1B3A0D;
  --color-star: #856318;
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Lato', sans-serif;
  --max-width: 1200px;
  --nav-height: 70px;
}

/* ========================================
   2. RESET / BASE
   ======================================== */
.hidden { display: none; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-body-text);
  background: var(--color-bg);
  padding-top: var(--nav-height);
}

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

a {
  color: var(--color-dark-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-light-green);
}

ul {
  list-style: none;
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-heading);
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* ========================================
   4. LAYOUT UTILITIES
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.full-width-section {
  width: 100%;
}

/* Custom elements default to inline — force block for all layout components */
hero-banner, hero-carousel, project-showcase, recommendations-section,
service-card, testimonial-card, recommendation-card {
  display: block;
}

.section-padding {
  padding: 5rem 0;
}

.section-padding-sm {
  padding: 3rem 0;
}

.text-center {
  text-align: center;
}

/* ========================================
   5. BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-cta {
  background: var(--color-light-green);
  color: var(--color-dark-green);
}

.btn-cta:hover {
  background: var(--color-dark-green);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background: var(--color-light-green);
  color: var(--color-white);
  border-color: var(--color-light-green);
}

/* ========================================
   6. SKIP NAV
   ======================================== */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-dark-green);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-nav:focus {
  top: 0;
  color: var(--color-white);
}

/* ========================================
   7. FOCUS STYLES
   ======================================== */
:focus-visible {
  outline: 3px solid var(--color-dark-green);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 3px solid var(--color-dark-green);
  outline-offset: 3px;
}

.nav-links a:focus-visible {
  outline: 3px solid var(--color-dark-green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================
   8. NAVIGATION
   ======================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-heading);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-light-green);
  border-bottom-color: var(--color-light-green);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-heading);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ========================================
   9. HERO BANNER (Internal pages)
   ======================================== */
.hero-banner {
  position: relative;
  height: 30vh;
  min-height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-color: var(--color-dark-green);
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 74, 46, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-overlay h1 {
  color: var(--color-white);
  font-size: 2.8rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ========================================
   10. CTA BAND
   ======================================== */
.cta-band {
  background: var(--color-dark-green);
  color: var(--color-white);
  text-align: center;
  padding: 4rem 20px;
}

.cta-band h2 {
  color: var(--color-white);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* ========================================
   11. FOOTER
   ======================================== */
.site-footer {
  background: var(--color-footer-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo img {
  height: 36px;
  width: auto;
}

.footer-links ul {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-light-green);
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0;
}

/* ========================================
   12. FLOATING ACTION BUTTONS
   ======================================== */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1500;
}

.fab-btn {
  height: 52px;
  padding: 0 18px 0 14px;
  color: var(--color-white);
  border-radius: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fab-btn:hover {
  transform: scale(1.05);
  color: var(--color-white);
}

.fab-whatsapp {
  background: #25D366;
}

.fab-whatsapp:hover {
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.fab-facebook {
  background: #1877F2;
}

.fab-facebook:hover {
  box-shadow: 0 6px 24px rgba(24, 119, 242, 0.5);
}

.fab-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ========================================
   13. PROJECT SHOWCASE COMPONENT
   ======================================== */
.project-showcase-section {
  background: var(--color-surface);
  padding-top: 2rem;
}

.project-showcase-cta {
  margin-top: 1.5rem;
}

/* ========================================
   14. SCROLL ANIMATIONS
   ======================================== */

/* Base state — hidden until observed */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in from left */
.anim-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-left.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Fade-in from right */
.anim-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-right.animated {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.anim-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-scale.animated {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children — each child delays slightly longer */
.stagger-children > .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.stagger-children > .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > .animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > .animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }
.stagger-children > .animate-on-scroll:nth-child(7) { transition-delay: 0.6s; }
.stagger-children > .animate-on-scroll:nth-child(8) { transition-delay: 0.7s; }
.stagger-children > .animate-on-scroll:nth-child(9) { transition-delay: 0.8s; }

/* Hero text entrance keyframe (used by home.css and page heroes) */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-banner-overlay h1 {
  animation: heroFadeUp 0.9s ease forwards;
  text-align: center;
}

/* CTA band pulse on scroll */
.cta-band.animated h2 {
  animation: heroFadeUp 0.7s ease forwards;
}

.cta-band.animated .btn {
  animation: heroFadeUp 0.7s ease 0.15s forwards;
  opacity: 0;
}

/* FAB entrance */
@keyframes fabSlideIn {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fab-container .fab-btn {
  opacity: 0;
  animation: fabSlideIn 0.5s ease forwards;
}

.fab-container .fab-btn:nth-child(1) {
  animation-delay: 0.5s;
}

.fab-container .fab-btn:nth-child(2) {
  animation-delay: 0.7s;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .anim-fade-left,
  .anim-fade-right,
  .anim-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-banner-overlay h1,
  .cta-band.animated h2,
  .cta-band.animated .btn,
  .fab-container .fab-btn {
    animation: none;
    opacity: 1;
  }
}

/* ========================================
   15. MEDIA QUERIES
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--color-white);
    flex-direction: column;
    padding: 2rem 0;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .nav-open .nav-links {
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    border-bottom: none;
  }

  .nav-links a.active {
    color: var(--color-dark-green);
    background: var(--color-surface);
    border-bottom: none;
  }

  .hero-banner {
    height: 25vh;
    min-height: 160px;
  }

  .hero-banner-overlay h1 {
    font-size: 2.2rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-links {
    order: 1;
  }

  .footer-links ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem 1.5rem;
    text-align: center;
  }

  .footer-logo {
    order: 2;
  }

  .footer-copy {
    order: 3;
  }

  .cta-band {
    display: none;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .site-footer {
    padding: 2rem 0;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  /* FABs: icon-only on small screens to save space */
  .fab-label {
    display: none;
  }

  .fab-btn {
    width: 52px;
    padding: 0;
    justify-content: center;
  }

  .hero-banner-overlay h1 {
    font-size: 1.6rem;
  }

}

/* Small mobile — 375px and under */
@media (max-width: 375px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .section-padding {
    padding: 2.5rem 0;
  }

  .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .hero-banner-overlay h1 {
    font-size: 1.3rem;
  }

}

/* ========================================
   16. MOBILE NAV — hamburger left, logo centre, CTA right
   ======================================== */
.nav-cta-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Logo sits in the absolute centre of the bar */
  .nav-inner {
    position: relative;
  }

  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Hamburger stays first in flow (left) */
  .hamburger {
    order: -1;
  }

  /* CTA pill on the right */
  .nav-cta-mobile {
    display: flex;
    align-items: center;
    margin-left: auto;
    background: var(--color-light-green);
    color: var(--color-dark-green);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease;
  }

  .nav-cta-mobile:hover {
    background: var(--color-dark-green);
    color: var(--color-white);
  }
}
