/* =================================================
   DANIELIM.CO - GLOBAL NAV & CONSISTENCY OVERRIDES
   ================================================= */

/* FONTS
   ------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Roboto+Slab:wght@400;700&family=Source+Sans+Pro:wght@400;600;700;900&display=swap');


/* BASE & SCROLLBAR
   ------------------------------------------------- */
html, body {
  height: 100%;
  overflow: hidden;
}

#wrapper {
  height: calc(100% - 58px);
  margin-top: 58px;
  overflow-y: auto;
  display: block;
  scrollbar-color: #888888 #ffffff;
  scrollbar-width: auto;
  padding-bottom: 2em;
}

#wrapper::-webkit-scrollbar {
  width: 18px;
}

#wrapper::-webkit-scrollbar-track {
  background: #ffffff;
}

#wrapper::-webkit-scrollbar-thumb {
  background-color: #888888;
  border-radius: 10px;
  border: 4px solid #ffffff;
}

#wrapper::-webkit-scrollbar-button:single-button {
  background-color: #ffffff;
  display: block;
  height: 25px;
  background-repeat: no-repeat;
  background-size: 40%;
  background-position: center;
}

#wrapper::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23888888'><polygon points='50,0 0,100 100,100'/></svg>");
}

#wrapper::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23888888'><polygon points='50,100 0,0 100,0'/></svg>");
}

/* Hide legacy sidebar from HTML5UP template */
#sidebar {
  display: none !important;
}


/* TOP NAV BAR
   ------------------------------------------------- */
#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 58px;
  background: #3c4049;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1% 0 1.5%;
  z-index: 10000;
}

.nav-left-group {
  display: flex;
  align-items: center;
}

#top-nav .nav-title {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 400 !important;
  font-size: 17px !important;
  letter-spacing: 0.02em;
  margin-right: 1.2em;
}

#top-nav .nav-menu {
  display: flex;
  flex: 0 1 auto;
}

#top-nav .nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
}

#top-nav .nav-menu li {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0;
  padding: 0;
}

#top-nav .nav-menu li::before,
#top-nav .nav-menu li::after {
  content: none !important;
  display: none !important;
}

#top-nav .nav-menu li:last-child {
  border-right: none;
}

#top-nav .nav-menu a {
  color: #fff;
  text-decoration: none !important;
  border: none !important;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 900 !important;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.6em 1.2em;
  display: block;
  transition: background 0.2s;
}

#top-nav .nav-menu a:hover,
#top-nav .nav-menu a.active {
  background: #626773 !important;
  color: #fff !important;
}

#top-nav .nav-contact {
  height: 100%;
  display: flex;
  align-items: center;
}

#top-nav .nav-contact a {
  color: #fff;
  background: #f56a6a;
  text-decoration: none !important;
  border: none !important;
  padding: 0 2.5em;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70%;
}

#top-nav .nav-contact a:hover {
  background: #d95c4b;
}

#top-nav .nav-contact a.active {
  background: #d95c4b;
  outline: 2px solid rgba(255,255,255,0.3);
  outline-offset: -2px;
}


/* SITE HEADER (inner branding bar)
   ------------------------------------------------- */
#header {
  display: flex !important;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4em 0 0.8em 0;
  border-bottom: solid 3px #f56a6a;
  margin-bottom: 5px;
}

#header .logo {
  font-family: "Roboto Slab", serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #999;
  cursor: default;
  user-select: none;
  display: inline-flex !important;
  align-items: baseline;
  width: max-content !important;
}

#header .logo strong {
  font-weight: 600;
  margin-right: 0.25em;
  display: inline !important;
}

#header .icons {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

#header .icons li {
  display: inline-block;
  margin-left: 1.5em;
}

#header .icons a {
  border-bottom: none !important;
  color: #bbb;
  font-size: 0.85rem;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.4em 0;
}

header.major > :last-child {
  border-bottom: solid 3px #f56a6a;
  display: inline-block;
  margin: 0 0 0.4em 0;
  padding: 0 0.75em 0 0;
}

header.major {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem !important;
}

header.major h2 {
  margin-bottom: 0;
  font-size: 1.6rem !important;
}

header.major.section-title {
  margin-bottom: 0.5rem !important;
}

header.major.section-title h2 {
  margin-bottom: 0;
  font-size: 1.6rem !important;
}


/* LAYOUT
   ------------------------------------------------- */
#main > .inner {
  padding-top: 0.5em !important;
  padding-bottom: 4em !important;
  padding-left: 10% !important;
  padding-right: 10% !important;
  margin: 0 auto;
  max-width: 1800px;
  width: 100%;
}

section {
  margin-bottom: 0 !important;
  padding-bottom: 0.75rem !important;
  padding-top: 1.25rem !important;
}

#main > .inner > section {
  padding-top: 1.25rem !important;
  padding-bottom: 0.75rem !important;
}

hr {
  border: 0;
  border-bottom: solid 1px rgba(210, 215, 217, 0.75);
  margin: 1px 0;
}

hr.major {
  margin: 1px 0;
}

.box {
  padding: 1.25em;
}


/* TYPOGRAPHY
   ------------------------------------------------- */
body, input, select, textarea {
  color: #72777c;
  font-family: "Open Sans", sans-serif;
  font-size: 16pt;
  font-weight: 400;
  line-height: 1.65;
}

@media screen and (max-width: 1680px) {
  body, input, select, textarea {
    font-size: 14pt;
  }
}

@media screen and (max-width: 1280px) {
  body, input, select, textarea {
    font-size: 13pt;
  }
}

@media screen and (max-width: 360px) {
  body, input, select, textarea {
    font-size: 12pt;
  }
}

h1 {
  font-size: 4.5em;
  margin: 0 0 0.5em 0;
  line-height: 1.3;
}

h2 { font-size: 2.5em; }
h3 {
  font-size: 1.3rem !important;
}
h4 { font-size: 1.5em; }
h5 { font-size: 1.2em; }
h6 { font-size: 1em; }

h1.page-title {
  margin-top: 0 !important;
  margin-bottom: 0.2rem !important;
}

.page-title {
  font-family: "Roboto Slab", serif;
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  color: #3d4449;
  margin-bottom: 0.2rem;
  padding-top: .2em !important;
}

.preview-title {
  font-size: 1.4rem !important;
  font-weight: 700;
  color: #3d4449;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.project-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 8px;
  margin-bottom: 0.75em;
}

ul, ol {
  margin-bottom: 0.6em;
  margin-top: 0.25em;
}

.quota-line {
  margin-top: 0.2em !important;
  margin-bottom: 0.2em !important;
}


/* PAGE-SPECIFIC: HERO (index.html)
   ------------------------------------------------- */
#hero {
  padding-top: 1em !important;
}

#hero .hero-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#hero .hero-text {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#hero .page-title {
  margin-top: 0 !important;
  font-size: 2.6rem !important;
}


/* PAGE-SPECIFIC: ROE DIAGRAMS (roe-compliance-reporting.html)
   ------------------------------------------------- */
.diagram-row {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.diagram-text {
  flex: 1;
}

.diagram-image {
  flex: 1;
}

.diagram-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.diagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 10px;
}

.diagram-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.diagram-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 16px;
}

.diagram-card h3 {
  margin-bottom: 8px;
}

.diagram-card p {
  font-size: 0.9rem;
  line-height: 1.4;
}

.diagram-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  transition: all 0.25s ease;
}

.workflow-intro {
  margin-top: 10px;
  margin-bottom: 30px;
  max-width: 700px;
}


/* PAGE-SPECIFIC: PROJECT SCREENSHOTS
   ------------------------------------------------- */
.screenshot-block {
  margin: 1.5rem 0;
}

.screenshot-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 0.5rem;
}

.screenshot-block img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border: 1px solid #e5e5e5;
  display: block;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.screenshot-grid .screenshot-block {
  margin: 0;
}

@media (max-width: 980px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}


/* PAGE-SPECIFIC: ARCHITECTURE BOX (project pages)
   ------------------------------------------------- */
.arch-box {
  background: #f4f4f4;
  border-left: 3px solid #f56a6a;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  color: #444;
  line-height: 1.7;
  white-space: pre-line;
}


/* PAGE-SPECIFIC: PROJECT IMPACT CALLOUT (project pages)
   ------------------------------------------------- */
.project-impact {
  background: #fff8f8;
  border-left: 3px solid #f56a6a;
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  margin: 0.75rem 0 1.25rem 0;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.6;
}


/* RESPONSIVE
   ------------------------------------------------- */
@media (max-width: 980px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  #wrapper {
    height: auto;
    margin-top: 0;
    overflow-y: visible;
  }

  #top-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    min-height: 52px;
    padding: 0 1em;
    position: relative;
  }

  /* Hide nav links and contact by default on mobile */
  #top-nav .nav-menu {
    display: none;
    width: 100%;
    padding-bottom: 0.5em;
  }

  #top-nav .nav-contact {
    display: none;
    width: 100%;
    margin-top: 0;
    padding-bottom: 0.75em;
  }

  /* Show when open */
  #top-nav.nav-open .nav-menu {
    display: flex;
  }

  #top-nav.nav-open .nav-contact {
    display: flex;
  }

  /* Stack nav links vertically when open */
  #top-nav.nav-open .nav-menu ul {
    flex-direction: column;
    width: 100%;
  }

  #top-nav.nav-open .nav-menu li {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  #top-nav.nav-open .nav-menu li:last-child {
    border-bottom: none;
  }

  #top-nav .nav-contact a {
    width: 100%;
    height: 40px;
    padding: 0;
  }

  #header {
    flex-direction: column;
    align-items: flex-start;
  }

  #header .icons {
    margin-top: 1em;
  }

  #header .icons li {
    margin-left: 0;
    margin-right: 1.5em;
  }
}

/* HAMBURGER BUTTON */

.nav-hamburger {
  display: none;
}

@media (max-width: 980px) {
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-hamburger span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  #top-nav.nav-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  #top-nav.nav-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 768px) {

  /* Typography */
  body, input, select, textarea {
    font-size: 11pt;
  }

  .page-title {
    font-size: 1.8rem !important;
  }

  #hero .page-title {
    font-size: 1.8rem !important;
  }

  header.major h2 {
    font-size: 1.3rem !important;
  }

  header.major.section-title h2 {
    font-size: 1.3rem !important;
  }

  /* Layout padding */
  #main > .inner {
    padding-left: 5% !important;
    padding-right: 5% !important;
  }

  /* ROE diagram grid: 3-col → 1-col */
  .diagram-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Project library: toggle button visible, panels stacked */
  .library-toggle-btn {
    display: flex;
  }

  .library-container {
    flex-direction: column;
  }

  .library-left {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: none;
    overflow: visible;
  }

  .library-left.collapsed {
    display: none;
  }

  .library-right {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1em !important;
  }

}

@media (max-width: 480px) {

  /* Typography - tighten further on small phones */
  body, input, select, textarea {
    font-size: 10.5pt;
  }

  .page-title {
    font-size: 1.55rem !important;
  }

  #hero .page-title {
    font-size: 1.55rem !important;
  }

  /* Layout padding - tighter on very small screens */
  #main > .inner {
    padding-left: 4% !important;
    padding-right: 4% !important;
  }

}

/* Library toggle button - hidden on desktop, shown on mobile via 768px block above */
.library-toggle-btn {
  display: none;
  align-items: center;
  gap: 0.5em;
  background: #3c4049;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.1em;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.75rem;
  font-family: 'Source Sans Pro', sans-serif;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}

.library-toggle-btn:hover {
  background: #626773;
}

.library-toggle-btn .toggle-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.library-toggle-btn.open .toggle-arrow {
  transform: rotate(180deg);
}




/* =================================================
   ACTIVE NAV HIGHLIGHT (DANIELIM.CO STYLE)
   ================================================= */

/* Desktop: Red line on the bottom */
#top-nav .nav-menu a.active {
    background: #626773 !important; 
    color: #fff !important;
    border-bottom: 3px solid #f56a6a !important; 
    padding-bottom: calc(0.6em - 3px) !important; 
}

/* Mobile: Red line on the left for vertical lists */
@media (max-width: 980px) {
    #top-nav.nav-open .nav-menu a.active {
        border-bottom: none !important;
        border-left: 4px solid #f56a6a !important; 
        padding-bottom: 0.6em !important;
        padding-left: calc(1.2em - 4px) !important;
    }
}