/* ------------------ Global ------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  color: #1e2a78;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ------------------ Navbar ------------------ */
.navbar {
  height: 70px; /* fixed height */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
}

/* Logo container */
.nav-left {
  display: flex;
  align-items: center; /* vertical alignment with nav items */
  justify-content: flex-start;
  gap: 9px;
}

/* Logo container (the <a> tag) */
.logo {
  display: flex;
  align-items: center;
  overflow: hidden;   /* hide parts of image that scale outside */
  height: 45px;       /* keep navbar height */
}

/* Logo image */
.logo-img {
  height: 160px;       /* match navbar height */
  width: auto;        /* maintain aspect ratio */
  max-width: 160px;   /* allow it to be wider so text is readable */
  margin-top: 18px;
}


/* 
.logo-text {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 1.2rem; 
  font-weight: 700;
  color: #1e2a78;
  line-height: 1;
}

.logo-text span {
  color: #3048d4;
  font-weight: 800;
} */

/* Responsive adjustments */
@media (max-width: 900px) {
  .logo-img {
    height: 45px;
  }
  .logo-text {
    font-size: 1.2rem;
  }
}

/* --- Nav Links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  transition: all 0.3s ease;
}

.nav-link {
  text-decoration: none;
  color: #2e3a70;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}
.nav-link:hover,
.nav-link.active { color: #3048d4; }

/* --- Upgrade Button --- */
.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2e44cc, #1f32a0);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(47, 72, 204, 0.3);
  transition: all 0.3s ease;
}
.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(47, 72, 204, 0.35);
  background: linear-gradient(135deg, #2439a3, #1f2f8f);
}
.btn-upgrade.active { box-shadow: 0 0 10px rgba(47,73,204,0.6); }

/* --- Profile --- */
.profile-menu { position: relative; display: flex; align-items: center; }
.profile-wrapper { cursor: pointer; display: flex; align-items: center; gap: 10px; }
.profile-icon { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #3048d4; transition: 0.3s; }
.profile-wrapper:hover .profile-icon { transform: scale(1.05); }

/* Profile Card - default (desktop) */
.profile-card {
  position: absolute;
  top: 110%;
  right: 0;
  display: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  width: 240px;
  overflow: hidden;
  animation: fadeIn 0.2s ease-in-out;
  z-index: 1100;
}
.profile-card.open { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.profile-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  gap: 12px;
}
.card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}
.card-username {
  font-size: 1rem;
  color: #1e2a78;
  font-weight: 600;
}
.update-profile-link {
  color: #2f49cc;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.update-profile-link:hover { color: #1e33a2; text-decoration: underline; }
.btn-logout {
  display: block;
  background: #e74c3c;
  color: #fff !important;
  padding: 8px 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  width: 100%;
  transition: background 0.3s, transform 0.2s;
}
.btn-logout:hover { background: #c0392b; transform: translateY(-1px); }

/* --- Hamburger Menu --- */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: #1e2a78;
  cursor: pointer;
  transition: 0.3s;
}
.menu-toggle.open i::before {
  content: "\f00d"; /* FontAwesome "X" icon fallback */
}

/* --- Layout --- */
.layout-container { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; padding-top: 90px; }
footer {
  text-align: center;
  padding: 20px;
  color: #666;
  background: #fff;
  border-top: 1px solid #eee;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .navbar { padding: 12px 20px; }

  .menu-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 18px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transform: translateY(-200%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease-in-out;
    max-height: calc(100vh - 70px); /* ensure it won't exceed viewport */
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .btn-upgrade { width: 100%; justify-content: center; }

  .profile-menu { width: 100%; justify-content: flex-start; }

  /* Make profile card part of the flow on mobile so it scrolls with nav */
  .profile-card {
    position: relative;
    top: auto;
    right: auto;
    display: none;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow: auto;
    max-height: calc(100vh - 180px); /* leaves space for header/footer */
    margin-top: 6px;
    padding: 10px 0;
  }
  .profile-card.open { display: block; }

  /* a little spacing inside profile content on mobile */
  .profile-card .profile-card-content { padding: 12px; gap: 10px; align-items: flex-start; }
  .profile-card .card-avatar { width: 56px; height: 56px; }
}

/* --- Language Dropdown --- */
.lang-form { margin-right: 15px; }
.lang-dropdown {
  padding: 6px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #fff;
  color: #1e2a78;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.lang-dropdown:hover { border-color: #3048d4; }

@media (max-width: 768px) {
  .lang-form { margin-right: 8px; }
  .lang-dropdown { font-size: 0.9rem; padding: 5px 8px; }
}

/* ------------------ Extra Mobile Responsiveness ------------------ */
@media (max-width: 600px) {
  .navbar {
    padding: 10px 14px;
  }

  .logo-img {
    max-width: 120px; /* scale down for mobile */
    height: auto;     /* maintain aspect ratio */
    margin-top: 10px; /* minor adjustment for visual centering */
  }

  .nav-links {
    gap: 16px;
    padding: 16px;
  }

  .btn-upgrade {
    padding: 8px 18px;
    font-size: 0.9rem;
  }

  .lang-dropdown {
    font-size: 0.85rem;
    padding: 5px 8px;
  }

  .profile-icon {
    width: 36px;
    height: 36px;
  }

  .card-avatar {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 400px) {
  .logo-img {
    max-width: 100px; /* smaller screens */
    margin-top: 8px;
  }

  .btn-upgrade {
    padding: 7px 16px;
    font-size: 0.85rem;
  }

  .lang-dropdown {
    font-size: 0.8rem;
  }

  .profile-card-content {
    padding: 10px;
    gap: 8px;
  }
}

/* ------------------ Tablet Responsiveness ------------------ */
@media (min-width: 601px) and (max-width: 900px) {
  .navbar {
    padding: 10px 16px;
  }

  .logo-img {
    max-width: 140px; /* scale logo for tablets */
    height: auto;
    margin-top: 8px;
  }

  .nav-links {
    gap: 20px;
    padding: 18px;
  }

  .btn-upgrade {
    padding: 9px 20px;
    font-size: 0.95rem;
  }

  .lang-dropdown {
    font-size: 0.9rem;
    padding: 5px 8px;
  }

  .profile-icon {
    width: 40px;
    height: 40px;
  }

  .card-avatar {
    width: 60px;
    height: 60px;
  }
}

