:root{
  --poppins:"Poppins", sans-serif;
  --Fraunces:"Fraunces", serif;
  --Roboto: "Roboto", sans-serif;
}


*{
    margin:0;
    padding:0;
    box-sizing: border-box;
    font-family: var(--poppins);
}



/* Headings */
h1, h2 {
    font-family: var(--poppins);
    font-weight: 700;
}

h3, h4 {
    font-family: var(--poppins);
    font-weight: 600;
}

h5, h6 {
    font-family: var(--poppins);
    font-weight: 500;
}

/* Paragraphs and Links */
p, a, li, label, span {
    font-family: var(--poppins);
    font-weight: 400;
}


/* Buttons and Navigation */
button, nav {
    font-family:var(--poppins);
    font-weight: 500;
}


/*  === Coilors ==== */
:root{
    --body-color:#E4E9E7;
    --nav-colr: #4070F4;
    --search-colr: #4070F4;
    --side-nav: #010718;
    --text-color: #FFF;
    --search-bar: #F2F2F2;
    --search-text: #010718;
    --max-width:1800px;
}

/* === Color Palette === */
:root {
    --body-color: #FAF7F2;
    --nav-colr: #F3EADF;
    --search-colr: #C7A486;
    --side-nav: #E0CBB6;
    --text-color: #2B1B13;
    --search-bar: #FFFFFF;
    --search-text: #4E3323;
    --border-color: #E0CBB680;
    --max-width: 1800px;
}


:root{--header-height:110px;}

@media (max-width: 1000px) {
  :root{--header-height:70px;}
}




html {
    min-height: 100%;
}



body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--body-color);
    padding-top: var(--header-height);
}


.page-content {
    flex: 1;
    /* padding-top: 30px; */
    width: 100%;
}

body.dark{
    --body-color:#18191A;
    --nav-colr: #242526;
    --side-nav: #1e1e1e;
    --text-color: #CCC;
    --search-colr: #CCC;
    --search-text: #CCC;
    --search-bar: #242526;
    --border-color:rgba(255, 255, 255, 0.05);
    --max-width:1800px;
}



nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--nav-colr);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}




nav .nav-bar {
  position: relative;
  height: 70px;
  max-width: var(--max-width);
  width: 100%;
  /* background-color: var(--nav-colr); */
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .nav-bar .sidebarOpen{
  color: var(--text-color);
  font-size: 25px;
  padding: 5px;
  cursor: pointer;
  display: none;
}

nav .nav-bar .logo a {
  font-size: 25px;
  font-weight:500;
  color: var(--text-color);
  text-decoration: none;
}


.navLogo a ,.logo a {
    display: flex;
    align-items: center;
}

.navLogo img ,.logo img {
    display: block;
    max-width: 180px;
    height: 50px;
    width: auto;
    object-fit: contain;
}

.navLogo img, .logo img {
    filter: brightness(0) saturate(100%) invert(5%);
}
body.dark .navLogo img, body.dark .logo img {
    filter: brightness(0) saturate(100%) invert(95%);
}


.menu .logo-toggle{
    display: none;
  }

.nav-bar .nav-links {
  display: flex;
  align-items: center;
}

.nav-bar .nav-links li {
  margin: 0 5px;
  list-style: none;
}

.nav-links li a {
  position: relative;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-color);
  text-decoration: none;
  padding: 10px;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-links li:hover a::before{
  opacity: 1;
  transform: scaleX(1);
}

.nav-bar .darkLight-searchBox{
  display: flex;
  align-items: center;
}

.darkLight-searchBox .dark-light, 
.darkLight-searchBox .searchToggle{
 height:40px;
 width:40px;
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 0 5px;
} 

.dark-light i, 
.searchToggle i {
  position: absolute;
  color: var(--text-color);
  font-size: 22px;
  cursor: pointer ;
  transition: all 0.3s ease;
}

.dark-light i.sun {
  opacity: 0;
  pointer-events: none;
}

.dark-light.active i.sun {
  opacity: 1;
  pointer-events: auto;
}

.dark-light.active i.moon {
  opacity: 0;
  pointer-events: none;
}

.searchToggle i.cancel{
  opacity: 0;
  pointer-events: none;
}

.searchToggle.active i.cancel{
  opacity: 1;
  pointer-events: auto;
}

.searchToggle.active i.search {
  opacity: 0;
  pointer-events: none;
} 

.searchBox .search-field{
  position: absolute;
  bottom: -85px;
  right: 35px;
  height: 50px;
  width: 300px;
  display: flex;
  align-items: center;
  background-color: var(--nav-colr);
  padding: 3px;
  border-radius: 6px;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.searchToggle.active ~ .search-field{
  bottom: -65px;
  opacity: 1;
  pointer-events: auto;
}

.search-field::before{
  content: '';
  position: absolute;
  right: 14px;
  top: -4px;
  height: 12px;
  width: 12px;
  background-color: var(--nav-colr);
  transform: rotate(-45deg);
  z-index: -1;
}

.search-field input{
  height:100%;
  width:100%;
  padding: 0 45px 0 15px;
  outline: none;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--search-text);
  background-color: var(--search-bar);
}

.search-field i{
  position: absolute;
  color: var(--search-colr);
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}

/* @media(max-width: 790px){ */
@media(max-width: 1000px){
  nav .nav-bar .sidebarOpen{
  display: block;
  }

  .menu{
    position: fixed;
    height: 100%;
    width:320px;
    left:-100%;
    top:0;
    background-color: var(--side-nav);
    z-index: 100;
    transition: all 0.4s ease;
  }

  nav.active .menu{
    left:-0%;
  }

  nav.active .nav-bar .navLogo a {
    opacity: 0;
    transition: all 0.3s ease;
 
  }

  .menu .logo-toggle{
    display: block;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
  }

  .logo-toggle .sidebarClose{
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
  }

  .nav-bar .nav-links{
    flex-direction: column;
    padding-top: 60px;
  }

  .nav-links li a {
    display: block;
    margin-top: 20px;
  }
}

/* submenu */

/* ========================================
   SUBMENU & NESTED MENU
======================================== */

/* Common dropdown settings */
.nav-links li {
    position: relative;
}

.sub-menu,
.nested-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: var(--nav-colr);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease,
                visibility 0.3s ease;
    z-index: 200;
}

/* Dropdown links */
.sub-menu li,
.nested-menu li {
    width: 100%;
    margin: 0;
}

.sub-menu li > a,
.nested-menu li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    white-space: nowrap;
}

/* Remove circular hover dots inside dropdowns */
.sub-menu a::before,
.nested-menu a::before {
    display: none;
}

/* First submenu: open downward on desktop */
.dropdown:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(25px);
}

/* Nested submenu: open to the right on desktop */
.nested-menu {
    top: 0;
    left: 100%;
    transform: translateX(10px);
}

.nested-dropdown:hover > .nested-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0px);
}


/* Dropdown hover background */
.sub-menu li:hover > a,
.nested-menu li:hover > a {
    /* background: rgba(0, 0, 0, 0.1); */
    background: var(--side-nav);
    border-radius: 3px;
}


/* Align dropdown arrows to the right */
.dropdown > a,
.nested-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Keep arrow centered vertically */
.dropdown > a i,
.nested-dropdown > a i {
    flex-shrink: 0;
    margin-left: 6px;
    line-height: 1;
}


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

/* @media (max-width: 790px) { */
@media (max-width: 1000px) {

    .top-bar {
        display: none;
    }


    /* Keep the sidebar within the screen */
    .menu {
        width: min(320px, 100vw);
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Prevent width overflow */
    .menu,
    .menu * {
        box-sizing: border-box;
    }

    /* Main menu layout */
    .nav-bar .nav-links {
        align-items: stretch;
        width: 100%;
        padding-top: 5px;
    }

    .nav-links > li {
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    .nav-links > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        /* margin-top: 10px; */
        margin-top: 5px;
        /* padding: 12px 20px; */
        padding: 10px 20px;
    }

    /* Remove hover dots on mobile */
    .nav-links a::before {
        display: none !important;
    }

    /* Mobile dropdowns remain inside the sidebar */
    .sub-menu,
    .nested-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.06);
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    /* First submenu: open downward on desktop */
    .dropdown:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    /* transform: translateY(25px); */
    transform: translateY(0);
     }

    /* Open submenu on click via JavaScript */
    .dropdown.open > .sub-menu {
        display: block;
    }

    .nested-dropdown.open > .nested-menu {
        display: block;
    }

    /* First-level submenu indentation */
    .sub-menu li > a {
        width: 100%;
        min-width: 0;
        /* padding: 14px 30px; */
        padding: 10px 30px;
        margin: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Nested submenu indentation */
    .nested-menu li > a {
        display: block;
        width: 100%;
        min-width: 0;
        /* padding: 14px 50px; */
        padding: 10px 50px;
        margin: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Highlight the open nested parent */
    .nested-dropdown.open > a {
        background: rgba(255, 255, 255, 0.12);
    }
}




/* submenu */


/*==================================================
  TOP BAR
==================================================*/

/* TOP BAR */
.top-bar {
  width: 100%;
  background: var(--nav-colr);
  color: var(--text-color);
  font-size: 13px;
}


.top-bar-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 30px;
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border-color);
}

.top-bar-left span {
  display: block;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-icons a {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.3s;
}

.social-icons a:hover {
  opacity: 0.5;
  /* color: rgba(255, 255, 255, 0.12); */
  color: var(--side-nav);
}

.top-dropdowns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-dropdowns select {
  border: none;
  outline: none;
  background: var(--nav-colr);
  color: var(--text-color);
  font-size: 13px;
  cursor: pointer;
}