/* COMPONENTS.CSS - Header, Menu, and Footer styles */

/* ===== HEADER STYLES ===== */
/* Brand text modern styling */
.header-brand {
  position: absolute;
  top: 8px;
  left: 14px;
  z-index: 25;
  font-family: 'OpenSans', Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  opacity: 1.0;
  background: linear-gradient(90deg,#fbfdfb 0%,#f0fbf0 30%, #f9fdf9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}

.header-brand small {
  display: block;
  font-size: 0.8rem;
  margin-left: 1px;
}

/* Make header fixed at top and ensure content spacing */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 1000;
  background: transparent; /* svg provides visual background */
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 60px;
  background: rgba(0,0,0,0.2);
  z-index: 15;
}

/* ===== MENU STYLES ===== */
.main-menu {
  position: absolute;
  top: 10px;
  right: 20px;
  font-family: 'OpenSans', Arial, sans-serif;
  z-index: 40;
}

.menu-bar {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Shared style for all top-bar buttons and links */
.main-menu button.menu-toggle,
.main-menu a.menu-toggle {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,120,52,0.72);
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 16px 8px;
  border-radius: 8px;
  letter-spacing: 0.25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px -2px rgba(0,0,0,0.22), 0 1px 3px rgba(0,0,0,0.10);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
  text-decoration: none;
}

.menu-wrapper {
  position: relative;
  display: inline-block;
}

/* Menu button that looks like a link */
.menu-link-button {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .3px;
  transition: color .2s ease;
  width: 100%;
}

.menu-link-button:hover {
  color: #e9ffe9;
}

.main-menu button.menu-toggle:hover,
.main-menu a.menu-toggle:hover { 
  background: rgba(0,135,58,0.88);
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 3px 12px -3px rgba(0,0,0,0.28), 0 1px 4px rgba(0,0,0,0.12);
  color: #ffffff;
  text-decoration: none;
}

.main-menu button.menu-toggle:active,
.main-menu a.menu-toggle:active { 
  background: rgba(0,108,46,0.85);
  box-shadow: 0 1px 4px -1px rgba(0,0,0,0.25);
  transform: none;
}

.main-menu a.menu-toggle.active {
  background: rgba(0,108,46,0.82);
  border-color: rgba(255,255,255,0.4);
}

/* Language panel aligned left (so it doesn't clip off-screen) */
.lang-panel {
  right: auto;
  left: 0;
  min-width: 110px;
}

.lang-panel .language-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

/* Dropdown content panel */
.menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  padding: 10px 16px 12px;
  background: rgba(0, 118, 50, 0.88);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.14);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: scaleIn .15s ease;
  z-index: 1;
}

@keyframes scaleIn {
  from { opacity: 0; transform: translateY(-4px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-links a, .menu-links button.login-toggle {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .3px;
  transition: color .2s ease;
}

.menu-links li + li { margin-top: 6px; }
.menu-links a:hover, .menu-links button.login-toggle:hover { color: #e9ffe9; }
.menu-links a.active { color: #ffffff; }

.login-form-wrapper {
  overflow: hidden;
  transition: grid-template-rows .3s ease, opacity .3s ease;
  display: grid;
  grid-template-rows: 0fr;
}

.login-form-wrapper.expanded { grid-template-rows: 1fr; }
.login-form-inner { min-height: 0; }

.login-form {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f2fff2;
  font-weight: 600;
  margin-bottom: 3px;
}

.login-form input {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.login-form input:focus { 
  outline: 2px solid #ffffff; 
  outline-offset: 1px; 
}

.login-form button[type="submit"] {
  margin-top: 4px;
  background: #ffffff;
  color: #065f2c;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  align-self: flex-start;
  transition: background .25s ease, transform .15s ease;
}

.login-form button[type="submit"]:hover { background: #f3fff3; }
.login-form button[type="submit"]:active { transform: translateY(1px); }

/* Language selector buttons */
.language-selector button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  transition: color 0.2s ease;
}

.language-selector button.lang-active {
  color: #ffffff;
  font-weight: 700;
}

.language-selector button.lang-inactive {
  color: #e0ffe8;
  font-weight: 500;
}

.language-selector button:hover {
  color: #ffffff;
}

@media (max-width: 640px) {
  .main-menu { top: 8px; right: 10px; }
  .menu-bar { gap: 4px; }
  .main-menu button.menu-toggle,
  .main-menu a.menu-toggle { padding: 6px 11px 7px; font-size: 12px; }
  .menu-panel { min-width: 160px; padding: 10px 14px 12px; }
}

/* ===== FOOTER STYLES ===== */
.app-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 14px 24px 18px;
  font-family: 'OpenSans', Arial, sans-serif;
  font-size: 12px;
  color: #1b2735;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,245,248,0.85));
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  border-top: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  z-index: 30;
}

.app-footer .footer-top {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.app-footer a {
  text-decoration: none;
  color: #0d4d80;
  font-weight: 600;
  transition: color .2s ease;
}

.app-footer a:hover { color: #138bd6; }

.app-footer .divider {
  width: 1px;
  height: 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0));
}

.app-footer .meta { opacity: .75; }

@media (max-width: 640px) {
  .app-footer { font-size: 11px; padding: 12px 16px 16px; }
  .app-footer .footer-top { gap: 16px; }
}