/* AAMAS 2027 - Custom Styles */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.main-menu > li > ul.sub-menu li {
  padding: 0px;
}

/* Header Styles */
.site-header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: #1a5490;
  padding: 10px 0;
}

.header-top-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.site-title span {
  font-weight: 400;
  opacity: 0.95;
}

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

.auth-links a {
  color: white;
  text-decoration: none;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.3s;
}

.auth-links a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.auth-links .btn-login {
  background: #e74c3c;
}

.auth-links .btn-login:hover {
  background: #c0392b;
}

/* Navigation */
.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.main-menu,
.main-nav .navbar-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.main-menu > li,
.main-nav .nav-item {
  position: relative;
}

.main-menu > li > a,
.main-nav .nav-item > a {
  display: block;
  padding: 15px 20px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s;
}

.main-menu > li > a:hover,
.main-nav .nav-item > a:hover {
  color: #1a5490;
  background: #f8f9fa;
}

/* Submenu */
.main-menu li ul,
.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  z-index: 100;
  border: none;
  border-radius: 0 0 4px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu > li:hover > ul,
.main-nav .nav-item:hover > .dropdown-menu {
  display: block;
}

.main-menu li ul li,
.main-menu li ul a,
.main-nav .dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s;
}

.main-menu li ul a:hover,
.main-nav .dropdown-menu a:hover {
  background: #f8f9fa;
  color: #1a5490;
  padding-left: 25px;
}

/* User Menu */
.user-menu {
  position: relative;
  display: inline-block;
}

.user-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  cursor: pointer;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.user-avatar:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
}

.user-icon {
  font-size: 18px;
  line-height: 1;
}

.user-email {
  font-size: 14px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 1px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  overflow: hidden;
  z-index: 1000;
}

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

.user-dropdown .dropdown-item {
  display: block;
  padding: 12px 20px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
  border-bottom: 1px solid #f0f0f0;
}

.user-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.user-dropdown .dropdown-item:hover {
  background: #f8f9fa;
  color: #1a5490;
  padding-left: 25px;
}

/* Mobile Menu Toggle with CSS Checkbox */
.mobile-menu-checkbox {
  display: none;
}

.mobile-toggle {
  display: none;
  background: transparent;
  color: #1a5490;
  border: 2px solid #1a5490;
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  margin: 10px 0;
  transition: all 0.3s;
  user-select: none;
}

.mobile-toggle:hover {
  background: #1a5490;
  color: white;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: white;
  padding: 60px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.footer-section p,
.footer-section a {
  color: #bdc3c7;
  text-decoration: none;
  line-height: 1.8;
  font-size: 14px;
}

.footer-section a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #95a5a6;
  font-size: 14px;
}

/* Subscribe Button */
.subscribe-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
  z-index: 999;
  border: none;
}

.subscribe-btn:hover {
  transform: scale(1.1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  position: relative;
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.close:hover {
  color: #333;
}

/* Auth Pages Styles */
.auth-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 0 20px;
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  color: #1a5490;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-header p {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #1a5490;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #0d3a6b;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #eee;
  color: #666;
}

.auth-footer a {
  color: #1a5490;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 14px;
}

.info-box {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid #1a5490;
}

.info-box p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

/* Profile Page Styles */
.profile-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.profile-header {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 30px;
}

.profile-header h1 {
  color: #1a5490;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 15px;
}

.profile-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  padding: 10px 20px;
  border-radius: 25px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.3s;
}

.profile-email:hover {
  background: #e9ecef;
}

.profile-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.profile-card h2 {
  color: #1a5490;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.info-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.info-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-label {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.info-value {
  color: #2c3e50;
  font-size: 16px;
  font-weight: 400;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.btn-action {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.btn-primary {
  background: #1a5490;
  color: white;
}

.btn-primary:hover {
  background: #0d3a6b;
  color: white;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-block;
  }

  /* Hide menu by default on mobile */
  .main-menu,
  .main-nav .navbar-nav {
    display: none !important;
    flex-direction: column;
    width: 100%;
    background: #f8f9fa;
    padding: 10px 0;
    border-top: 2px solid #e0e0e0;
  }

  /* CSS Checkbox Toggle - Show menu when checked */
  .mobile-menu-checkbox:checked ~ .main-menu,
  .mobile-menu-checkbox:checked ~ .navbar-nav {
    display: flex !important;
  }

  /* Change label style when checked */
  .mobile-menu-checkbox:checked + .mobile-toggle {
    background: #1a5490;
    color: white;
  }

  .mobile-menu-checkbox:checked + .mobile-toggle::before {
    content: "✕ ";
  }

  .main-menu > li,
  .main-nav .nav-item {
    width: 100%;
  }

  .main-menu > li > a,
  .main-nav .nav-item > a {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
  }

  .main-menu li ul,
  .main-nav .dropdown-menu {
    position: static;
    box-shadow: none;
    border-left: 3px solid #1a5490;
    margin-left: 20px;
    background: white;
    display: none;
  }

  .main-menu li:hover > ul,
  .main-menu li.active > ul {
    display: block;
  }

  .main-menu li ul li {
    width: 100%;
  }

  .header-top-content {
    font-size: 14px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .site-title {
    font-size: 14px;
  }

  .auth-links {
    justify-content: center;
  }

  .user-email {
    max-width: 120px;
  }

  .auth-header h1 {
    font-size: 28px;
  }

  .auth-card {
    padding: 30px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .profile-header {
    padding: 30px 20px;
  }

  .profile-header h1 {
    font-size: 28px;
  }

  .profile-card {
    padding: 20px;
  }
}
