/* Base styles - Common variables and styles used across all pages */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-card: #ffffff;
  --color-text-pr:#f0f3f8;
  --color-text: #0f0f0f;
  --color-text-muted: rgba(0, 0, 0, 0.78);
  --color-primary: #574c99;
  --color-secondary: #9a79b3;
  --color-accent: #3eb696;
  --color-border: rgba(0, 0, 0, 0.10);
  --color-border-strong: rgba(0, 0, 0, 0.20);
  --color-footer: #0f0f14;
  --color-hero-circle: rgba(154, 121, 179, 0.35);
  --color-chip-bg: rgba(87, 76, 153, 0.10);
  --color-chip-border: rgba(87, 76, 153, 0.18);
  --color-partners-gradient-start: var(--color-bg);
  --color-partners-gradient-end: var(--color-secondary);
}

[data-theme="dark"] {
  --color-bg: #0f1116;
  --color-surface: #12141c;
  --color-card: #1a1d26;
  --color-text-pr:#f0f3f8;
  --color-text: #f0f3f8;
  --color-text-muted: rgba(240, 243, 248, 0.78);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-border-strong: rgba(255, 255, 255, 0.2);
  --color-footer: #0c0e14;
  --color-hero-circle: rgba(154, 121, 179, 0.18);
  --color-chip-bg: rgba(154, 121, 179, 0.15);
  --color-chip-border: rgba(154, 121, 179, 0.28);
  --color-partners-gradient-start: #12141c;
  --color-partners-gradient-end: #574c99;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background-color .25s ease, color .25s ease;
}

/* Dark mode overrides for common Tailwind utilities used in templates */
[data-theme="dark"] body,
[data-theme="dark"] .bg-white {
  background-color: var(--color-bg) !important;
}
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700 {
  color: var(--color-text) !important;
}
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500 {
  color: var(--color-text-muted) !important;
}
[data-theme="dark"] .border-gray-300,
[data-theme="dark"] .border-gray-200 {
  border-color: var(--color-border) !important;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--color-text-muted) !important;
}

/* Header Styles */
.header {
  position: absolute;
  width: 100%;
  height: 100px;
  left: 0;
  top: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 98px 0 98px;
  z-index: 1000;
}

.hamburger-btn {
  display: none;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-secondary);
  border-radius: 10px;
  background: var(--color-surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.hamburger-box {
  display: inline-block;
  width: 24px;
  height: 16px;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  content: "";
  transition: transform .25s ease, opacity .25s ease;
  border-radius: 2px;
}

.hamburger-inner {
  top: 7px;
}

.hamburger-inner::before {
  top: -7px;
}

.hamburger-inner::after {
  top: 7px;
}

.hamburger-btn.is-active .hamburger-inner {
  background: transparent;
}

.hamburger-btn.is-active .hamburger-inner::before {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-inner::after {
  transform: translateY(-7px) rotate(-45deg);
}

.logo {
  width: 119.1px;
  height: 42px;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-dark-fallback {
  filter: brightness(0) invert(1) contrast(1.05) saturate(1.2);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  position: absolute;
  left: 380px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-link {
  font-family: 'Poppins', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  text-transform: capitalize;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

.auth-buttons {
  display: flex;
  gap: 10px;
  position: absolute;
  right: 100px;
  top: 50%;
  transform: translateY(-50%);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.theme-toggle:hover {
  background: rgba(87, 76, 153, 0.10);
  transform: translateY(-1px);
}

.theme-toggle i {
  font-size: 18px;
}

.mobile-theme {
  padding: 8px 0;
}

.mobile-theme .theme-toggle {
  width: 25%;
  justify-content: flex-start;
  padding-left: 12px;
}

.mobile-theme .theme-toggle i {
  margin-right: 6px;
}

/* Inner span for descriptive text inside the theme toggle */
.theme-toggle .theme-toggle-text {
  margin-left: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

.mobile-menu {
  display: none;
  position: fixed;
  left: 0;
  top: 100px;
  width: 100%;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 14px 18px 18px 18px;
  z-index: 1100;
  pointer-events: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 6px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu a:hover {
  background: rgba(87, 76, 153, 0.10);
  color: var(--color-primary);
}

.mobile-auth {
  display: flex;
  gap: 10px;
  padding-top: 8px;
}

.btn-signup {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  width: 97px;
  height: 50px;
  background: var(--color-primary);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  text-transform: capitalize;
  color: #FFFFFF;
}

.btn-signup:hover {
  background: #4a4288;
}

.btn-login {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  width: 90px;
  height: 50px;
  background: transparent;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  text-transform: capitalize;
  color: var(--color-primary);
}

.btn-login:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

.main-content {
  margin-top: 100px;
  min-height: calc(100vh - 100px);
}

/* Medium-width (narrow desktop) adjustments to avoid nav overlap between 1465px and mobile cutoff */
@media (max-width: 1465px) and (min-width: 1266px) {
  .header {
    /* padding: 0 48px; */
    gap: 40px; /* space between groups */
  }
  .logo {
    flex-shrink: 0;
  }
  .nav-menu {
    position: static; /* drop absolute positioning */
    transform: none;
    left: auto;
    top: auto;
    flex: 1; /* allow to shrink/grow */
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* prevent overflow if still tight */
  }
  .nav-link {
    font-size: 18px;
    line-height: 28px;
  }
  .auth-buttons {
    position: static; /* drop absolute positioning */
    transform: none;
    right: auto;
    top: auto;
    gap: 8px;
  }
  .btn-signup, .btn-login {
    height: 46px;
    font-size: 18px;
    line-height: 26px;
    padding: 8px 14px;
    width: auto; /* allow natural width */
  }
  .theme-toggle {
    width: 42px;
    height: 42px;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 1265px) {
  .nav-menu {
    display: none;
  }
  
  .auth-buttons {
    display: none;
  }
  
  .hamburger-btn {
    display: inline-flex;
  }
  
  .header {
    padding: 0 18px;
    position: fixed;
    top: 0;
  }
  
  .main-content {
    margin-top: 100px;
  }
}

/* Sticky header variant for login/register/admin pages */
.header.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Text decoration removal for auth buttons */
.auth-buttons a {
  text-decoration: none;
}

/* Footer spacing for form pages */
.footer-section.form-page-footer {
  margin-top: 60px;
}

@media (max-width: 680px) {
  /* Mobile specific adjustments */
}
