/* Define your palette as variables for easy access */
:root {
  --light-primary: #f0f1f0;
  --dark-primary: #010101;
  --blue-deep: #050a30;
  --blue-vibrant: #2c8ffa;
  --green-deep: #202d10;
  --green-muted: #6e9277;
}

/* Default Light Theme */
body {
  --bg-primary: #f0f1f0;
  --bg-secondary: #ffffff;
  --text-primary: #010101;
  --border-color: #2c8ffa;
  --accent-color: #050a30;
  --accent-light: #2c8ffa;
  --nav-bg: #ffffff;
  --nav-text: #010101;
  --nav-border: #e5e7eb;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  transition: all 0.3s ease;
}

/* Dark Green Theme */
body.theme-dark-green {
  --bg-primary: #202d10;
  --bg-secondary: #2d3f15;
  --text-primary: #6e9277;
  --border-color: #6e9277;
  --accent-color: #202d10;
  --accent-light: #6e9277;
  --nav-bg: #202d10;
  --nav-text: #6e9277;
  --nav-border: #2d3f15;
}

/* Light Green Theme */
body.theme-light-green {
  --bg-primary: #6e9277;
  --bg-secondary: #8aa88f;
  --text-primary: #ffffff;
  --border-color: #202d10;
  --accent-color: #202d10;
  --accent-light: #6e9277;
  --nav-bg: #6e9277;
  --nav-text: #ffffff;
  --nav-border: #5a9264;
}

/* Navigation Bar */
.navbar {
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  width: 100%;
  overflow: visible;
}

.navbar-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
  position: relative;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--nav-text);
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.5rem;
  display: block;
}

.logo-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}

.logo-text {
  color: var(--accent-light);
  font-weight: 700;
  white-space: nowrap;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 150;
}

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background-color: var(--nav-text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex: 1;
  margin: 0;
}

.menu-item {
  position: relative;
}

.menu-link {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-link:hover {
  color: var(--accent-light);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Product Dropdown */
.dropdown-container .menu-link::after {
  content: '▼';
  font-size: 0.65rem;
  margin-left: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 50;
  margin-top: -1px;
}

.dropdown-container:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--nav-text);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--accent-light);
  color: #ffffff;
}

/* Theme Dropdown */
.theme-dropdown-container {
  position: relative;
}

.theme-dropdown-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 2px solid var(--accent-light);
  background-color: transparent;
  color: var(--nav-text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-dropdown-btn:hover {
  background-color: var(--accent-light);
  color: #ffffff;
  transform: translateY(-2px);
}

.theme-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--nav-bg);
  border: 2px solid var(--accent-light);
  border-radius: 0.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  margin-top: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
  background-color: transparent;
  color: var(--nav-text);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  border-bottom: 1px solid var(--nav-border);
}

.theme-dropdown-item:last-child {
  border-bottom: none;
}

.theme-dropdown-item:hover {
  background-color: var(--accent-light);
  color: #ffffff;
}

.theme-dropdown-item.active {
  background-color: var(--accent-light);
  color: #ffffff;
  font-weight: 700;
}

/* Clean Form Components */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: calc(100vh - 200px);
}

.form-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-card {
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 2px solid;
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.form-card header h1 {
  color: var(--text-primary);
}

.form-card header p {
  color: var(--text-primary);
  opacity: 0.7;
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  outline: none;
  transition: all 0.3s ease;
  border-color: var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.input-field::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.input-field:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(44, 143, 250, 0.2);
}

/* Primary Button */
.btn-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  background-color: var(--accent-color);
  color: #ffffff;
}

.btn-submit:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: scale(0.98);
}

/* Theme Switcher (deprecated - using dropdown instead) */

/* Footer Styling */
.form-card footer {
  color: var(--text-primary);
  opacity: 0.8;
}

.form-card footer a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: bold;
}

.form-card footer a:hover {
  text-decoration: underline;
}

/* ====================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ==================================== */

/* Tablet/Small Devices (max 768px) */
@media (max-width: 768px) {
  .navbar-container {
    padding: 1rem 1rem;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .navbar-logo {
    font-size: 1rem;
  }

  .logo-image {
    width: 32px;
    height: 32px;
  }

  .logo-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mobile Menu Button Visible */
  .mobile-menu-btn {
    display: flex;
    order: 2;
  }

  /* Theme Dropdown Next to Hamburger */
  .theme-dropdown-container {
    order: 1;
    margin-left: auto;
  }

  .theme-dropdown-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .theme-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 180px;
  }

  /* Navigation Menu Mobile */
  .navbar-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    z-index: 90;
    width: 100%;
    opacity: 0;
  }

  .navbar-menu.active {
    max-height: 600px;
    opacity: 1;
  }

  .menu-item {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--nav-border);
  }

  .menu-item:last-child {
    border-bottom: none;
  }

  .menu-link {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    display: block;
  }

  .menu-link:hover {
    background-color: rgba(0, 0, 0, 0.08);
  }

  /* Dropdown in Mobile Menu */
  .dropdown-container .menu-link::after {
    margin-left: auto;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: var(--bg-primary);
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown-container.active-dropdown .dropdown-menu {
    max-height: 300px;
    border-top: 1px solid var(--nav-border);
  }

  .dropdown-item {
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    background-color: transparent;
  }

  .dropdown-item:hover {
    background-color: var(--accent-light);
    color: #ffffff;
  }

  /* Form Responsive */
  .form-card {
    max-width: 90%;
    padding: 1.75rem;
    border-radius: 0.875rem;
  }

  .form-card header h1 {
    font-size: 1.875rem;
  }

  .input-field {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .btn-submit {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .main-content {
    padding: 1.5rem;
    min-height: calc(100vh - 150px);
  }
}

/* Mobile Devices (max 480px) */
@media (max-width: 480px) {
  .navbar-container {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .navbar-logo {
    font-size: 0.9rem;
  }

  .logo-image {
    width: 30px;
    height: 30px;
  }

  .logo-text {
    max-width: 100px;
  }

  .mobile-menu-btn {
    gap: 0.3rem;
    padding: 0.375rem;
  }

  .hamburger-line {
    width: 22px;
    height: 2px;
  }

  .theme-dropdown-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
  }

  .theme-dropdown-menu {
    min-width: 160px;
  }

  .theme-dropdown-item {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
  }

  .navbar-menu {
    padding: 0;
  }

  .menu-item {
    padding: 0;
  }

  .menu-link {
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .dropdown-item {
    padding: 0.625rem 1.75rem;
    font-size: 0.8rem;
  }

  .form-card {
    max-width: 100%;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border-width: 1.5px;
  }

  .form-card header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .form-card header p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  .form-card form {
    gap: 0.875rem;
  }

  .input-field {
    padding: 0.65rem 0.875rem;
    font-size: 16px;
    border-radius: 0.5rem;
  }

  label {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }

  .btn-submit {
    padding: 0.65rem 0.875rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
  }

  .form-card footer {
    font-size: 0.875rem;
  }

  .main-content {
    padding: 1rem;
  }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
  .navbar {
    position: sticky;
  }

  .navbar-menu.active {
    max-height: 400px;
    overflow-y: auto;
  }

  .main-content {
    min-height: auto;
    padding: 1rem;
  }

  .form-card {
    max-width: 600px;
    padding: 1.25rem;
  }

  .form-card header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
  }

  .form-card header p {
    font-size: 0.875rem;
  }
}

/* Large Devices (min 1200px) */
@media (min-width: 1200px) {
  .navbar-container {
    padding: 1.25rem 3rem;
  }

  .navbar-logo {
    font-size: 1.35rem;
  }

  .logo-image {
    width: 48px;
    height: 48px;
  }

  .logo-text {
    max-width: none;
  }

  .menu-link {
    font-size: 1rem;
    padding: 0.625rem 1rem;
  }

  .form-card {
    max-width: 32rem;
    padding: 2.5rem;
    border-radius: 1.25rem;
  }

  .form-card header h1 {
    font-size: 2.25rem;
  }

  .main-content {
    padding: 2rem;
  }
}

/* iPad and Tablet Specific (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar-container {
    padding: 1rem 2rem;
  }

  .navbar-logo {
    font-size: 1.125rem;
  }

  .logo-image {
    width: 38px;
    height: 38px;
  }

  .menu-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
  }

  .navbar-menu {
    gap: 1.25rem;
  }

  .theme-dropdown-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
  }

  .form-card {
    max-width: 500px;
    padding: 2rem;
  }

  .form-card header h1 {
    font-size: 2rem;
  }

  .input-field,
  .btn-submit {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .main-content {
    padding: 2rem 1.5rem;
  }
}

/* Portrait Tablet (max-width: 1024px and portrait) */
@media (max-width: 1024px) and (orientation: portrait) {
  .form-card {
    max-width: 85%;
  }
}
