:root {
  --primary-color: #007BFF;
  --secondary-color: #00C6CF;
  --dark-blue: #0A1931;
  --off-white: #f4f7f5;
  --text-color: #333;
  --light-gray: #EFEFEF;
  --border-color: #ddd;
  --font-family: 'Poppins', sans-serif;
  --container-width: 1140px;
  --border-radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-family);
  line-height: 1.7;
  color: var(--text-color);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 15px; /* More mobile-friendly */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  flex-grow: 1;
}

.header {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Prevent overlap on smaller screens */
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--dark-blue);
  font-size: 1.25rem;
  font-weight: 700;
  gap: 10px;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  flex-wrap: wrap; /* Wrap links on smaller screens */
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
  min-width: 200px;
  white-space: nowrap;
  overflow-x: auto;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

.nav-links .dropdown:hover .dropdown-menu {
  display: block;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--dark-blue);
  transition: all 0.3s ease-in-out;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.btn {
  padding: 12px 28px;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

.page-header {
  background-color: var(--dark-blue);
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  border-bottom: 5px solid var(--primary-color);
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header p {
  font-size: 1.2rem;
  color: #eee;
}

.footer {
  background-color: var(--dark-blue);
  color: var(--off-white);
  padding: 60px 0 20px 0;
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column {
  padding: 0 10px;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-about {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #ccc;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: inline-block;
}

.social-icons img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #2a3a53;
  color: #aaa;
  font-size: 0.9rem;
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.login-btn {
  background-color: transparent;
  border: 1px solid #4f46e5;
  color: var(--primary-color);
}

.login-btn:hover {
  background-color: #4f46e5;
  color: white;
}

.signup-btn {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid transparent;
}

.signup-btn:hover {
  background-color: #4338ca;
}

.logout-btn {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid transparent;
}

.logout-btn:hover {
  background-color: #4338ca;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  html {
    font-size: 100%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 95%;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 75px;
    flex-direction: column;
    background-color: #ffffff;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 30px 0;
    gap: 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
  }

  .nav-links a:hover::after {
    width: 0;
  }

  .hamburger {
    display: block;
  }

  .footer {
    text-align: center;
    padding: 40px 0;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .footer-about {
    font-size: 0.9rem;
  }

  .footer-links li {
    margin-bottom: 16px;
  }

  .footer-bottom {
    font-size: 0.8rem;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 90%;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .logo img {
    height: 40px;
  }
}
