/* ---- Basic reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f4f6;
  color: #111827;
}

main {
  max-width: 1100px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1rem;
}

section {
  max-width: 800px;
  margin: 0 auto 1.75rem;
  background: #ffffff;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: 14px;
  border: 1px solid #e1e1e6;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

/* ---- Header / nav (Northeastern + Russian accent) ---- */
header {
  position: relative;
  background: linear-gradient(120deg, #111111, #cc0000);
  color: #ffffff;
  padding: 0.85rem 1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Russian tricolor accent bar under header */
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  background: linear-gradient(to right,
    #ffffff 0%, #ffffff 33.33%,
    #0039a6 33.33%, #0039a6 66.66%,
    #d52b1e 66.66%, #d52b1e 100%
  );
}

header h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

/* Header layout adjustment */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;  /* Adjust gap between logo and title/nav */
  max-width: 1100px; /* Control width */
  margin: 0 auto; /* Center header */
  padding: 0.85rem 1rem 0.4rem;
}

/* Logo styling */
.site-logo img {
  width: 100px;
  height: auto;
  object-fit: contain;
  display: block; /* Show logo on desktop */
}

.hamburger {
  display: none; /* Hide hamburger icon by default */
  font-size: 2rem;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

/* Mobile Navigation */
.main-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 0.2rem;
  display: flex;
  justify-content: center; /* Center the links */
  gap: 1.5rem;  /* Space out the links */
}

@media (max-width: 768px) {
  /* Mobile: Hide logo */
  .site-logo img {
    display: none;
  }

  /* Mobile: Show hamburger icon */
  .hamburger {
    display: block;
  }

  /* Mobile Navigation */
  .main-nav {
    display: none;  /* Hide the menu by default */
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: #cc0000;
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(-100%); /* Start offscreen */
  }

  .main-nav.active {
    display: flex;
    transform: translateY(0); /* Slide in the menu */
  }
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px;
  font-size: 1rem;
}

.main-nav a:hover {
  background-color: #d52b1e;
  border-radius: 5px;
  cursor: pointer;
}

/* Mobile nav link hover */
.main-nav a:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Typography ---- */
h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.5rem;
}

h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
}

p {
  margin-top: 0.3rem;
  margin-bottom: 0.8rem;
}

/* ---- Forms ---- */
form {
  margin-top: 1rem;
}

form div {
  margin-bottom: 0.95rem;
}

label {
  font-size: 0.9rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.6rem;
  border-radius: 9px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f9fafb;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #cc0000; /* Northeastern red focus */
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2);
  background: #ffffff;
}

/* Submit button = NEU red pill button */
button[type="submit"] {
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: #cc0000;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    transform 0.05s ease,
    box-shadow 0.1s ease,
    background 0.1s ease;
}

button[type="submit"]:hover {
  background: #e53935;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Join status message */
#join-message {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #111111;
}

/* ---- Footer ---- */
footer {
  margin-top: 0.5rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #4b5563;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* ---- Responsive tweaks ---- */
@media (min-width: 768px) {
  header {
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }

  main {
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }
  
}

#events-admin-controls {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#events-admin-controls button {
  margin-right: 0.4rem;
}

.admin-event-card label {
  display: block;
  margin-bottom: 0.15rem;
}

/* ---- Reusable button styles ---- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.1s ease,
    color 0.1s ease,
    box-shadow 0.1s ease,
    transform 0.05s ease;
}

/* Primary = solid NEU red */
.btn-primary {
  background: #cc0000;
  color: #ffffff;
  border-color: #cc0000;
}

.btn-primary:hover {
  background: #e53935;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary = outlined red */
.btn-secondary {
  background: #ffffff;
  color: #cc0000;
  border-color: #cc0000;
}

.btn-secondary:hover {
  background: #fef2f2;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Admin controls spacing */
#events-admin-controls {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

#events-admin-controls button {
  margin-right: 0.4rem;
}

/* ---- Home hero ---- */
.hero {
  max-width: 1000px;
  margin: 1.75rem auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-inner,
.hero-next-event {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  border: 1px solid #e1e1e6;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.hero h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}

.hero-subtitle {
  margin: 0;
  color: #4b5563;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-btn {
  text-decoration: none;
}

/* Next event card */
.hero-next-event {
  min-width: 0;
}

.chip {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #f3f4f6;
  color: #374151;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin: 0 0 0.5rem;
}

.next-event-meta {
  margin: 0.2rem 0 0.35rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.next-event-desc {
  margin: 0;
  font-size: 0.9rem;
}

/* Make hero side-by-side on larger screens */
@media (min-width: 768px) {
  .hero {
    flex-direction: row;
    align-items: stretch;
  }

  .hero-inner,
  .hero-next-event {
    flex: 1;
  }
}

/* Ensure .btn styles also work on links */
a.btn-primary,
a.btn-secondary {
  text-decoration: none;
}

/* ---- E-board public layout ---- */
.eboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1.3rem;
}

/* Each card */
.eboard-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e1e1e6;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
  position: relative;
}

/* Red accent bar on the left */
.eboard-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: #cc0000;
  opacity: 0.8;
}

/* Hover effect */
.eboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #d1d5db;
}

/* Avatar photo */
.eboard-photo {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #f3f4f6;
}

/* Text area next to the avatar */
.eboard-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
}

.eboard-role {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cc0000;
}

.eboard-school {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  color: #4b5563;
}

.eboard-bio {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #111827;
}

/* On very small screens, single column; on larger, 2 columns */
@media (min-width: 640px) {
  .eboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On wide screens, slightly larger avatars */
@media (min-width: 1024px) {
  .eboard-photo {
    width: 96px;
    height: 96px;
  }
}

/* ---- E-board socials ---- */
.eboard-socials {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.6rem;
}

.social-icon {
  width: 26px;
  height: 26px;
  display: inline-block;
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* IMPORTANT: paths are relative to /static/css/main.css */
.social-icon.instagram {
  background-image: url("../icons/instagram.png");
}

.social-icon.telegram {
  background-image: url("../icons/telegram.png");
}

.social-icon.linkedin {
  background-image: url("../icons/linkedin.png");
}

.social-icon.other {
  background-image: url("../icons/link.png");
}

/* ---- Events list layout ---- */
.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.2rem;
}

/* Event card */
.event-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e1e1e6;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease,
    border-color 0.12s ease;
}

/* Red accent bar on left side */
.event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: #cc0000;
  opacity: 0.85;
}

/* Hover */
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  border-color: #d1d5db;
}

/* Image at top */
.event-image-wrapper {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  background: #f3f4f6;
}

.event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content */
.event-content {
  padding: 0.9rem 1.1rem 1rem 1.1rem;
}

.event-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.event-meta {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  color: #4b5563;
}

.event-desc {
  margin: 0;
  font-size: 0.92rem;
  color: #111827;
}

/* On wider screens, use 2 columns */
@media (min-width: 768px) {
  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
