/* --- Variables & Reset --- */
:root {
  --primary: #ff0000;
  --accent: #cc0000;
  --dark-bg: #0f1b2b;
  --darker-bg: #080f18;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #a3a3a3;
  --font-heading: "Bebas Neue", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  /* Crucial for preventing input/padding overflow */
}

body {
  background-color: var(--dark-bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

/* --- Utility Classes --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 10px 28px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* --- Industrial Neon --- */
.neon-btn {
  background: transparent;
  color: #fff;
  padding: 12px 30px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5), inset 0 0 5px rgba(255, 0, 0, 0.3);
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
}

.neon-btn:hover {
  background: rgba(255, 0, 0, 0.1);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), inset 0 0 10px rgba(255, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* --- Kinetic Typography --- */
.kinetic-heading {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 8vw, 10rem);
  line-height: 0.85;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  letter-spacing: -2px;
}

/* --- Bento Grid --- */
.bento-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.bento-item {
  background: #111;
  border-radius: 16px;
  padding: 30px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bento-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 0, 0, 0.5);
}

.bento-dark {
  background: #0a0a0a;
}

/* --- Glassmorphism Advanced --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}


/* --- Navbar (base) --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(15, 27, 43, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 5%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 1px;
}

.logo .dot {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.nav-links a:hover {
  color: white;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Navbar overrides: center menu + right area --- */
.navbar {
  justify-content: flex-start;
}

.logo {
  margin-right: 40px;
}

.nav-links {
  flex: 1;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.branches-dropdown {
  position: relative;
}

.branches-toggle {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 0.85rem;
  transition: 0.3s;
}

.branches-toggle i {
  font-size: 0.7rem;
}

.branches-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 0.75rem;
  padding: 0.5rem 0;
  min-width: 140px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 50;
}

.branches-menu a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: #f5f5f5;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.branches-menu a:hover {
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color: #fff;
}

/* --- Settings Dropdown --- */
.settings-dropdown {
  position: relative;
  display: inline-block;
}

.settings-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.settings-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
  transform: rotate(90deg);
}

.settings-menu {
  position: absolute;
  top: 120%;
  right: 0;
  background: rgba(10, 10, 20, 0.95);
  border-radius: 0.75rem;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: none;
  border: 1px solid var(--glass-border);
  z-index: 2002;
}

.settings-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.7rem 1rem;
  color: #f5f5f5;
  font-size: 0.9rem;
  text-decoration: none;
  transition: 0.2s;
}

.settings-menu a:hover {
  background: linear-gradient(90deg, #ff512f, #dd2476);
  color: #fff;
}

.settings-dropdown:hover .settings-menu {
  display: block;
}

.profile-icon {
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
}

.profile-icon i {
  pointer-events: none;
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1470&auto=format&fit=crop') no-repeat center center/cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 27, 43, 0.3) 0%, rgba(15, 27, 43, 1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5%;
  max-width: 800px;
}

.hero h4 {
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 10px;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  max-width: 500px;
}

.cta-group {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* --- Features (Glassmorphism) --- */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h3 {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
}

.glass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 40px 30px;
  border-radius: 16px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-10px);
}

.glass-card.highlight {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-box {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.glass-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.glass-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

.tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* --- Stats --- */
.stats {
  display: flex;
  justify-content: space-around;
  padding: 60px 0;
  background: var(--darker-bg);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.stat-item {
  text-align: center;
}

.stat-item h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent);
}

.stat-item p {
  color: var(--text-muted);
}

/* --- Plans --- */
.plans {
  padding: 100px 0;
}

.pricing-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.pricing-card {
  background: #151f32;
  padding: 40px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  border: 1px solid transparent;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #1a2740 0%, #151f32 100%);
  transform: scale(1.05);
}

.best-value {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: black;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.pricing-card h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.pricing-card h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 20px;
}

.pricing-card h1 span {
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-muted);
}

.pricing-card ul {
  margin-bottom: 30px;
  text-align: left;
  padding-left: 20px;
}

.pricing-card ul li {
  margin-bottom: 10px;
  color: #d1d1d1;
}

.pricing-card ul li i {
  color: var(--primary);
  margin-right: 10px;
}

/* --- Ask My Question section --- */
.ask-section {
  padding: 80px 0 100px;
  background: var(--darker-bg);
  border-top: 1px solid var(--glass-border);
}

.chat-card {
  max-width: 700px;
  margin: 0 auto;
  background: #151f32;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.message .label {
  font-size: 0.75rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.message.user {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.6);
  align-self: flex-end;
  color: #ffd6e6;
}

.message.user .label {
  color: var(--accent);
}

.message.moderator {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  align-self: flex-start;
  color: #e4f0ff;
}

.message.moderator .label {
  color: #7fd0ff;
}

.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.chat-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: #0f1b2b;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.chat-input button {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

/* --- Login Section (Updated for Standalone Page) --- */
.login-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(rgba(15, 27, 43, 0.8), rgba(15, 27, 43, 0.8)),
    url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1470&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}

.login-box {
  position: relative;
  z-index: 1;
  background: #111b2b;
  border-radius: 18px;
  padding: 35px 30px;
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.login-box h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 6px;
  text-align: center;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-form input {
  padding: 12px 15px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: #0b1422;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
}

/* Password Toggle Eye Positioning */
.toggle-password {
  position: absolute;
  right: 15px;
  top: 42px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 10;
}

.login-submit {
  margin-top: 10px;
  width: 100%;
}

.login-divider {
  text-align: center;
  margin: 25px 0 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-btn {
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: #0b1422;
  color: var(--text-main);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  cursor: pointer;
}

.social-btn.google i {
  color: #ea4335;
}

.social-btn.facebook i {
  color: #1877f2;
}

.social-btn.apple i {
  color: #ffffff;
}

.login-note {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Footer --- */
footer {
  padding: 60px 0 20px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.footer-logo .dot {
  color: var(--primary);
}

.socials {
  margin-top: 20px;
}

.socials a {
  font-size: 1.2rem;
  margin: 0 10px;
  color: var(--text-muted);
}

.socials a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 40px;
  font-size: 0.8rem;
  color: #555;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background: rgba(15, 27, 43, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    /* Changed from none to flex for the slide-out */
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 20px 0;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .hamburger {
    display: block;
    z-index: 1002;
    /* Ensure it stays above if needed, though we might use a close button inside */
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .nav-right {
    gap: 5px;
  }

  .desktop-text {
    display: none !important;
  }

  .branches-toggle {
    padding: 6px 10px !important;
  }

  .branches-toggle i {
    font-size: 1.1rem !important;
    margin: 0;
  }

  .logo {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .logo img {
    height: 26px !important;
    margin-right: 5px !important;
  }

  .navbar {
    padding: 15px 3%;
    width: 100%;
  }

  /* Hide old mobile nav elements */
  .hamburger,
  .branches-dropdown {
    display: none !important;
  }

  .nav-right {
    padding-right: 0 !important;
  }

  /* Bottom Navigation Styles */
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    /* Space for bottom nav */
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
  }

  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #a0aec0;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    flex: 1;
    text-transform: uppercase;
  }

  .mobile-bottom-nav a i {
    font-size: 1.3rem;
    margin-bottom: 4px;
    transition: 0.3s;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:hover {
    color: var(--primary);
  }

  .mobile-bottom-nav a.active i,
  .mobile-bottom-nav a:hover i {
    transform: translateY(-2px);
    color: var(--primary);
  }

  /* Make forms and inputs friendly on mobile */
  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  /* Stack things */
  .pricing-wrapper,
  .stats,
  .cta-group {
    flex-direction: column;
    align-items: center;
  }

  .glass-grid {
    grid-template-columns: 1fr;
  }

  .bento-container {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .bento-item {
    padding: 20px;
  }

  .kinetic-heading {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: -1px;
  }

  .chat-card {
    padding: 20px 14px;
  }

  .login-box {
    margin: 0 12px;
  }
}


/* --- Navbar Profile Image --- */
.nav-profile-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  cursor: pointer;
  object-fit: cover;
}

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: rgba(22, 33, 48, 0.95);
  color: white;
  padding: 15px 25px;
  margin-bottom: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  min-width: 300px;
}

.toast.error {
  border-left-color: #f44336;
}

.toast i {
  font-size: 1.2rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* --- Animations --- */
.fade-in {
  animation: fadeIn 1s ease forwards;
  opacity: 0;
}

.fade-in-delay {
  animation: fadeIn 1s ease forwards 0.3s;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 1s ease forwards 0.6s;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 1s ease forwards 0.9s;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}