/* ----------------------------------------
   BASE styles
   ---------------------------------------- */

/* 0) Fonts + Reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* 1) Base body styles */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fc; /* preserved */
  color: #1b1045;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------
   NAVBAR / HEADER
   --------------------------- */

/* 2) Navbar container */
.navbar {
  background-color: #150c36; /* slightly richer than original #1b1045 for depth */
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  align-items: end;
}

/* 3) Left: logo + nav */
.logo {
  display: flex;
  align-items: end;
  width: 100%;
}

.logo img {
  width: 100%;
  display: block;
}

.header-nav {
  display: flex;
  margin-bottom: -4px;
  justify-content: space-evenly;
  width: 100%;
}

.header-nav a {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-nav a:hover,
.header-nav a:focus {
  opacity: 1;
  transform: translateY(-1px);
}

.header-nav a:active {
  opacity: 0.7;
  transform: translateY(0);
}

/* 4) Right side container */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 5) User menu (badge + dropdown anchor) */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

/* 6) User badge */
#user-icon {
  background: linear-gradient(135deg, #f75c8b 0%, #ff447c 100%); /* Option A gradient */
  color: #fff;
  padding: 8px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 66px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform .12s ease, box-shadow .12s ease;
  user-select: none;
}

#user-icon:active { transform: translateY(0); }
#user-icon:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.22); }

/* 7) Dropdown panel */
#user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #ffffff;
  color: #1b1045;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10,10,20,0.12);
  overflow: hidden;
  z-index: 1100;
  font-family: inherit;
  font-size: 0.95rem;
}


/* Desktop subnav - matches navbar styling */
.subnav {
  background-color: #2e2943; /* Matches .navbar background */
  padding: 0.2rem 1rem;
  display: flex;
  gap: 5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.subnav a {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.subnav a:hover,
.subnav a:focus {
  opacity: 1;
  transform: translateY(-1px);
}

/* Mobile burger button - matches existing link colors */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  margin-right: 1rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #ffffff; /* White to match navbar text */
  margin: 3px 0;
  transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile sliding drawer - matches navbar background */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: #150c36; /* Matches .navbar */
  z-index: 1001;
  padding: 80px 20px 20px;
  transition: left 0.3s ease-in-out;
  box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu a {
  display: block;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  font-size: 12px; /* Slightly larger for touch */
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 1.25rem 0;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mobile-menu a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile styles */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .subnav {
    display: none;
  }
  
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    display: flex;
    align-items: center;
  }
  
  .logo img {
    max-width: 120px;       /* smaller logo on mobile */
    height: auto;
  }
}




/* Use the existing .hidden utility to control visibility in your JS: */
.hidden { display: none; }

/* Each row */
.dropdown-row {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f1f6;
  background: white;
  transition: background .12s ease;
}

.dropdown-row:last-child { border-bottom: none; }

.dropdown-row strong { color: #1b1045; font-weight: 600; }

.dropdown-row:hover { background: #fafafa; }

/* Logout link styling */
.logout-link {
  color: #d9534f;
  font-weight: 600;
  text-decoration: none;
  display: block;
}

.logout-link:hover { text-decoration: underline; }

/* 8) Support/email icon (right-most) */
/* Prefer adding class="support-icon" to <img> for clarity */
.support-icon,
#nav-image-btn {
  width: 50px;
  height: 50px;
  display: inline-block;
  object-fit: contain;
  cursor: pointer;
  border-radius: 4px;
}

.support-icon:hover,
#nav-image-btn:hover { transform: scale(1.08); opacity: 1; }

/* ---------------------------
   MAIN / HERO / LAYOUT
   --------------------------- */

/* 9) Hero container (left + right) */
.hero {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
  padding: 0.5rem;
  flex-wrap: nowrap;
}

/* 10) Left column (login form wrapper) */
.left {
  position: relative;
  flex: 0 1 420px;
  min-width: 380px; /* allow better small-screen fit */
}

/* 11) Login card (left) */
.login-left {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* 12) Headings / form fields within login */
.login-heading {
  color: #1b1045;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  text-align: center;
  font-weight: 600;
}

.login-form input,
.login-form select,
.login-form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 2px solid #d8d8e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
  background: #ffffff;
  color: inherit;
}

.login-form input:focus,
.login-form select:focus,
.login-form textarea:focus {
  border-color: #f75c8b;
  outline: none;
  box-shadow: 0 6px 18px rgba(247,92,139,0.08);
}

.btn-login {
  width: 100%;
  background-color: #f75c8b;
  color: #ffffff;
  border: none;
  padding: 0.82rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s ease, transform .08s ease;
}

.btn-login:hover { background-color: #ff6e9c; transform: translateY(-1px); }

/* small utilities in form */
#msg { margin-top: 1rem; color: #c81d25; font-weight: 500; text-align: center; }
#agree { font-size: small; color: #555; }

/* 13) Right column content */
.right {
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
}

.top-stories {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  padding: 1.75rem 1.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.top-stories-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.viewport {
  max-width: 100%;
  overflow: hidden;
  flex: 1;
}

.track {
  max-width: 100%;
  display: flex;
  transition: transform 0.35s ease;
}

.page {
  max-width: 100%;
  flex: 0 0 100%;
  padding: 0.5rem 1.25rem 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-image {
  align-self: center;
}

.login-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.page-text {
  display: flex;
  gap: 1.5rem;
}

.page-text .col {
  flex: 1 1 0;
}

/* arrows */
.nav {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.04);
  color: #111827;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.nav:hover {
  background: rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dots {
  display: flex;
  gap: 6px;
  margin-top: 0.25rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.dot.active {
  background: #111827;
  transform: scale(1.1);
}

/* images in right card */
.login-image img {
  border-radius: 12px;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* 14) Lists inside right section */
.features, .notes {
  list-style: disc outside;
  text-align: left;
  padding-left: 0;
  margin-bottom: 1rem;
  color: #333;
  font-size: 0.85rem;
}

.features::before {
  content: "FEATURES";
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #1b1045;
  margin-bottom: 0.4rem;
}

.notes::before {
  content: "NOTES";
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #1b1045;
  margin-bottom: 0.4rem;
}

/* ---------------------------
   OVERLAYS / SPINNER
   --------------------------- */

.form-wrapper { position: relative; display: inline-block; width: 100%; }

.spinner-overlay {
  position: absolute;
  inset: 0; /* shorthand for top/right/bottom/left: 0 */
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  z-index: 900;
}

.spinner-overlay.hidden { display: none; }

/* spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e3b9c7;
  border-top: 4px solid #f75c8b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* optional disabled form appearance */
.login-form.disabled { opacity: 0.54; pointer-events: none; }

/* ---------------------------
   FOOTER
   --------------------------- */

footer {
  text-align: center;
  padding: 1rem;
  background-color: #150c36;
  color: #ffffff;
  font-size: 0.95rem;
  margin-top: 3rem;
}

.footer-nav a{
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus {
  opacity: 1;
  transform: translateY(-1px);
}

/* ---------------------------
   RESPONSIVE (mobile-first breakpoints)
   --------------------------- */
@media (max-width: 480px) {
  .hero {
    flex-wrap: wrap;     /* allow wrapping on small screens only */
  }

  .left,
  .right {
    flex: 0 0 100%;      /* full-width stacking */
  }

  /* NEW: inside the right section, stack columns vertically */
  .page-text {
    flex-direction: column;
  }

  .page-text .col {
    width: 100%;
  }

  /* Optional: image above text on very small screens */
  .page {
    flex-direction: column;
  }

  .page-image {
    width: 100%;
    max-width: none;
  }
}


/* ---------------------------
   UTILITIES
   --------------------------- */

.hidden { display: none !important; }
.visually-hidden { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* small helper spacing utilities (optional) */
.mr-8 { margin-right: 8px; }
.ml-8 { margin-left: 8px; }
