/* ==========================================================================
   BASE.CSS — Styles for base.html components
   (Navbar, Footer, Hero, Dark Mode, Typing Cards, Sections, Responsive)
   ========================================================================== */

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 5000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.logo a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.navbar.scrolled {
  background-color: #fff;
  backdrop-filter: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-logo {
  display: block;
  height: 130px;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  padding: 5px 0;
  transition: transform 0.2s ease-in-out, height 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.05);
}

#home,
#projects {
  scroll-margin-top: 96px;
}

.highlight {
  color: #2563eb;
}

.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1;
}

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

.nav-links a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #2563eb;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-outline {
  padding: 6px 14px;
  border: 1px solid #000;
  background: transparent;
  border-radius: 6px;
  color: #000;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline:hover {
  background-color: #000;
  color: #fff;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-display {
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
}

.user-email {
  font-size: 12px;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-btn,
.logout-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.nav-register-btn {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.nav-register-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.profile-btn {
  border-color: #2563eb;
  color: #2563eb;
}

.profile-btn:hover {
  background: #2563eb;
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #111;
  cursor: pointer;
  z-index: 5002;
  font-size: 1.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hamburger:hover {
  background: rgba(37, 99, 235, 0.08);
}

.hamburger i {
  pointer-events: none;
}

.hamburger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Theme toggle */
.theme-toggle {
  margin-left: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.9);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  background: #f3f4f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.theme-toggle:active {
  transform: translateY(1px);
  box-shadow: none;
}


/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  display: flex;
  height: 500px;
  justify-content: space-between;
  align-items: center;
  padding: 80px 60px;
  gap: 40px;
}

.text-content {
  max-width: 50%;
}

.text-content h1 {
  font-size: 42px;
  line-height: 1.3;
  font-weight: bold;
  margin-bottom: 20px;
}

.text-content p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 30px;
}

.get-started {
  background-color: #2563eb;
  color: white;
  padding: 12px 20px;
  border: 2px solid #2563eb;
  border-radius: 6px;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.get-started:hover {
  background-color: white;
  color: #2563eb;
  border-color: #2563eb;
}

/* Image Layout */
.image-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.image-row {
  display: flex;
  gap: 20px;
}

.img-top-left,
.img-top-right {
  width: 200px;
  height: 150px;
  background-color: #e0ecff;
  border-radius: 10px;
  object-fit: cover;
  padding: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.img-bottom {
  width: 450px;
  height: 200px;
  background-color: #e0ecff;
  border-radius: 16px;
  object-fit: cover;
  padding: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.image-content img {
  animation: float 3s ease-in-out infinite;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  will-change: transform;
}

.image-content img:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}


/* ==========================================================================
   COLLABORATION BANNER
   ========================================================================== */
.collaboration-banner {
  background-color: #fff;
  color: #555;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 400;
  position: relative;
  overflow: hidden;
}

.collaboration-banner p {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

.collaboration-banner::before {
  content: '';
  display: block;
  width: 160px;
  height: 2px;
  background-color: #ddd;
  margin: 0 auto 10px;
  border-radius: 1px;
}

@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}


/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-section {
  padding: 60px 20px;
  background: #f8f9fa;
  text-align: center;
}

.projects-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.projects-section .section-description {
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555;
  font-size: 16px;
  line-height: 1.6;
}

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

.project-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 80px;
  margin-bottom: 15px;
}

.project-card h3 {
  margin-bottom: 10px;
  color: #2563eb;
}

.project-card p {
  color: #666;
  font-size: 15px;
  line-height: 1.5;
}


/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
  padding: 60px 20px;
  text-align: center;
}

.about-section h2 {
  font-size: 30px;
  margin-bottom: 15px;
}

.about-section p {
  max-width: 800px;
  margin: 0 auto;
  color: #555;
  font-size: 16px;
  line-height: 1.6;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: #0d0d14;
  font-family: Arial, Helvetica, sans-serif;
  color: #c8c8d8;
}

.footer .footer-topbar {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #2563eb 35%, #3b82f6 65%, transparent 100%);
}

.footer .footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.5fr 1.2fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 36px 40px;
  gap: 0;
  box-sizing: border-box;
}

.footer .footer-col {
  padding: 0 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  box-sizing: border-box;
}

.footer .footer-col:first-child { padding-left: 0; }
.footer .footer-col:last-child  { border-right: none; padding-right: 0; }

.footer .col-heading {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
}

.footer .col-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
}

.footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer .brand-logo {
  display: flex;
  align-items: center;
}

.footer .brand-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
  line-height: 1;
  position: relative;
  display: inline-block;
}

.footer .brand-name::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: #2563eb;
  margin-top: 8px;
  border-radius: 2px;
}

.footer .brand-tagline {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.65;
  margin: 0;
}

.footer .brand-dept {
  font-size: 12px;
  color: #6b6b85;
  line-height: 1.6;
  margin: 0;
}

.footer .contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
}

.footer .contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  color: #c8c8d8;
  line-height: 1.55;
}

.footer .contact-icon {
  color: #3b82f6;
  font-size: 13px;
  width: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer .contact-list a {
  color: #c8c8d8;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer .contact-list a:hover {
  color: #3b82f6;
}

.footer .map-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.footer .map-wrapper:hover {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 4px 28px rgba(37, 99, 235, 0.2);
}

.footer .map-wrapper iframe {
  display: block;
  width: 100%;
}

.footer .footer-feedback {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer .feedback-desc {
  font-size: 13px;
  color: #c8c8d8;
  line-height: 1.65;
  margin: 0;
}

.footer .feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #2563eb;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  width: fit-content;
}

.footer .feedback-btn i {
  font-size: 12px;
  transition: transform 0.22s ease;
}

.footer .feedback-btn:hover {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.3);
}

.footer .feedback-btn:hover i {
  transform: translateX(3px) translateY(-2px);
}

.footer .feedback-note {
  font-size: 11px;
  color: #6b6b85;
  font-style: italic;
  margin: 0;
}

.footer .footer-divider {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 36px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-sizing: border-box;
}

.footer .copyright {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #6b6b85;
  margin: 0;
}

.footer .social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.06);
}

.footer .social-link:hover {
  color: #3b82f6 !important;
  border-color: #3b82f6;
  background: rgba(37, 99, 235, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}


/* ==========================================================================
   DZONEXT ANIMATED TYPING CARDS
   ========================================================================== */
.dzonext-typing-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.dzonext-cards-container {
  position: relative;
  width: 520px;
  height: 200px;
}

.dzonext-card {
  width: 420px;
  height: 280px;
  background: linear-gradient(135deg, #4361EE 0%, #DDEEFA 100%);
  border-radius: 25px;
  padding: 40px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  transition: transform 0.45s cubic-bezier(.22,.9,.37,1), box-shadow 0.45s ease;
  position: absolute;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform-origin: center center;
}

.dzonext-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.7));
}

.dzonext-card-1 { top: 0;   left: 0;  z-index: 3; transform: rotate(-5deg) skewX(-5deg); }
.dzonext-card-2 { top: 20px; left: 25px; z-index: 2; opacity: 0.95; transform: rotate(-4deg) skewX(-4deg); }
.dzonext-card-3 { top: 40px; left: 50px; z-index: 1; opacity: 0.9;  transform: rotate(-3deg) skewX(-3deg); }

.dzonext-card-deco,
.dzonext-card-deco2 {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}
.dzonext-card-deco  { width: 200px; height: 200px; top: -70px;  right: -70px; }
.dzonext-card-deco2 { width: 140px; height: 140px; bottom: -40px; left: -40px; }

.dzonext-typing-box {
  text-align: center;
  padding: 30px;
  z-index: 2;
  position: relative;
}

.dzonext-typing-text {
  font-size: 2rem;
  line-height: 1.7;
  color: white;
  min-height: 80px;
  font-weight: 500;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.dzonext-cursor {
  display: inline-block;
  width: 4px;
  height: 2rem;
  margin-left: 3px;
  background: white;
  animation: dzonext-blink 1s infinite;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

@keyframes dzonext-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.dzonext-card-1:hover,
.dzonext-card-2:hover,
.dzonext-card-3:hover {
  transform: rotate(-3deg) skewX(-3deg) translateY(-15px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  z-index: 30;
}


/* ==========================================================================
   DARK MODE
   ========================================================================== */
.dark-mode {
  background: #020617;
  color: #e5e7eb;
}

.dark-mode .navbar {
  background-color: rgba(15, 23, 42, 0.96);
  border-bottom-color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.dark-mode .hamburger {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.08);
}

.dark-mode .hamburger:hover {
  background: rgba(59, 130, 246, 0.16);
}

.dark-mode .nav-links a       { color: #e5e7eb; }
.dark-mode .nav-links a:hover { color: #93c5fd; }

.dark-mode .btn-outline        { border-color: #e5e7eb; color: #e5e7eb; }
.dark-mode .btn-outline:hover  { background-color: #e5e7eb; color: #111827; }

.dark-mode .hero-section {
  background: radial-gradient(circle at top, #0f172a 0, #020617 50%, #020617 100%);
}

.dark-mode .text-content p,
.dark-mode .section-description,
.dark-mode .about-section p { color: #9ca3af; }

.dark-mode .collaboration-banner          { background-color: #020617; color: #9ca3af; }
.dark-mode .collaboration-banner::before  { background-color: #1f2937; }

.dark-mode .projects-section  { background: #020617; }
.dark-mode .project-card       { background: #020617; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7); }
.dark-mode .project-card p     { color: #9ca3af; }

.dark-mode .about-section { background: #020617; }

.dark-mode .footer {
  background: linear-gradient(180deg, #020617 0%, #020617 60%, #030712 100%);
  color: #9ca3af;
}

.dark-mode .footer-section h3    { color: #e5e7eb; }
.dark-mode .footer-section p,
.dark-mode .footer-section a     { color: #9ca3af; }
.dark-mode .footer-section a:hover { color: #93c5fd; }

.dark-mode .footer-bottom {
  border-top: 1px solid #1f2937;
  color: #6b7280;
}

.dark-mode .getstarted-page { background: #020617; }

.dark-mode .gs-header h1    { color: #e5e7eb; }
.dark-mode .gs-header p,
.dark-mode .gs-help-text,
.dark-mode .gs-howto-list   { color: #9ca3af; }

.dark-mode .gs-right-card {
  background: #020617;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.85);
}

.dark-mode .gs-textarea {
  background: #020617;
  color: #e5e7eb;
  border-color: #374151;
}

.dark-mode .gs-textarea::placeholder { color: #6b7280; }

.dark-mode .prediction-btn        { background: #111827; color: #e5e7eb; }
.dark-mode .prediction-btn:hover  { background: #020617; }

.dark-mode .btn-number { background-color: #4f46e5; }

.dark-mode .user-badge {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.24);
}

.dark-mode .user-display {
  color: #f8fafc;
}

.dark-mode .user-email {
  color: #94a3b8;
}

.dark-mode .profile-btn {
  border-color: #60a5fa;
  color: #93c5fd;
}

.dark-mode .profile-btn:hover {
  background: #2563eb;
  color: #fff;
}

.dark-mode .nav-register-btn {
  border-color: #3b82f6;
  background: #2563eb;
  color: #fff;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* --- Tablet --- */
@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
  }

  .text-content { max-width: 100%; }

  .image-content { margin-top: 30px; }

  .dzonext-typing-cards { padding: 40px 20px 80px; }

  .dzonext-cards-container { width: 380px; height: 260px; }

  .dzonext-card { width: 300px; height: 220px; padding: 28px; }
  .dzonext-card-2 { top: 16px; left: 20px; }
  .dzonext-card-3 { top: 32px; left: 40px; }

  .dzonext-typing-text { font-size: 1.5rem; min-height: 60px; }
  .dzonext-cursor      { height: 1.5rem; }

  .footer .footer-inner { grid-template-columns: 1fr 1fr; row-gap: 36px; }

  .footer .footer-col             { padding: 0 24px; box-sizing: border-box; }
  .footer .footer-col:first-child { padding-left: 0; }
  .footer .footer-col:nth-child(2){ border-right: none; padding-right: 0; }
  .footer .footer-col:nth-child(3){ border-right: 1px solid rgba(255,255,255,0.09); padding-left: 0; }
  .footer .footer-col:last-child  { border-right: none; padding-right: 0; }
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; padding: 12px 20px; }

  .navbar-logo { height: 60px; }

  #home,
  #projects {
    scroll-margin-top: 88px;
  }

  .hamburger { display: inline-flex; }

  .nav-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    padding: 18px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    display: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    z-index: 5001;
  }

  .nav-container.active { display: flex; }

  .nav-container nav { width: 100%; }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 0;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.08);
  }

  .nav-links a:hover {
    background: rgba(37, 99, 235, 0.1);
  }

  .auth-buttons {
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    align-items: center;
    justify-content: center;
  }

  .user-info {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
  }

  .user-badge {
    width: 100%;
    justify-content: flex-start;
  }

  .auth-buttons .btn-outline {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  .auth-buttons .theme-toggle {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .dark-mode .nav-container {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  }

  .dark-mode .nav-links a {
    background: rgba(148, 163, 184, 0.1);
    color: #e5e7eb;
  }

  .dark-mode .nav-links a:hover {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
  }

  .dark-mode .auth-buttons {
    border-top-color: rgba(148, 163, 184, 0.14);
  }
}

/* --- Small Mobile --- */
@media (max-width: 640px) {
  .hero-section {
    height: auto;
    padding: 50px 20px 40px;
    flex-direction: column;
    text-align: center;
  }

  .text-content h1  { font-size: 28px; }
  .text-content     { max-width: 100%; }

  .image-row        { flex-direction: column; align-items: center; }

  .img-top-left,
  .img-top-right    { width: 100%; max-width: 300px; height: 140px; }

  .img-bottom       { width: 100%; max-width: 340px; height: 160px; }

  .dzonext-typing-cards { padding: 40px 16px 40px; }

  .dzonext-cards-container { width: 100%; max-width: 340px; height: auto; min-height: 200px; }

  .dzonext-card {
    position: relative;
    top: auto; left: auto;
    width: 100%; height: auto; min-height: 180px;
    padding: 28px 20px;
    border-radius: 18px;
    transform: none !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  }

  .dzonext-card-2,
  .dzonext-card-3   { display: none; }

  .dzonext-card-1   { z-index: 1; }

  .dzonext-typing-text { font-size: 1.3rem; min-height: 50px; }
  .dzonext-cursor      { height: 1.3rem; }

  .dzonext-card:hover  { transform: none !important; }

  .footer .footer-inner {
    grid-template-columns: 1fr;
    padding: 36px 20px 28px;
    row-gap: 32px;
  }

  .footer .footer-col {
    border-right: none !important;
    padding: 0 !important;
  }

  .footer .footer-bottom {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 18px 20px 28px;
  }
}

/* --- Extra Small --- */
@media (max-width: 380px) {
  .navbar-logo { height: 52px; }

  .dzonext-typing-text { font-size: 1.1rem; }
}

body.dark-mode .navbar-logo {
  filter: brightness(0) invert(1); /* Turns black to white */
}
