/* =========================================================
   1) GLOBAL / BASE
   ========================================================= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  touch-action: pan-y; /* allows only vertical scroll */
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #f2e9fa; /* light violet background */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9); /* purple gradient */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

/* Dark mode support */
body.dark-mode ::-webkit-scrollbar-track {
  background: #1e1e2f;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

/* resources/css/login.css */

* {
  font-family: 'Poppins' , sans-serif;
}

/* ----- Global Styles ----- */
body, html {
    margin: 0; 
    padding: 0;
    min-height: 100vh;
}

/* ----- Background ----- */
.login-root {
    background: linear-gradient(
            rgba(65, 64, 64, 0.37),
            rgba(0, 0, 0, 0.212)
        ),
        url('/pics/login1.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* =========================================================
   2) HEADER / NAVIGATION
   ========================================================= */

header {
  width: 100%;
  padding: 15px 40px;
  background: linear-gradient(135deg, #070722 40%, #1b0233 100%);
  /* backdrop-filter: blur(12px); */ /* removed */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.scrolled {
  background: linear-gradient(135deg, #0a0a1a 40%, #1a0033 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled .menu a {
  color: #ffffff; /* make nav links dark for visibility */
}

header.scrolled .menu a:hover {
  color: #cf68ff; /* make nav links dark for visibility */
}

header.scrolled .logo h2 {
  color: #4c2dff;
}

.logo h2 {
  color: #a64ce3;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.logo h2:hover {
  color: #3a44fe;
}

/* Nav Menu */
.menu {
  list-style: none;
  display: flex;
  gap: 28px;
}

.menu li {
  position: relative;
}

.menu a {
  color: #fff;
  padding: 10px 5px;
  font-size: 16px;
  font-weight: 500;
  position: relative;
}

.menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

.menu a:hover {
  color: #b168f9;
}

/* Login Button */
.login-btn a {
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  color: #fff;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.3s ease;
}

.login-btn a:hover {
  background: linear-gradient(90deg, #110a96, #4d0276);
  transform: scale(1.08);
  color: white;
}

.dropdown{
    position: relative;
}

/* Dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  /* Glass */
  background: rgba(26, 0, 51, 0.75);
  backdrop-filter: blur(14px);
  /* Glow border */
  border: 1px solid rgba(156, 64, 248, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(156, 64, 248, 0.25);

  animation: dropdownFade 0.35s ease forwards;
  z-index: 999;
}

.dropdown-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-menu li a {
  padding: 16px 22px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.dropdown-menu li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 0%;
  width: 3px;
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  border-radius: 4px;
  transform: translateY(-50%);
  transition: height 0.3s ease;
}

.dropdown-menu li a:hover {
  background: rgba(156, 64, 248, 0.15);
  color: #a95af8;
  padding-left: 28px;
}

.dropdown-menu li a:hover::before {
  height: 60%;
}

/* Show dropdown on hover (desktop) */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Dropdown animation */
@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #fff;
  border-radius: 4px;
  transition: all 0.4s ease;
}

/* Animate to X when active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 1200px) {
  .hamburger {
    display: flex;
  }

  nav {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    text-align: center;
    animation: slideDown 0.4s ease forwards;
  }
  nav.active {
    display: flex;
    padding: 20px;
  }

  .menu {
    flex-direction: column;
    gap: 20px;
  }
  .menu li {
    width: 100%;
  }
  .menu li a {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .dropdown-menu {
    display: none;
  }
  .dropdown.open .dropdown-menu {
    display: block;
  }

  .login-btn a {
    display: block;
    width: 80%;
    margin: 16px auto;
  }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Login Root & Cards ---------- */
.login-root {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 10rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.card h2 {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: #1f2937;
  font-weight: bold;
  text-align: center;

}

/* ---------- Buttons ---------- */
.card button {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background:#8826ff;
  transition: all 0.3s ease;
}

.card button:hover {
  background: #360276;
}

/* ---------- Manual Login Form ---------- */
/* ----- Cards ----- */
.login-root .card {
  background: rgba(255,255,255,0.95);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  text-align: left;
  transition: background 0.3s, color 0.3s;
  margin-top: 100px;
}

body.dark-mode .login-root .card {
  background: rgba(30,30,30,0.9);
  color: #e5e7eb;
}

/* ----- Buttons ----- */
button {
  cursor: pointer;
  font-weight: bold;
  padding: 0.75rem;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, filter 0.2s;
}

button:hover {
  transform: translateY(-2px);
}

#backToMethod2{
  background: #5656ff;
}

#backToMethod2:hover {
  background: #1f1f5d;
}

/* Specific button colors */
#manualBtn {
  background: #2563eb; /* Blue */
  color: #fff;
}

#manualBtn:hover {
  background: #143989; /* Blue */
  color: #fff;
}

#biometricBtn {
  background: #9333ea; /* Purple */
  color: #fff;
}

#biometricBtn:hover {
  background: #4b157c; /* Purple */
  color: #fff;
}

#signupBtn {
  background: #16a34a; /* Green */
  color: #fff;
}

#signupBtn:hover {
  background: #09451f; /* Green */
  color: #fff;
}

#signupBtn:hover {
  background: #09451f; /* Green */
  color: #fff;
}

#signupBtn2 {
  background: #16a34a; /* Green */
  color: #fff;
}

#signupBtn2:hover {
  background: #09451f; /* Green */
  color: #fff;
}

#loginBtn {
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  color: #fff;
}

#loginBtn:hover {
  background: linear-gradient(90deg, #110a96, #4d0276);
  color: #fff;
}

/* ----- Password wrapper ----- */
.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 40%;
  right: 13px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 0.9rem;
  color: #cd62fe9d;
}

form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.95rem;
  color: #444;

}

/* ----- Inputs ----- */
.card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: border 0.3s, background 0.3s;
}

input:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
}

body.dark-mode input {
  background: #1f1f1f;
  border: 1px solid #444;
  color: #e5e7eb;
}

/* ----- Error ----- */
.error {
    border: 1px solid #B91C1C;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    display: none; /* hidden initially */
    background: #ffdfdf;
    color: red;
}

/* ----- Links ----- */
.links {
  text-align: left;
  margin-bottom: 1rem;
}

.links a {
  color: #9525eb;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
  color: #ac54ef;;
}

body.dark-mode .links a {
  color: #93c5fd;
}

/* ----- Back buttons ----- */
.back-btn {
  background: none;
  border: none;
  color: gray;
 
  margin-top: 1rem;
}

/* ----- Flex buttons wrapper ----- */
.buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ----- Responsive ----- */
@media (max-width: 540px) {
  .login-root .card {
    width: 100%;
    padding: 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* ---------- Card Animation ---------- */
.login-root .card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.5s forwards;
}

/* Trigger animation when card becomes visible */
#methodSelection,
#manualLogin,
#biometricLogin {
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.5s forwards;
}

/* Fade in + slide up */
@keyframes cardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Optional: stagger animation for multiple cards */
.login-root .card:nth-child(1) {
  animation-delay: 0.1s;
}

.login-root .card:nth-child(2) {
  animation-delay: 0.2s;
}

.login-root .card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Smooth transition for dark mode toggle */
body.dark-mode .login-root .card {
  transition: background 0.4s, color 0.4s, transform 0.5s, opacity 0.5s;
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #0a0a1a 40%, #1a0033 100%);
  color: #fff;
  padding: 60px 25px 20px;
  line-height: 1.6;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
  position: relative;
}

.footer-col h4::after {
  content: "";
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  display: block;
  margin-top: 8px;
}

.footer-col ul li {
    list-style: none;
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    color: #ddd;

    /* Ensure icon stays left and text shrinks instead of overflowing */
    flex-wrap: nowrap;         /* no wrapping to next line */
    overflow-wrap: anywhere;   /* allow breaking within long words if necessary */
}

.footer-col ul li i {
    margin-right: 10px;       /* gap between icon and text */
    flex-shrink: 0;           /* icon never shrinks */
}

.footer-col ul li a {
    color: #bbb;
    text-decoration: none;
    transition: 0.3s;

    /* allow long emails to break within container */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-col ul li a:hover {
  color: #8a12f3;
}

/* Logo & Social */
.footer-logo {
  max-width: 140px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;              /* circle size */
  height: 40px;
  border: solid 1px;
  border-radius: 50%;       /* makes it a circle */
  background: #22222200;         /* default circle background */
  color: #bbb;              /* icon color */
  font-size: 16px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #7712f3;      /* circle background on hover */
  color: #fff;              /* icon color on hover */
  transform: scale(1.1);    /* slight zoom effect */
  box-shadow: 0 4px 12px rgba(119, 18, 243, 0.4);
}

/* ================= LEGAL SECTION ================= */
.footer-legal {
  color: #ccc;
  padding: 10px 5px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  line-height: 1.7;
}

.footer-legal h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #bb8bf6;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-legal h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #6A11CB, #2575FC);
  margin-top: 6px;
  border-radius: 2px;
}

.footer-legal p {
  margin-bottom: 18px;
  color: #bbb;
  text-align: justify;
}

.footer-legal p:last-child {
  margin-bottom: 0; /* no gap after last paragraph */
}

/* Responsive */
@media (max-width: 768px) {
  .footer-legal {
    font-size: 13px;
    padding: 30px 15px;
  }
  .footer-legal h3 {
    font-size: 15px;
  }
}

/* Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 13px;
  color: #888;
}

.footer-bottom .footer-social {
  gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .footer-col h4::after {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 500px) {
  .footer-logo {
    margin-left: 0;
    margin-right: auto; /* aligns left */
    display: block;      /* ensure margin works */
    text-align: left;    /* optional if needed inside container */
  }
}

/* Floating Dark Mode Toggle */
.dark-toggle {
  position: fixed;
  left: 20px;
  bottom: 20px;   /* stays at bottom */
  background: #111;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1200;
}

.dark-toggle:hover {
  background: #333;
  transform: scale(1.1);
}

/* ----- Dark Mode Styles ----- */

/* ----- Background ----- */
.login-root {
    background: linear-gradient(
            rgba(0, 0, 0, 0.685),
            rgba(0, 0, 0, 0.436)
        ),
        url('/pics/login1.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ----- Dark Mode Background ----- */
body.dark-mode .login-root {
    background: linear-gradient(
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0.7)
        ),
        url('/pics/login1.jpg') center/cover no-repeat;
}

body.dark-mode .card {
    background: rgba(15, 23, 42, 0.728); /* deep dark */
    color: #f1f5f9; /* light text */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

body.dark-mode .card input {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8fafc; /* white text */
}

body.dark-mode .card input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px #60a5fa; /* light blue focus */
}

body.dark-mode .card label {
    color: #cbd5e1; /* gray-300 */
}

body.dark-mode .card button[type="submit"] {
    background: linear-gradient(90deg, #6366f1, #a855f7);
    color: #fff;
}

body.dark-mode .card button[type="submit"]:hover {
    background: linear-gradient(90deg, #4338ca, #7e22ce);
}

body.dark-mode .card .biometric {
    background-color: #334155;
}

body.dark-mode .card .biometric:hover {
    background-color: #1e293b;
}

body.dark-mode .card a {
    color: #93c5fd; /* light blue */
}

body.dark-mode .card a:hover {
    color: #bfdbfe; /* lighter blue */
}

body.dark-mode .card .password-toggle {
    color: #94a3b8;
}

/* Header */
body.dark-mode header {
  background: linear-gradient(135deg, #111111 40%, #1a0033 100%);
}

/* Dark mode header after scroll */
body.dark-mode header.scrolled {
  background: linear-gradient(135deg, #0d0d0d 40%, #1a0033 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

body.dark-mode .menu a {
  color: #ddd;
}

body.dark-mode .menu a:hover {
  color: #c57aff;
}

body.dark-mode .login-btn a {
  background: linear-gradient(90deg, #150c55, #220944);
}

/* Dropdown */
body.dark-mode .dropdown-menu {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(156, 64, 248, 0.4);
}

/* Buttons */
body.dark-mode .hero-buttons a:last-child {
  border: 2px solid #555;
  color: #ddd;
}

body.dark-mode .hero-buttons a:last-child:hover {
  background: linear-gradient(90deg, #150c55, #220944);
  border-color: transparent;
}

/* Cards, sections, faq, testimonials (if you add them later) */
body.dark-mode .card,
body.dark-mode .section,
body.dark-mode .pricing-card,
body.dark-mode .faq-item,
body.dark-mode .testimonial-card {
  background: #161616;
  color: #f5f5f5;
  border: 1px solid rgba(255,255,255,0.05);
}

/* ================= DARK MODE FOOTER ================= */
.dark-mode .footer {
  background: linear-gradient(135deg, #000000 40%, #0d0d2e 100%);
  color: #e0e0e0;
}

.dark-mode .footer-col h4 {
  color: #fff;
}

.dark-mode .footer-col h4::after {
  background: linear-gradient(90deg, #bb86fc, #3700b3);
}

.dark-mode .footer-col ul li {
  color: #ccc;
}

.dark-mode .footer-col ul li i {
  color: #bb86fc; /* icons match dark theme accent */
}

.dark-mode .footer-col ul li a {
  color: #aaa;
}

.dark-mode .footer-col ul li a:hover {
  color: #bb86fc;
}

/* Social icons */
.dark-mode .footer-social a {
  border-color: rgba(255,255,255,0.2);
  color: #aaa;
}

.dark-mode .footer-social a:hover {
  background: #bb86fc;
  color: #fff;
  box-shadow: 0 4px 12px rgba(187,134,252,0.4);
}

/* Legal section */
.dark-mode .footer-legal {
  color: #bbb;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.dark-mode .footer-legal h3 {
  color: #bb86fc;
}

.dark-mode .footer-legal h3::after {
  background: linear-gradient(90deg, #bb86fc, #3700b3);
}

.dark-mode .footer-legal p {
  color: #aaa;
}

/* Footer bottom */
.dark-mode .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
}

.dark-mode .footer-bottom p {
  color: #aaa;
}

/*h2 style */

.card h2 {
  color: #000; /* default black */
}

body.dark-mode .card h2 {
  color: #fff; /* white in dark mode */
}

.logo img {
    height: 50px;           /* adjust as needed */
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo img {
        height: 40px;       /* smaller logo for mobile */
    }
}

