/* Light theme (default) */
:root {
  --page-bg: #ffffff;
  --surface: #f9f9f9;
  --text: #222222;
  --muted: #666666;
  --accent: #0078d4;
}

/* Dark theme */
[data-theme="dark"] {
  --page-bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
}

:root {
  --card-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --card-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Add inside your existing :root (light theme) */
:root {
  --page-bg: #ffffff;
  --surface: #f9f9f9;
  --text: #222222;
  --muted: #666666;
  --accent: #0078d4;

  /* FAQ variables */
  --faq-bg: var(--page-bg);
  --faq-card-bg: var(--surface);
  --faq-text: var(--text);
  --faq-answer-bg: #f0f4f8;
}

/* Add inside your [data-theme="dark"] */
[data-theme="dark"] {
  --page-bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;

  /* FAQ variables */
  --faq-bg: var(--page-bg);
  --faq-card-bg: var(--surface);
  --faq-text: var(--text);
  --faq-answer-bg: #1e293b;
}

/* Apply variables */
body {
  font-family: 'Lexend', 'Segoe UI', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  padding: 0px;
  margin: 0px;
}

/* Ensure form controls + buttons inherit */
button, input, textarea, select {
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section {
  background: var(--surface);
  padding: 2rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  section {
    padding: 1.2rem;
  }
}

a {
  color: var(--accent);
}


/* Smooth transitions for theme changes */
.services-carousel,
.carousel-card,
.btn-cta,
.footer,
.navbar {
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Navigation Buttons */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.05);
  border: none;
  font-size: 1.5rem;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.nav:hover {
  background: rgba(0,0,0,0.15);
}

.nav.prev { left: 20px; }
.nav.next { right: 20px; }

@media (max-width: 768px) {
  .slide-content {
    flex-direction: column;
    text-align: center;
  }

  .slide-content img,
  .text-box {
    width: 100%;
  }
}

/* Sticky Navbar Base */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8); /* Soft translucent white */
  backdrop-filter: blur(10px); /* Fluent style blur */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

/* Container for alignment */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  max-width: 1100px;
  margin: auto;
}

/* Logo group */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* space between image and text */
  text-decoration: none;
}

.logo-img {
  height: 40px;  /* controls size */
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0078d4;
}


/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 6px 8px;
  border-radius: 6px;
}

.nav-links li a:hover {
  background-color: #e5f1fb;
  color: #0078d4;
}

/* Hamburger hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    width: 200px;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    display: none; /* hidden by default */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block; /* show hamburger on mobile */
  }
}

html {
  scroll-behavior: smooth;
}


/* Portfolio Section */
.portfolio {
  padding: 4rem 2rem;
  background: var(--page-bg);
  text-align: center;
}

.portfolio h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.portfolio .subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-item {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.portfolio-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
  text-align: left;
  flex: 1;
}

.portfolio-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.portfolio-content p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #1d4ed8;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .portfolio {
    padding: 3rem 1rem;
  }
}

.project-img {
  width: 100%;         /* always take the full width of its parent container */
  height: auto;        /* scale proportionally, don’t squish */
  display: block;      /* remove any inline spacing */
  border-radius: 8px;  /* optional – gives clean rounded edges */
  object-fit: cover;   /* ensures image fills nicely if the container enforces height */
  max-width: 100%;     /* prevents going beyond the screen */
}

/* Dropdown container (hidden by default) */
.case-dropdown {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  margin-top: 1rem;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 0 1rem;
}

/* Active state when toggled open */
.case-dropdown.open {
  max-height: 6000px; /* enough for contents */
  opacity: 1;
  padding: 1rem;
}

.case-content {
  margin-bottom: 1.5rem;
}

.case-content h4 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.case-content p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* Buttons inside dropdown */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.other-works {
  column-count: 3;            /* 3 columns on desktop */
  column-gap: 1rem;           /* space between columns */
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.work-item {
  break-inside: avoid;        /* keeps item together, avoids cut */
  margin-bottom: 1rem;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.work-item img {
  width: 100%;
  height: auto;               /* keeps original proportions */
  display: block;
}

.img-box img.lazy {
  width: 100%;              /* scale to container */
  height: auto;             /* maintain aspect ratio */
  display: block;           /* removes bottom gap */
  object-fit: cover;        /* keeps crop neat if forced height */
}

.work-item h4 {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  color: var(--text);
  background: var(--page-bg);
}

/* Responsiveness */
@media (max-width: 1024px) {
  .other-works {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .other-works {
    column-count: 1;
  }
}


/* optional effect */
.lazy {
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.lazy.loaded {
  opacity: 1;
}

/* CTA button */
.btn-cta {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);   /* theme-aware */
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 180ms ease, transform 180ms ease;
  border: 1px solid rgba(0,0,0,0); /* keeps button crisp across themes */
}

.btn-cta:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.footer {
  background: var(--surface);
  color: var(--text);
  padding: 2rem 1rem;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.footer-socials a {
  color: var(--text);
  margin: 0 0.5rem;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: #ffcc00; /* Accent stays the same */
}


/* Add this to your existing CSS files for screen reader accessibility */

/* Screen reader only class for accessible labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

    /* Integration Variables - Matches your existing theme */
    :root {
      --brand-mustard: #FCBF49;
      --brand-orange: #F77F00;
      --brand-red: #E63946;
      --brand-green: #06A77D;
      --brand-blue: #023E8A;
      
      --gray-inactive: #94a3b8;
      --gray-base: #64748b;
      --text-primary: #222222;
      --text-muted: #666666;
      --surface: #f9f9f9;
      --page-bg: #ffffff;
    }

    [data-theme="dark"] {
      --text-primary: #f1f5f9;
      --text-muted: #94a3b8;
      --surface: #1e293b;
      --page-bg: #0f172a;
      --gray-inactive: #475569;
    }

/* --- JOEMETRY GROWTH ENGINE CSS --- */
.roi-section { padding: 60px 0; background: var(--surface); border-radius: 20px; margin: 40px auto; max-width: 1100px; }
.roi-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 0 20px; }

.impact-svg { width: 100%; height: auto; overflow: visible; }
.ghost-arc { fill: none; stroke: var(--muted); stroke-width: 6; stroke-opacity: 0.1; stroke-linecap: round; }

.roi-arc {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: var(--length);
  stroke-dashoffset: var(--length); /* Starts hidden */
  transition: stroke-dashoffset 2.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.active .roi-arc { stroke-dashoffset: 0; }
.red-roi { stroke: #ff0000; }
.orange-roi { stroke: #ff8c00; transition-delay: 0.3s; }
.yellow-roi { stroke: #ffd700; transition-delay: 0.6s; }

.green-hub { fill: #4CAF50; transform: scale(0); transition: 1s ease; transform-origin: 100px 110px; }
.active .green-hub { transform: scale(1); }

/* Legend Styling */
.roi-legend { text-align: left; }
.legend-item { display: flex; gap: 15px; margin-bottom: 20px; opacity: 0; transform: translateY(10px); transition: 0.8s ease forwards; }
.active .legend-item { opacity: 1; transform: translateY(0); }
.dot { width: 8px; height: 45px; background: var(--accent); border-radius: 4px; flex-shrink: 0; }

@media (max-width: 768px) {
  .roi-grid { grid-template-columns: 1fr; text-align: center; }
  .roi-legend { margin-top: 30px; }
}