/* =========================
   Base reset
========================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   Design tokens
========================= */
:root {
  /* Fonts */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors */
  --color-brand-primary: /*rgb(183, 138, 255);*/#20C0D8;
  --color-brand-primary-hover: /*rgb(188, 93, 207);*/ #0090AF;

  --color-neutral-light: #e5e5e5;
  --color-neutral-light-hover: #b1b1b1;

  --color-text-primary: #030404;
  --color-text-muted: #666666;

  /* Links */
  --color-link: var(--color-brand-primary); 

  /* Buttons */
  --button-radius: 50px;
  --button-font-size: 18px;
  --button-padding-y: 10px;
  --button-padding-x: 40px;
  --button-min-height: 60px;
  --button-line-height: 40px;
  --button-transition: 0.3s ease;

  --button-primary-bg: var(--color-brand-primary);
  --button-primary-bg-hover: var(--color-brand-primary-hover);
  --button-primary-text: var(--color-neutral-light);

  --button-secondary-bg: var(--color-neutral-light);
  --button-secondary-bg-hover: var(--color-neutral-light-hover);
  --button-secondary-text: var(--color-text-primary);

  /* Layout */
  --max-text-width: 720px;
  --max-width-container: 1240px;
}

/* =========================
   Global elements
========================= */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--button-transition);
}

a:hover{
  color: var(--color-brand-primary-hover);
}

button,
input,
textarea,
select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* =========================
   Typography
========================= */
.text-content {
  max-width: var(--max-text-width);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.3px;
}

h1 {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  font-size: 46px;
  font-weight: 600;
  line-height: 1.25;
}

h3 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.35;
}

h4 {
  font-size: 26px;
  font-weight: 500;
}

p {
  margin: 0 0 19px 0;
  color: var(--color-text-muted);
  font-size: 16px;
}

strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

a {
  color: var(--color-link);
  font-weight: 500;
}

a:hover {
  text-decoration: none;
}

/* =========================
   Lists
========================= */
ul,
ol {
  list-style: none;
  margin: 0 0 19px 19px;
  padding: 0;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

ul li {
  position: relative;
  margin-left: 25px;
}

ul li::before {
  content: "•";
  display: flex;
  color: var(--color-brand-primary);
  font-size: 30px;
  line-height: 0.1;
  position: absolute;
  top: 9px;
  left: -25px;
}

/* =========================
   Buttons
========================= */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--button-radius);
  font-size: var(--button-font-size);
  cursor: pointer;
  transition: all var(--button-transition);
  min-height: var(--button-min-height);
  line-height: var(--button-line-height);
}

/* Primary */
.btn-primary {
  color: var(--button-primary-text);
  background-color: var(--button-primary-bg);
}

.btn-primary:hover {
  background-color: var(--button-primary-bg-hover);
  color: var(--button-primary-text);
}

/* Secondary */
.btn-secondary {
  color: var(--button-secondary-text);
  background-color: var(--button-secondary-bg);
}

.btn-secondary:hover {
  background-color: var(--button-primary-bg-hover);
  color: var(--color-neutral-light);
}

/* =========================
   Header
========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transition: background-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.site-header--scrolled {
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.site-header__inner {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
}

.site-header__brand .custom-logo-link,
.site-header__brand .custom-logo {
  display: inline-flex;
  align-items: center;
}

.site-header__brand .custom-logo,
.site-header__brand svg {
  height: 100px;
  width: 250px;
  transition: all var(--button-transition);
}

.site-header--scrolled img.custom-logo,
.site-header--scrolled svg {
  height: 60px;
}

.site-header__title {
  font-weight: 700;
  text-decoration: none;
  line-height: 0;
}

.site-header__actions {
  display: flex;
  align-items: center;
}

/* Hide actions on mobile by default - they will be moved to nav */
@media (max-width: 768px) {
  .site-header__actions {
    display: none;
  }
}

.logged-in .site-header {
  margin-top: 32px;
}

/* =========================
   Header Navigation
========================= */
.site-header__nav {
  margin-left: auto;
  margin-right: auto;
}

.site-header__menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__menu li {
  margin: 0;
  padding: 0;
}

.other-header.site-header {
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.other-header .site-header__brand svg {
  height: 70px;
}

.site-header__menu li::before {
  display: none;
}

.site-header__menu a {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 500;
  color: var(--button-primary-text);
  text-decoration: none;
  transition: color var(--button-transition);
  position: relative;
}

.site-header__menu a:hover {
  color: var(--color-brand-primary);
}

.site-header__menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-brand-primary);
  transform: scaleX(0);
  transition: transform var(--button-transition);
}

.site-header__menu a:hover::after,
.site-header__menu .active a::after {
  transform: scaleX(1);
}

/* Mobile menu action button */
.site-header__mobile-action {
  display: none;
}

/* Mobile menu toggle button */
.site-header__menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

.site-header__menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--color-neutral-light);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.site-header__menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.site-header__menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.site-header__menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive styles for mobile menu */
@media (max-width: 768px) {
  .site-header__inner {
    display: flex;
    flex-wrap: wrap;
    position: relative;
  }

  .site-header__brand {
    order: 1;
    flex: 0 0 auto;
  }

  .site-header__menu-toggle {
    order: 2;
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .site-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    z-index: 89;
    margin: 0;
    border-top: 1px solid rgb(255 255 255);
  }

  .site-header--scrolled .site-header__nav {
    background: rgba(20, 20, 20, 0.92);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  }

  .site-header__nav.active {
    max-height: 600px;
    padding: 24px 20px;
    border-bottom: 1px solid rgb(255 255 255);
  }

  .site-header__menu {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .site-header__menu li {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .site-header__menu a {
    font-size: 25px;
    display: block;
    color: var(--button-primary-text);
    position: relative;
  }

  .site-header__menu a::after {
    bottom: 8px;
    /*width: 50px;
    left: 46%;*/
    transform: translateX(-50%) scaleX(0);
  }

  /*.site-header__menu a:hover::after,*/
  .site-header__menu .active a::after {
    transform: translateX(-50%) scaleX(1);
  }

  /* Mobile action button in navigation */
  .site-header__mobile-action {
    display: flex;
    justify-content: center;
    margin-top: 15px;
  }

  .site-header__mobile-action .site-header__login {
    min-width: 200px;
    text-align: center;
  }
}

/* Adjust header spacing on mobile */
@media (max-width: 576px) {
  .site-header__inner {
    padding: 10px 16px;
  }

  .site-header__brand .custom-logo,
  .site-header__brand svg {
    height: 50px;
    width: 130px;
  }

  .site-header__login {
    --button-padding-x: 16px;
    --button-padding-y: 6px;
    --button-font-size: 14px;
    --button-min-height: 36px;
    --button-line-height: 24px;
  }

  .site-header__nav.active {
    padding: 20px 16px;
  }

  .site-header__menu a {
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .site-header__login {
    --button-padding-x: 12px;
    --button-font-size: 13px;
  }
  
  .site-header__brand .custom-logo,
  .site-header__brand svg {
    height: 40px;
    width: 100px;
  }

  .site-header__menu a {
    font-size: 18px;
  }
}

/* Active menu item styles */
.site-header__menu .active-menu-item a {
  color: var(--color-brand-primary);
}

.site-header__menu .active-menu-item a::after {
  transform: scaleX(1);
}

@media (min-width: 769px) and (max-width: 838px) { 
  .site-header__menu a {
    font-size: 18px;
  }
  .site-header__menu{
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .site-header__menu .active-menu-item a {
    color: var(--color-brand-primary);
    font-weight: 600;
  }
  
  .site-header__menu .cactive-menu-item a::after {
    transform: translateX(-50%) scaleX(1);
  }
}


/* User Dropdown Styles */
.site-header__user-dropdown {
    position: relative;
    margin-left: 16px;
}

.site-header__user-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 40px;
    transition: background-color var(--button-transition);
}

.site-header__user-dropdown:hover .site-header__user-button .dropdown-arrow {
    transform: rotate(
180deg);
}

/* .site-header__user-button:hover {
    background: rgba(255, 255, 255, 0.1);
} */

.site-header__user-button .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.site-header__user-button .user-name {
    color: var(--button-primary-text);
    font-size: 16px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-header__user-button .dropdown-arrow {
    color: var(--button-primary-text);
    transition: transform 0.3s ease;
}

.site-header__user-button[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.site-header__dropdown-menu {
    position: absolute;
    top: calc(100% + 20px);
    right: -40;
    min-width: 130px;
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.site-header__user-dropdown:hover .site-header__dropdown-menu,
.site-header__user-button[aria-expanded="true"] + .site-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header__dropdown-menu .dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--button-primary-text);
    text-decoration: none;
    font-size: 18px;
    transition: background-color var(--button-transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header__dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

/* .site-header__dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-brand-primary-hover);
} */

/* Mobile styles for user menu items */
@media (max-width: 768px) {
  .other-header.site-header .site-header__nav.active{
    background-color: rgba(20, 20, 20, 0.92);
  }
    .site-header__user-dropdown {
        margin-left: 0;
        width: 100%;
    }

    .site-header__user-button {
        display: none; /* Hide the button on mobile */
    }

    .site-header__dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        min-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .site-header__dropdown-menu .dropdown-item {
        padding: 12px 20px;
        /* background: rgba(255, 255, 255, 0.05); */
        border-radius: 40px;
        border-bottom: none;
        text-align: center;
        font-size: 20px;
    }

}

/* Very small screens */
@media (max-width: 576px) {
    .site-header__user-button .user-name {
        max-width: 80px;
        font-size: 14px;
    }
    
    .site-header__user-button {
        padding: 2px 4px;
    }
}

.logged-in .other-header.site-header,
.custom-member-role .site-header{
    margin-top: 0;
}

/* =========================
   Footer
========================= */
.site-footer{
  background-color: #fff;
  padding: 32px 0;
  border-top: 1px solid var(--color-neutral-light);
}

.site-footer__inner {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 0 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer__address p,
.site-footer__copyright p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-primary);
  line-height: 1.6;
}

.site-footer__address {
  text-align: center;
}

.site-footer__brand {
  display: flex;
  align-items: center;
}

.site-footer__brand svg path {
    fill: var(--color-brand-primary);
}

.site-footer__brand a svg {
    height: 100%;
    width: 210px;
}

.site-footer__brand .custom-logo-link {
  display: inline-block;
}

.site-footer__brand .custom-logo {
  max-height: 50px;
  width: auto;
}

.site-footer__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__title:hover {
  color: var(--color-brand-primary);
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .site-footer__address { order: 2; }
  .site-footer__copyright { order: 3; }
  .site-footer__brand { order: 1; }

  .site-footer__address p,
  .site-footer__copyright p {
    font-size: 13px;
  }

  .site-footer__title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
  body { font-size: 15px; }

}