/* ===============================
   COLOR SYSTEM (LIGHT THEME)
================================ */
:root {
  --bg-main: #F9FAFB;          /* soft white */
  --bg-card: #FFFFFF;

  --text-main: #1F2933;        /* charcoal */
  --text-muted: #6B7280;

  --accent-main: #F7941D;      /* warm orange */
  --accent-soft: #FFB84D;

  --border-soft: rgba(31,41,51,0.12);
}

/* ===============================
   MEGA MENU BORDER CONTROLS
================================ */
:root {
  --mega-border-color: #F7941D;   /* warm orange */
  --mega-border-width: 2px;       /* change thickness here */
  --mega-border-radius: 16px;
}

/* ===============================
   RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===============================
   HEADER – REFINED SPACING
================================ */
.site-header {
  width: 100%;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-soft);

  position: relative;   /* 🔑 THIS IS THE FIX */
  z-index: 1000;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.4rem 2.5rem;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: relative;   /* 🔑 NEW: anchor point */
}
/* ===============================
   BRAND – REFINED
================================ */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;                  /* slightly more space */
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 46px;                  /* clearer presence */
}

.brand-text {
  font-size: 1.5rem;            /* subtle emphasis */
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand-text span {
  color: var(--accent-main);
}

/* ===============================
   NAVIGATION – DESKTOP
================================ */
.main-nav {
  display: flex;
  gap: 2.4rem;                   /* more breathing space */
}

.main-nav a {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding-bottom: 6px;
}

/* subtle underline like in the video */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-main);
  transition: width 0.25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}


/* ===============================
   MOBILE NAVIGATION
================================ */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-soft);

    display: none;
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-soft);
  }

  .main-nav.show {
    display: flex;
  }
}
.main-nav {
  margin-right: 80px;   /* 🔑 pulls menu toward center */
}
/* ===============================
   HAMBURGER BUTTON
================================ */
.menu-toggle {
  display: none;              /* HIDDEN BY DEFAULT (DESKTOP) */
  width: 40px;
  height: 40px;

  background: none;
  border: none;
  cursor: pointer;

  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
  margin: 3px 0;
}

/* ===============================
   MOBILE HEADER LOGIC
================================ */
@media (max-width: 768px) {

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
  }

  /* MOBILE MENU — ALIGNED TO HAMBURGER */
  .main-nav.show {
    display: flex;
    position: absolute;
    top: 100%;

    right: 0;              /* 🔑 aligns with hamburger */
    left: auto;

    width: 220px;
    background: var(--bg-card);

    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    flex-direction: column;
    z-index: 1001;
  }

  .main-nav a {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-soft);
  }

  .main-nav a:last-child {
    border-bottom: none;
  }
}
@media (max-width: 768px) {
  .mega-menu {
    display: none !important;
  }
}

/* ===============================
   FULL WIDTH MEGA MENU – SERVICES
================================ */

.mega-wrap {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(10px);

  z-index: 2000;
}

/* SHOW ONLY WHEN SERVICES IS HOVERED */
.has-mega:hover ~ .mega-wrap,
.mega-wrap:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* INNER CARD */
.mega-menu {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 2rem;

  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.site-header {
  position: relative; /* anchor for mega menu */
}

.mega-wrap {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;                 /* 🔑 FULL WIDTH */
  background: transparent;

  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;

  z-index: 2000;
}

/* inner aligned content */
.mega-menu {
  max-width: 1180px;
  margin: 1.5rem auto;
  padding: 2rem;

  background: var(--bg-card);

  border: var(--mega-border-width) solid var(--mega-border-color);
  border-radius: var(--mega-border-radius);

  box-shadow: 
    0 30px 60px rgba(0,0,0,0.12),
    0 0 0 1px rgba(247,148,29,0.15); /* optional soft glow */

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}


/* LEFT IMAGE */
/* ===============================
   MEGA MENU IMAGE – SAFE FIT
================================ */

.mega-image {
  width: 100%;
  height: 100%;
  min-height: 280px;              /* controls visual height */
  display: flex;
  align-items: center;
  justify-content: center;

  background: #f9f9f9;            /* soft neutral base */
  border-radius: 12px;
  overflow: hidden;
}

.mega-image img {
  max-width: 95%;
  max-height: 95%;
  width: auto;
  height: auto;
  
  object-fit: contain;            /* 🔑 NO CROPPING */
}

@keyframes softFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-9px); }
  100% { transform: translateY(0); }
}

.mega-image img {
  animation: softFloat 6s ease-in-out infinite;
}

/* RIGHT CONTENT */
.mega-content h4 {
  font-size: 0.9rem;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.mega-content ul {
  list-style: none;
}

.mega-content li {
  margin-bottom: 0.8rem;
}

.mega-content a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

.mega-content a:hover {
  color: var(--accent-main);
}

/* ===============================
   MEGA MENU PATTERN OVERLAY
================================ */
.mega-menu {
  position: relative;
  overflow: hidden; /* keep pattern inside */
}

/* pattern layer */
.mega-menu::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("data:image/svg+xml,%3Csvg width='600' height='600' viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 300C150 200 300 400 600 300' stroke='%23F7941D' stroke-width='2' fill='none'/%3E%3Cpath d='M0 350C180 250 320 450 600 350' stroke='%23F7941D' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");


  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 80%;

  opacity: 0.25;          /* 🔑 transparency control */
  pointer-events: none;  /* 🔑 clicks pass through */

  z-index: 0;
}

/* keep content above pattern */
.mega-menu > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .mega-menu::before,
  .mega-menu::after {
    display: none;
  }
}

/* ===============================
   WAVE PATTERN – SOFT FLOW ANIMATION
================================ */

@keyframes waveDrift {
  0% {
    background-position: right bottom;
  }
  50% {
    background-position: right 85%;
  }
  100% {
    background-position: right bottom;
  }
}

.mega-menu::before {
  animation: waveDrift 18s ease-in-out infinite;
}

/* ===============================
   SERVICE IMAGE TRANSITION
================================ */

.mega-image img {
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease;
}
/* ===============================
   HEADER TRANSPARENT MODE
================================ */

.site-header {
  position: fixed;              /* sits on hero */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background: rgba(255,255,255,0);   /* transparent */
  border-bottom: none;

  transition: 
    background 0.4s ease,
    box-shadow 0.4s ease,
    border 0.4s ease;
}

/* HEADER AFTER SCROLL */
.site-header.header-solid {
  background: var(--bg-main);        /* original background */
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
