/* EK-INSPIRATION: Layout & styles for detail page
   Original look & behavior emulated; content is original/placeholders.
*/
/* Root tokens - Light Mode (default) */
:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f9f9f9;
  --color-bg-card: #ffffff;
  --color-text-primary: #000000;
  --color-text-secondary: #666666;
  --color-accent: #1E2988;
  --color-accent-hover: #101e9c;
  --color-dark: #1a1a1a;
  --color-neutral: #f5f5f5;
  --color-border: #e5e5e5;
  --color-input-border: #d4d4d4;
  --color-shadow: rgba(0, 0, 0, 0.06);
  --color-shadow-raised: rgba(0, 0, 0, 0.16);

  --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-soft: 0 2px 12px var(--color-shadow);
  --shadow-raised: 0 8px 32px var(--color-shadow-raised);

  --container-width: 1120px;
  --transition-fast: 200ms ease-in-out;

  --btn-height: 44px;
  --btn-padding-x: 28px;
  --btn-font-size: 14px;
}

/* Dark Mode — mapped to site palette (replace the existing block) */
[data-theme="dark"] {
  /* existing palette */
  --color-bg: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-card: #1e293b;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-accent: #1E2988;
  --color-accent-hover: #101e9c;
  --color-dark: #f1f5f9;
  --color-neutral: #1e293b;
  --color-border: #334155;
  --color-input-border: #475569;
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-shadow-raised: rgba(0, 0, 0, 0.5);

  /* mapped variables used by page layout (ensure consistent global tone) */
  --bg: var(--color-bg);
  --surface: var(--color-bg-secondary);      /* the dark blue you want */
  --card: var(--color-bg-card);
  --text: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --accent: var(--color-accent);
  --border: var(--color-border);
  --input-border: var(--color-input-border);
  --shadow-soft: var(--color-shadow);
}

/* THEME VARIABLES (light + dark). Replace existing :root block if present. */
:root{
  /* layout */
  --max-width: 1180px;
  --container-pad: 20px;

  /* light theme colours */
  --bg: #ffffff;
  --surface: #ffffff;
  --card-bg: #f6f6f6;
  --muted: #666666;
  --text: #0a0a0a;
  --accent: #000000;
  --border: rgba(0,0,0,0.06);
  --input-border: rgba(0,0,0,0.08);
  --shadow-soft: 0 8px 20px rgba(10,10,10,0.06);

  /* semantic tokens */
  --link: var(--accent);
  --success: #16a34a;
  --danger: #ef4444;

  /* sizes */
  --radius: 6px;
  --btn-radius: 20px;
  --gap: 28px;
}

/* Dark theme variables — applied when html[data-theme="dark"] */
html[data-theme="dark"]{
  --bg: #0b0b0c;
  --surface: #0f1113;
  --card-bg: #111214;
  --muted: #bfbfbf;
  --text: #ececec;
  --accent: #e6e6e6;
  --border: rgba(255,255,255,0.06);
  --input-border: rgba(255,255,255,0.08);
  --shadow-soft: 0 8px 20px rgba(0,0,0,0.6);

  --link: var(--accent);
}

/* Prefer system dark mode by default when user has no choice saved */
@media (prefers-color-scheme: dark) {
  :root:not([data-user-theme]) { /* leave explicit user choice unaffected */
    color-scheme: dark;
  }
}

/* Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}





/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
  line-height: 60px;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-bg-card);
  border: 2px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 20px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.theme-toggle:hover {
  transform: scale(1.1);
}



/* Base variables you can change to tune look */
:root{
  --max-width: 1180px;
  --gap: 28px;
  --accent: #000;
  --muted: #666;
  --bg: #fff;
  --card-bg: #f3f3f3;
  --radius: 6px;
  --container-pad: 20px;
  --section-pad: 48px;
  --btn-radius: 18px;
}

/* HERO – keep layout here, but do not override global top spacing */
.hero {
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  background: #fff;
}

.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% text, 50% image */
  align-items: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Left side text container */
.hero-text {
  padding: 80px 60px;               /* adjust as needed */
  box-sizing: border-box;
  max-width: 600px;
}

/* Right full-bleed image */
/* ============================
   FULL-WIDTH HERO WITH OVERLAY TEXT
   ============================ */

.sa-hero {
  position: relative;
  width: 100%;
  height: 520px; /* adjust height here */
  overflow: hidden;
}

.sa-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* === HERO: non-invasive overlay on image layer only (no layout changes) ===
   IMPORTANT: place this AFTER the .sa-hero-bg rule; it will not touch .sa-hero or .sa-hero-content.
*/

/* overlay sits inside the image element so it cannot affect text layout */
.sa-hero-bg {
  position: absolute; /* existing */
  inset: 0;           /* existing */
  z-index: 1;         /* sits below .sa-hero-content which currently is z-index:5 */
}

/* the actual overlay element inside the image layer */
.sa-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  
  pointer-events: none;
  z-index: 2; /* above the image but below .sa-hero-content (z-index:5) */
  transition: background-color 220ms ease;
  /* light-mode: subtle white-ish wash to help dark text */
  background-color: rgba(255,255,255,0.14);
}

/* dark-mode: stronger dark wash for legibility */
html[data-theme="dark"] .sa-hero-bg::before {
  background-color: rgba(2,6,23,0.58);
}

/* Force text color only (no layout changes) and add a gentle shadow for contrast.
   NOTE: we do NOT change font-size, font-family, padding, margin or positioning. */
.sa-hero-content .eyebrow,
.sa-hero-content .hero-title,
.sa-hero-content .hero-lead {
  color: inherit; /* keep inheritance by default */
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* In dark mode explicitly set text color to the palette primary, WITHOUT changing fonts/spacing */
html[data-theme="dark"] .sa-hero-content .eyebrow,
html[data-theme="dark"] .sa-hero-content .hero-title,
html[data-theme="dark"] .sa-hero-content .hero-lead {
  color: var(--color-text-primary) !important;
  -webkit-text-fill-color: var(--color-text-primary) !important;
  text-shadow: 0 3px 14px rgba(0,0,0,0.6);
}

/* A tiny responsive tweak so the overlay is slightly stronger on small screens (keeps layout intact) */
@media (max-width: 768px) {
  .sa-hero-bg::before { background-color: rgba(0,0,0,0.18); }
}

.sa-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 80px;
  max-width: 720px;
  z-index: 5;

  /* Light mode text color (DO NOT use !important so dark mode override can win) */
  color: #0a0a0a;
}


.sa-hero-content .eyebrow {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
}

.sa-hero-content .hero-title {
  font-size: 44px;
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.1;
}

.sa-hero-content .hero-lead {
  font-size: 16px;
  max-width: 600px;
  line-height: 1.5;
  opacity: 0.95;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sa-hero {
    height: 380px;
  }
  .sa-hero-content {
    padding: 0 24px;
  }
  .sa-hero-content .hero-title {
    font-size: 28px;
  }
}



/* typography: use Rubik for a closer match (Google Fonts) */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700;800;900&display=swap');
body {
  font-family: var(--font-family-base);
}



/* hero text column */
.hero-text{ flex: 0 1 52%; max-width:640px; }
.eyebrow{ font-weight:700; color:var(--muted); margin-bottom:8px; letter-spacing:0.08em; font-size:13px; }
.hero-title{ font-size:48px; margin:0 0 14px; font-weight:900; line-height:1.02; letter-spacing:-0.01em; color:#0a0a0a; }
.hero-lead{ color:var(--muted); margin:0 0 22px; max-width:720px; font-size:15px; font-weight:400; }

/* hero visual bleeds to the right edge exactly like ekdesign
   calc handles center container vs viewport gutters */
.hero-visual{
  flex: 0 0 auto;
  width: calc(50% + ((100vw - var(--max-width))/2));
  height:520px; /* taller hero like ekdesign */
  background-size: cover;
  background-position: center;
  border-radius: 0;            /* flush edges */
  box-shadow: none;           /* no shadow for flush look */
  border: 0;
  background-color: #efefef;  /* light grey canvas behind product */
}

/* exact button look */
.btn-black{
  background:#000;
  color:#fff;
  border:none;
  padding:12px 24px;
  border-radius:24px;
  font-weight:700;
  letter-spacing:0.02em;
  text-transform:none;
  box-shadow:none;
}

/* Categories (remove extra vertical gap, tighten spacing) */
.categories{ padding: 10px 0 16px; border-top:0; border-bottom:0; margin:0; background:#fff; }
.section-heading.center{ margin:8px 0 8px; font-size:26px; font-weight:800; }
.cats-grid{ display:flex; gap:22px; justify-content:center; align-items:center; flex-wrap:wrap; margin:6px 0 18px; padding:0; }

/* category card style tuned to match */
.cat{
  width:120px;
  text-align:center;
  background:#fff;
  border-radius:6px;
  padding:14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
  border:1px solid rgba(0,0,0,0.04);
}
.cat img{ width:100%; height:90px; object-fit:contain; display:block; }
.cat-label{ font-size:12px; margin-top:8px; color:var(--muted); font-weight:700; }


/* PAGE HEADER */
.page-header { 
  padding: 60px 0 40px; 
  background: var(--color-bg-secondary);
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 24px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--color-bg-card);
}

.nav-btn:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.back-btn {
  border-color: var(--color-accent);
  background: rgba(var(--color-accent-rgb), 0.1);
}

.back-btn:hover {
  transform: translateY(-2px) scale(1.05);
}


.back-btn { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  color: var(--color-text-primary); 
  text-decoration: none; 
  font-weight: 600; 
  padding: 12px 20px; 
  border: 1px solid var(--color-border); 
  border-radius: 8px; 
  transition: all 0.3s ease;
}
.back-btn:hover { background: var(--color-accent); color: white; }
.breadcrumb { display: flex; gap: 12px; align-items: center; }
.breadcrumb li { color: var(--color-text-secondary); }
.breadcrumb li.active { color: var(--color-text-primary); font-weight: 600; }
.page-title { font-size: 42px; margin: 0; }


/* ===== PRODUCTS: Full-half image / half text (replace previous product-block CSS) ===== */

.products { width:100%; margin:0; padding:0; background:transparent; }

/* Outer wrapper keeps centered text content while the image bleeds */
.products-inner { max-width: var(--max-width); margin:0 auto; padding:0; box-sizing:border-box; }

/* Each product-block is a full-width section (we will position two columns: text (in-centered wrap area) and image (bleeding half). */
.product-block {
  position: relative;
  width: 100vw;                     /* occupy the whole viewport width */
  left: 50%;                        /* move left so we can center with transform */
  right: 50%;
  transform: translateX(-50%);      /* center the full-bleed section */
  display: grid;
  grid-template-columns: 1fr auto;  /* text column (flexible), image column (auto - sized via CSS below) */
  align-items: stretch;
  gap: 0;
  padding: 0;                       /* minimal vertical internal padding handled below as needed */
  margin: 0;
  box-sizing: border-box;
  overflow: visible;
}

/* content inside the product-block - contains text; we constrain it with the same wrap width */
/* product-text: occupy exact left half so background covers fully */
/* product-text: occupy exact left half so background covers fully (theme-aware & matches header/footer) */
.product-text{
  /* occupy exactly half the viewport width so the left column is fully covered */
  width: 50vw;
  min-width: 50vw;

  /* keep internal padding/copy layout the same */
  padding: 48px 40px;
  box-sizing: border-box;

  /* vertical centering of text inside the section */
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* Use the same surface color as the header/footer to match dark mode tone */
  background: var(--surface);
  color: var(--text);
}



/* product titles and copy */
.product-title { margin:0 0 10px; font-size:22px; font-weight:900; color:#0a0a0a; }
.product-desc { margin:0 0 18px; color:var(--muted); line-height:1.6; font-size:15px; max-width:520px; }

/* CTA button style */
.btn-small { padding:9px 16px; border-radius:20px; background:#000; color:#fff; border:none; font-weight:700; }

/* Image column: occupy exactly half the viewport width (50vw) and fill the block vertically */
.product-image {
  width: 50vw;                     /* half the viewport width */
  min-width: 50vw;
  height: 100%;                    /* will match height of the text column because we align stretch on grid */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display:block;
  /* remove border-radius/shadows so the image block visually touches adjacent sections */
  border-radius: 0;
  box-shadow: none;
  border: none;
  background-color: #efefef;
}

/* For inverted blocks (image on left) we change grid ordering so image comes first */
.product-block.invert {
  grid-template-columns: auto 1fr; /* image column then text column */
}
.product-block.invert .product-image { order: 0; }
.product-block.invert .product-text  { order: 1; }

/* We ensure the height of the section is governed by the text column padding/content.
   If you want uniform section heights, you can set a min-height here (optional). */
.product-block { min-height: 460px; }        /* change this value to change section height */

/* Remove vertical gaps between adjacent blocks (touching sections) */
.product-block + .product-block { margin-top: 0; border-top: 0; }

/* Responsive: on smaller screens stack image above text and remove bleed behavior */
@media (max-width: 980px) {
  .product-block { grid-template-columns: 1fr; left:0; transform:none; min-height:auto; }
  .products-inner{ padding:0 16px; }

  /* stacked mobile: text full width above/below image */
  .product-text {
    width: 100% !important;
    min-width: 100% !important;
    padding: 20px !important;
  }

  .product-image { width:100%; min-width:100%; height:220px; border-radius:8px; }
}



/* Pioneers / stats: tighten spacing and style like ekdesign */
.pioneers{ padding:28px 0; text-align:center; background:#fff; }
.center-title{ font-size:28px; margin:8px 0 6px; font-weight:900; }
.center-sub{ font-weight:800; font-size:15px; margin:6px 0 12px; }
.center-desc{ max-width:920px; margin:0 auto 18px; color:var(--muted); font-size:14px; }

/* stats row: outlined boxes like ekdesign */
.stats-row{ display:flex; gap:18px; justify-content:center; margin-top:12px; flex-wrap:wrap; }
.stat{
  min-width:160px;
  padding:20px;
  border:1px solid rgba(0,0,0,0.08);
  background:#fff;
  border-radius:4px;
  text-align:center;
  box-shadow:none;
}
.stat-num{ font-size:24px; font-weight:900; letter-spacing:0.02em; }
.stat-label{ color:var(--muted); font-size:12px; margin-top:6px; letter-spacing:0.08em; font-weight:700; }

/* Footer background slightly darker like ekdesign */
.site-footer{ background:#efefef; padding:36px 0 60px; margin-top:0; }




/* responsive: preserve bleed on medium widths, collapse on small screens */
@media (max-width:1100px){
  .hero-inner{ padding:40px 18px; }
  .hero-visual{ width: calc(60% + ((100vw - var(--max-width))/2)); height:420px; }
  .product-image, .product-block.invert .product-image{ min-height:260px; }
}
@media (max-width:980px){
  .hero-inner{ flex-direction:column-reverse; padding:26px 16px; }
  .hero-visual{ width:100%; height:260px; margin:0; border-radius:6px; box-shadow:0 8px 20px rgba(0,0,0,0.06); }
  .product-block{ grid-template-columns: 1fr; padding:18px 0; }
  .product-block .product-image,
  .product-block.invert .product-image { width:100%; margin:0; min-height:220px; border-radius:6px; box-shadow:0 8px 20px rgba(0,0,0,0.04); background-size:cover; }
  .wrap{ padding:0 16px; }
}
@media (max-width:560px){
  .hero-title{ font-size:30px; }
  .hero-visual{ height:200px; }
  .product-image{ min-height:160px; }
}

/* Pioneers center section */
.pioneers{ padding:44px 0; text-align:center; background:#fafafa; }
.center-title{ font-size:30px; margin:0 0 8px; font-weight:800; }
.center-sub{ font-weight:800; font-size:16px; margin:6px 0 12px; }
.center-desc{ max-width:920px; margin:0 auto 20px; color:var(--muted); }

/* Stats row */
.stats-row{ display:flex; gap:18px; justify-content:center; margin-top:18px; flex-wrap:wrap; }
.stat{ min-width:160px; padding:18px; border:1px solid rgba(0,0,0,0.06); background:#fff; border-radius:6px; text-align:center; }
.stat-num{ font-size:26px; font-weight:800; }
.stat-label{ color:var(--muted); font-size:13px; margin-top:6px; letter-spacing:0.08em; }

/* Footer */
.site-footer {
  background-color: var(--color-neutral);
  padding: 40px 0 24px;
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: background-color 0.3s ease;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}
.footer-logo {
  margin-bottom: 8px;
}
.footer-col h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li + li {
  margin-top: 4px;
}
.footer-col a {
  text-decoration: none;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}
.footer-col a:hover {
  color: var(--color-accent);
}
/* Social Links */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-border);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
  background-color: var(--color-accent);
  color: #ffffff;
  transform: translateY(-2px);
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  text-align: center;
  font-size: 12px;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .tab-layout,
  .calculator-layout,
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dcba-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid-new {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-list {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background-color: var(--color-bg);
    flex-direction: column;
    gap: 12px;
    padding: 12px 20px 16px;
    display: none;
    box-shadow: 0 4px 8px var(--color-shadow);
  }
  .nav-list.open {
    display: flex;
  }
  .hero {
    min-height: 60vh;
    background-attachment: scroll;
  }
  .hero-content {
    padding-top: 84px;
    padding-bottom: 72px;
  }
  .hero-actions {
    max-width: 100%;
  }
  .hero-highlights {
    gap: 20px;
  }
  .form-row-inline {
    grid-template-columns: 1fr;
  }
  .form-benefits {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 56px 0;
  }
  .tab-image-wrapper,
  .tab-image {
    min-height: 280px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tab-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .tab-actions .btn {
    width: 100%;
  }
  .dcba-grid {
    grid-template-columns: 1fr;
  }
  .contact-details-new {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 28px;
  }
  .theme-toggle {
    top: 80px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  .visualise-grid {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Image handling */
img {
  display: block;
  max-width: 100%;
  height: auto;
}
img[src=""],
img:not([src]) {
  opacity: 0;
}
/* PRODUCT TITLE THEME OVERRIDE — layout neutral, only changes color */
.product-text .product-title,
.product-title {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important; /* extra for some browsers */
}
/* ENFORCE: use var(--surface) for common section backgrounds in dark mode */
html[data-theme="dark"] .sa-hero,
html[data-theme="dark"] .sa-hero-bg,
html[data-theme="dark"] .product-text,
html[data-theme="dark"] .product-image,
html[data-theme="dark"] .products,
html[data-theme="dark"] .products-inner,
html[data-theme="dark"] .sa-contact,
html[data-theme="dark"] .sa-footer,
html[data-theme="dark"] .sa-footer-grid,
html[data-theme="dark"] .sa-footer-col {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}
/* === Ensure big sections use the exact same dark-blue tone declared in the palette ===
   Uses the palette variable --color-bg-secondary already defined in your [data-theme="dark"] block.
   This is layout-neutral and only forces background + text colors for these large areas.
*/
html[data-theme="dark"] .product-text,
html[data-theme="dark"] .sa-hero,
html[data-theme="dark"] .products,
html[data-theme="dark"] .products-inner,
html[data-theme="dark"] .sa-contact,
html[data-theme="dark"] .sa-footer {
  background-color: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
  border-color: var(--color-border) !important;
}

/* also make product title use the primary text colour in dark */
html[data-theme="dark"] .product-title {
  color: var(--color-text-primary) !important;
}
/* ===========================
/* Detail pages: prevent full-bleed sections from causing horizontal scroll */
body.page-details {
  overflow-x: hidden;
}

/* GALLERY PAGE SPECIFIC STYLES */
.page-gallery .kitchen-project {
  margin-bottom: 80px;
}

.page-gallery .project-title {
  font-size: 36px;
  font-weight: 900;
  text-align: center;
  margin: 40px 0 20px;
  color: var(--color-text-primary);
}

.page-gallery .project-hero-image {
  width: 100vw;
  height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  border-radius: 0;
}

/* Container: show exactly 3 cards + gaps, rest via scroll */
.page-gallery .project-grid {
  padding: 40px 0;
  max-width: calc(3 * 620px + 2 * 20px); /* 3 cards + 2 gaps, match card width below - Edit this to change the width of the image*/
  margin: 0 auto;
  overflow: hidden;
}

/* Wrapper so arrows sit over the scrolling row */
.page-gallery .image-row-wrapper {
  position: relative;
}

/* Arrows overlay (no layout change to images) */
.page-gallery .image-row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  outline: none;
}

.page-gallery .image-row.is-dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
}


.page-gallery .image-row-arrow--left {
  left: 10px;
}

.page-gallery .image-row-arrow--right {
  right: 10px;
}

.page-gallery .image-row-arrow i {
  pointer-events: none;
}

/* Hide arrows on small screens if you want only drag/scroll there */
@media (max-width: 768px) {
  .page-gallery .image-row-arrow {
    display: none;
  }
}


/* Horizontal scroll row */
.page-gallery .image-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  width: 100%;
  overflow-x: auto;      /* must be auto */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}


/* Each card: fixed width so extra cards require scroll */
.page-gallery .image-row .image-item {
  flex: 0 0 620px;       /* same width as in your nuclear block - Edit this also with the same number to change the width of the image */
  max-width: 620px;
  scroll-snap-align: start;
}

/* Image styling */
.page-gallery .image-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
}

.page-gallery .image-item img:hover {
  transform: scale(1.02);
}

/* Mobile responsive */
@media (max-width: 980px) {
  .page-gallery .project-grid {
    max-width: 100%;
    padding: 24px 16px;
  }

  .page-gallery .image-row {
    gap: 16px;
  }

  .page-gallery .image-row .image-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .page-gallery .project-hero-image {
    height: 350px;
  }

  .page-gallery .project-title {
    font-size: 28px;
  }
}

/* Gallery drag ULTRA smooth */
.image-row {
  cursor: grab;
  scroll-snap-type: x mandatory; /* normal snapping */
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.image-row::-webkit-scrollbar {
  display: none; /* Chrome */
}

.image-row .image-item img {
  pointer-events: auto;
  cursor: zoom-in;
}

.image-row.is-dragging {
  scroll-snap-type: none !important; /* disable snapping during drag */
  scroll-behavior: auto !important;
  cursor: grabbing !important;
}

.image-item {
  scroll-snap-align: center;  /* ← CHANGE THIS FROM 'start' to 'center' */
  flex-shrink: 0;
}

/* Gallery fullscreen overlay */
.gallery-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.95) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
}

.gallery-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}


.gallery-overlay img {
  max-width: 95vw !important;
  max-height: 90vh !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
touch-action: pan-x pan-y !important;
}


.gallery-overlay-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  z-index: 10000;
}

/* Gallery overlay arrows - FIXED POSITIONING */
.gallery-overlay-prev,
.gallery-overlay-next {
  position: absolute !important;
  top: 50% !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
  font-size: 40px !important;
  cursor: pointer !important;
  z-index: 10001 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px) !important;
}

.gallery-overlay-prev {
  left: 30px !important;
  transform: translateY(-50%) !important;
  content: '‹' !important;
}

.gallery-overlay-next {
  right: 30px !important;
  transform: translateY(-50%) !important;
  content: '›' !important;
}

/* Mobile overlay arrows - ALWAYS VISIBLE */
@media (max-width: 980px) {
  .gallery-overlay-prev {
    left: 10px !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 24px !important;
  }
  
  .gallery-overlay-next {
    right: 10px !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 24px !important;
  }
}

  
  .gallery-overlay-close {
    top: 15px !important;
    right: 15px !important;
    font-size: 24px !important;
  }
  
  /* Touch feedback */
  .gallery-overlay-prev:active,
  .gallery-overlay-next:active,
  .gallery-overlay-close:active {
    transform: translateY(-50%) scale(0.95) !important;
  }



/* Touch feedback */
.gallery-overlay-prev:active,
.gallery-overlay-next:active,
.gallery-overlay-close:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-overlay {
  overflow: auto !important;
  touch-action: pan-y !important;
}
