:root{
  --dw-text:#0b1320;
  --dw-border:rgba(15,23,42,.10);
  --dw-shadow:0 10px 30px rgba(2, 6, 23, .08);

  --dw-header-bg:#ffffff;
  --dw-dropdown-bg:#ffffff;

  --dw-brand-box:#394494;   /* Correct blue */
  --dw-radius:14px;

  --dw-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;

  --dw-accent:#2563eb;
  --dw-accent-hover:#1d4ed8;
}

/* Page background */
html, body{
  background: #ffffff;
  margin: 0;
}

/* Isolate header styles */
.dw-header, .dw-header *{
  box-sizing: border-box;
  font-family: var(--dw-font);
}

.dw-header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--dw-header-bg);
  border-bottom: 1px solid var(--dw-border);
}

.dw-header.dw-is-scrolled{
  box-shadow: var(--dw-shadow);
}

.dw-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}

/* =================================
   LOGO BLOCK (Square, #394494)
================================= */

.dw-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;

  background: var(--dw-brand-box);
  padding: 18px 22px;
  border-radius: 0;        /* Square */
}

.dw-logo{
  height: 74px;
  width: auto;
  display:block;
}

/* =================================
   NAVIGATION
================================= */

.dw-nav{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 14px 0;
}

.dw-link{
  color: var(--dw-text) !important;
  text-decoration:none !important;
  font-size: 18px;
  font-weight: 600;
  padding: 10px 10px;
  border-radius: 8px;
  display:inline-flex;
  align-items:center;
  line-height: 1.2;
}

.dw-link:hover{
  background: rgba(37,99,235,.08);
}

.dw-item{
  position: relative;
}

.dw-has-sub > .dw-link::after{
  content:"▾";
  font-size: 12px;
  margin-left: 6px;
  opacity:.7;
}

/* =================================
   DROPDOWN (Fixed hover stability)
================================= */

.dw-sub{
  display:none;
  position:absolute;
  top: 100%;               /* No hover gap */
  left: 0;
  min-width: 260px;

  background: var(--dw-dropdown-bg);
  border: 1px solid var(--dw-border);
  border-radius: var(--dw-radius);
  box-shadow: var(--dw-shadow);

  padding: 10px;
  margin-top: 10px;
  z-index: 10000;
}

.dw-sub--wide{
  min-width: 340px;
}

.dw-sub a{
  display:block;
  padding: 10px;
  border-radius: 8px;
  color: var(--dw-text) !important;
  text-decoration:none !important;
  font-weight: 500;
  font-size: 14px;
}

.dw-sub a:hover{
  background: rgba(37,99,235,.08);
}

.dw-sub-sep{
  height:1px;
  background: rgba(15,23,42,.08);
  margin: 8px 4px;
}

.dw-sub-cta{
  background: var(--dw-accent);
  color: #fff !important;
  text-align:center;
  font-weight: 700;
}

.dw-sub-cta:hover{
  background: var(--dw-accent-hover) !important;
}

.dw-actions{
  display:flex;
  align-items:center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(15,23,42,.10);
}


.dw-sub a.dw-sub-cta{
  background: var(--dw-accent);
  color: #ffffff !important;
  text-align: center;
  font-weight: 700;
}


.dw-sub a.dw-sub-cta:hover{
  background: var(--dw-accent-hover) !important;
  color: #ffffff !important;
}

/* Desktop dropdown open */
@media (min-width: 901px){
  .dw-has-sub:hover > .dw-sub{
    display:block;
  }

  .dw-has-sub:focus-within > .dw-sub{
    display:block;
  }

  /* Hover bridge */
  .dw-has-sub::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:100%;
    height:12px;
  }
}

/* =================================
   MOBILE
================================= */

@media (max-width: 900px){

  .dw-container{
    align-items:center;
  }

  .dw-brand{
    padding: 12px 16px;
    border-radius: 0;   /* Keep square */
  }

  .dw-burger{
    display:block;
    width: 44px;
    height: 44px;
    border: 1px solid var(--dw-border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
  }

  .dw-burger span{
    display:block;
    height:2px;
    background: var(--dw-text);
    margin: 6px 0;
    border-radius: 2px;
  }

  .dw-nav{
    position:absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display:none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--dw-border);
    border-radius: var(--dw-radius);
    padding: 10px;
    box-shadow: var(--dw-shadow);
    z-index: 10000;
  }

  .dw-nav.dw-is-open{
    display:flex;
  }

  .dw-item{
    width:100%;
  }

  .dw-link{
    width:100%;
    justify-content: space-between;
  }

  .dw-sub{
    position: static;
    display:none;
    box-shadow:none;
    border:none;
    padding: 0 0 6px 0;
    margin: 0 0 6px 0;
  }

  .dw-sub.dw-is-open{
    display:block;
  }

  .dw-actions{
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(15,23,42,.10);
    padding-top: 6px;
  }
}

