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

body {
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
    background: #f4f4f4;
    color: #222;
}

header {
    background: #1a1a2e;
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.8;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.parent-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.association-grid {
    border: #555, 1px;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin: 1.5rem 0 0.75rem;
}

.parent-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.parent-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.parent-header p {
    color: #555;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.15s,
        box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.card h3 {
    font-size: 1.25rem;
}

.card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Association page */
.back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.back-link:hover {
    color: white;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.header-content img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.header-content h1 {
    font-size: 2rem;
}

.header-content p {
    opacity: 0.85;
    max-width: 500px;
}

main section {
    margin-bottom: 3rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e0e0e0;
}

.section-heading h2 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-link {
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
}

.section-link:hover {
  color: #333;
}

main section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e0e0e0;
}

.event-card {
    align-items: flex-start;
    text-align: left;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.empty {
    color: #888;
    font-style: italic;
}

/* Navbar */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #222;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 1rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 200px;
  overflow: hidden;
  z-index: 200;
}

.nav-mobile-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: #333;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.nav-mobile-item:hover {
  background: #f5f5f5;
}

.nav-mobile-logout {
  color: #c0392b;
  border-top: 1px solid #eee;
}

.nav-login-desktop {
  display: inline-block;
}

.nav-profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #ccc;
  color: #555;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-profile-icon:hover {
  background: #f0f0f0;
  color: #222;
}

.nav-profile-icon svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-user-btn { display: none; }
  .nav-hamburger { display: flex; }
  .nav-login-desktop { display: none; }
}

#navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: #1a1a2e;
}

#nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-username {
    font-size: 0.9rem;
    color: #555;
}

.nav-btn {
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    background: none;
    border: 1px solid #ccc;
    cursor: pointer;
}

.nav-btn:hover {
    background: #f0f0f0;
}

.nav-btn-primary {
    background: #1a1a2e;
    color: white;
    border-color: #1a1a2e;
}

.nav-btn-primary:hover {
    background: #2a2a4e;
}

.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #333;
}

.nav-user-btn:hover {
    background: #f0f0f0;
}

.nav-chevron {
    font-size: 0.75rem;
    opacity: 0.6;
}

.nav-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 180px;
    overflow: hidden;
    z-index: 200;
}

.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.nav-dropdown-item:hover {
    background: #f5f5f5;
}

.nav-dropdown-logout {
    color: #c0392b;
    border-top: 1px solid #eee;
}

/* Auth forms */
.auth-form {
    max-width: 420px;
    margin: 3rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #1a1a2e;
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.auth-form button:hover {
    background: #2a2a4e;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

.success-msg {
    background: #dcfce7;
    color: #166534;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Event register button */
.event-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    width: 100%;
}

.btn-register {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: white;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn-register:hover {
    opacity: 0.85;
}

.btn-register.registered {
    background: white;
    border: 2px solid;
}

.btn-login-prompt {
    background: #e5e7eb;
    color: #555;
    font-weight: normal;
}

.reg-status {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Event detail page */
.event-detail {
    max-width: 640px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-detail-meta {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.meta-item {
    font-size: 0.95rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-detail-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

/* Membership */
.membership-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: default;
}

.membership-badge.approved {
    background: rgba(255,255,255,0.25);
    color: white;
}

.membership-badge.pending {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}

.membership-badge.rejected {
    background: rgba(255,0,0,0.2);
    color: rgba(255,255,255,0.8);
}

.membership-badge.join-btn {
    background: white;
    cursor: pointer;
}

.membership-badge.join-btn:hover {
    opacity: 0.9;
}

/* Week timeline */
.week-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.week-day {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ebebeb;
}

.week-day:last-child {
  border-bottom: none;
}

.week-day-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding-top: 0.1rem;
}

.week-day-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.05em;
}

.week-day-num {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.week-day-num-today {
  color: white;
}

.week-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.1rem 0;
}

.week-event {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-left: 3px solid;
  padding: 0.3rem 0.6rem;
  border-radius: 0 6px 6px 0;
  background: #f8f8f8;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.week-event:hover {
  background: #f0f0f0;
}

.week-event-time {
  font-size: 0.8rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.week-event-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
}

.week-empty {
  color: #ccc;
  font-size: 0.85rem;
  font-style: italic;
}

/* Dashboard */
.dashboard {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

.dashboard-subline {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.dashboard-assoc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assoc-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 2px solid;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: white;
  transition: opacity 0.15s;
}

.assoc-chip:hover {
  opacity: 0.75;
}

.assoc-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 780px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.assoc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.assoc-row:last-child {
  border-bottom: none;
}

.assoc-row:hover {
  opacity: 0.7;
}

.assoc-row img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #eee;
}

.news-assoc-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.related-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-card-assoc {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -0.25rem;
}

/* Landing page */
.landing-page {
  background: #1a1a2e;
  min-height: 100vh;
  color: white;
}

.landing-page #navbar {
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.landing-page .nav-logo {
  color: white;
}

.landing-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 52px);
  padding: 2rem;
  text-align: center;
}

.landing-content {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.landing-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: white;
}

.landing-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.landing-btn {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.landing-btn:hover {
  opacity: 0.85;
}

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

.landing-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

/* Association tabs */
#assoc-tabs {
  display: flex;
  gap: 0;
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 0 1.5rem;
  position: sticky;
  top: 49px;
  z-index: 90;
}

.assoc-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: #888;
  transition: color 0.15s;
}

.assoc-tab:hover {
  color: #333;
}

.assoc-tab.active {
  border-bottom-color: currentColor;
  color: #1a1a2e;
}

/* Events page filters */
.events-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
}

.filter-tab {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: white;
  font-size: 0.85rem;
  cursor: pointer;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.filter-tab:hover {
  background: #f0f0f0;
}

.filter-tab.active {
  background: #1a1a2e;
  color: white;
  border-color: #1a1a2e;
}

.event-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: -0.25rem;
}

/* News */
.news-item {
  background: white;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.news-header h3 {
  font-size: 1.05rem;
}

.news-date {
  font-size: 0.8rem;
  color: #999;
  white-space: nowrap;
}

.news-body {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}
