body {
  font-family: 'Titillium Web', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #e0e0e0;
  color: #333;
}
.header-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  height: 38px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
body.mobile .header-banner {
  justify-content: flex-start;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  width: 100%;
  max-width: 1200px;
}
body.mobile .header-content {
  justify-content: space-between;
  flex: 1;
  max-width: none;
}
.header-content #mobile-nav-toggle {
  background: none;
  border: none;
  color: #a4c639;
  font-size: 1.5rem;
  cursor: pointer;
}
.logo {
  max-width: 70px;
  position: relative;
  z-index: 1001;
  margin-top: 30px;
}
nav {
  display: flex;
  gap: 15px;
  align-items: center;
}
nav a {
  color: #a4c639;
  text-decoration: none;
  font-size: 12.6px;
  font-weight: bold;
  text-transform: uppercase;
  transition: 0.3s;
  position: relative;
}
nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

#mobile-login-link {
  color: #a4c639;
  text-decoration: none;
  font-size: 12.6px;
  font-weight: bold;
  text-transform: uppercase;
  transition: 0.3s;
  position: relative;
}

#mobile-login-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

#mobile-user-name {
  color: #a4c639;
  text-decoration: none;
  font-size: 12.6px;
  font-weight: bold;
  text-transform: uppercase;
  position: relative;
}
.content-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: 50px 0;
  width: 76.5%;
  margin: auto;
  margin-top: 80px; /* adds space below the fixed nav */
}


.side-column {
  width: 13.5%;
  background: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


.main-content {
  width: 54%;
}

body.mobile .content-wrapper,
body.mobile .main-content {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

body.mobile .content-wrapper {
  flex-direction: column;
  align-items: center;
}

body.mobile .side-column {
  width: 100%;
  margin-bottom: 20px;
}

body.mobile .main-content {
  width: 100%;
}
.section {
  background: white;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  margin-bottom: 40px;
}
.section-title {
  font-size: 30.6px;
  font-weight: bold;
  border-bottom: 5px solid #a4c639;
  padding-bottom: 12px;
  text-transform: uppercase;
}
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}
.news-card {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 25px 0;
  font-size: 18px;
  margin-top: 50px;
}
.footer-sponsors {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-sponsors img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.footer-sponsors img:hover {
  transform: scale(1.05);
}
.sidebar-title {
  font-size: 1.2em;
  margin-bottom: 10px;
  text-transform: uppercase;
  border-bottom: 2px solid #a4c639;
  padding-bottom: 5px;
}

.tourney-schedule {
  list-style-type: none;
  padding-left: 0;
  font-size: 0.9em;
  line-height: 1.4em;
  color: #333;
}

.event-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.7em;
  font-weight: bold;
  border-radius: 4px;
  vertical-align: middle;
  color: white;
  animation: fadeIn 0.4s ease-in-out;
}

.event-tag.today {
  background-color: #e67e22; /* orange */
}

.event-tag.next {
  background-color: #2980b9; /* blue */
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.event-countdown {
  font-size: 0.8em;
  font-weight: normal;
  color: #666;
  margin-left: 10px;
}

.next-up-highlight {
  border: 2px solid #a4c639;
  background-color: #f4f9ec;
  padding: 8px;
  border-radius: 6px;
  font-weight: bold;
}


.event-tag.today {
  background-color: #e67e22;
  color: #fff;
  padding: 2px 6px;
  font-size: 0.75em;
  border-radius: 4px;
  margin-left: 8px;
}

.next-up-highlight {
  border: 2px solid #a4c639;
  background-color: #f4f9ec;
  padding: 8px;
  border-radius: 6px;
  font-weight: bold;
  position: relative;
}

.next-label {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 6px;
  background-color: #a4c639;
  color: white;
  font-size: 0.7em;
  font-weight: bold;
  border-radius: 4px;
  vertical-align: middle;
}
.event-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


.next-label {
  background-color: #f4f9ec;
  color: #000;
  padding: 4px 8px;
  border: 1px solid #a4c639;
  font-size: 0.75em;
  border-radius: 6px;
  margin-left: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-sponsor, .sidebar-sponsor-right {
  text-align: center;
  margin-top: 10px;
}

.sidebar-sponsor img,
.sidebar-sponsor-right img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.sidebar-sponsor img:hover {
  transform: scale(1.05);
}


@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sidebar-sponsor {
  text-align: center;
  min-height: 100px;
  position: relative;
}

.sidebar-sponsor img {
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.sidebar-sponsor img:hover {
  transform: scale(1.05);
}

.fade-out {
  animation: fadeOut 0.5s forwards;
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rss-section {
  padding: 1em;
  background: #f8f8f8;
  border-radius: 8px;
}

.rss-cards {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.rss-card {
  display: flex;
  gap: 1em;
  align-items: flex-start;
  background: white;
  padding: 1em;
  border-radius: 8px;
  border-left: 5px solid #2e7d32;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative; /* Add this just in case stacking matters */
}

.rss-thumbnail {
  width: 120px;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  z-index: 10;            /* Force it above content */
  background: white;      /* Optional: gives it a box if it’s overlapping text */
}



.rss-card-content {
  flex: 1;
}

.rss-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #2e7d32;
  text-decoration: none;
}

.rss-title:hover {
  text-decoration: underline;
}

.rss-date {
  font-size: 0.85em;
  color: #777;
  margin: 0.25em 0;
}

.rss-snippet {
  font-size: 0.95em;
  color: #333;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.standings-table th,
.standings-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.standings-table thead {
  background-color: #f4f4f4;
  font-weight: bold;
}


tr.gold { background-color: #fff8dc; font-weight: bold; }
tr.silver { background-color: #f0f0f0; }
tr.bronze { background-color: #fdf5e6; }

.module.white-box {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.shadow-box {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.module-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2e7d32;
}

.highlight-score {
  background-color: #e0f7e9;
  font-weight: bold;
  color: #000; /* black text */
}

.sidebar-box select {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  margin-top: 0.5em;
}

.event-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.event-item {
  margin-bottom: 12px;
  font-size: 0.95em;
  line-height: 1.3;
}

.tourney-schedule-label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25rem;
}

.tourney-schedule-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
}
.tournament-table {
  width: 100%;
  border-collapse: separate;
  margin-top: 1rem;
  font-size: 14px;
}

.tournament-table th,
.tournament-table td {
  border: none;
  padding: 12px;
  text-align: center;
}

.tournament-table th {
  background-color: #f0f0f0;
}

.tournament-table tr:nth-child(even) {
  background-color: #f9f9f9;
}
.club-link {
  color: #000000; /* black by default */
  text-decoration: none;
  font-size: 13.6px;
  font-weight: bold;
  text-transform: uppercase;
  transition: 0.3s;
}

.club-link:hover {
  color: #a4c639; /* green on hover */
  text-decoration: underline;
}
/* Modal Background */
#photoModal {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Image */
#modalImage {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.9s ease;
}

/* Close button */
#closeModal {
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
#closeModal:hover {
  color: #a4c639;
}

/* Prev / Next Buttons */
#prevButton, #nextButton {
  background-color: #a4c639;
  border: none;
  color: white;
  padding: 10px 18px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 5px;
  z-index: 10; /* 🔥 Force them ABOVE modal image */
  position: relative;
  transition: background-color 0.9s ease;
}
#prevButton:hover, #nextButton:hover {
  background-color: #89a52d;
}
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-content img {
  max-width: 90vw;
  max-height: 60vh;
  margin-bottom: 10px;
  border-radius: 8px;
}

.modal-buttons {
  position: absolute;
  bottom: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 20px;
}
.modal-buttons button {
  background-color: rgba(164, 198, 57, 0.9); /* your green with slight transparency */
}
.pagination {
  margin-top: 2rem;
  text-align: center;
}
.pagination a {
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pagination-top a {
  font-weight: bold;
  margin-left: 1rem;
}
.pagination-top {
  margin-bottom: 1rem;
}
.next-event {
  border: 2px solid #a4c639;
  padding: 5px;
  background-color: #f9fff9;
}

.next-box {
  font-size: 0.85em;
  background-color: #a4c639;
  color: white;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}
/* Pre-signup table tweaks */
.pre-signup-table td:nth-last-child(1),
.pre-signup-table th:nth-last-child(1) {
  white-space: nowrap;
  width: 1%;
}

/* Allow horizontal scrolling within tables */
.standings-table,
.tournament-table,
.pre-signup-table {
  overflow-x: auto;
}



/* Wider mobile layout */
@media (max-width: 900px) {
  .content-wrapper,
  .main-content {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Responsive tables for small screens */
@media (max-width: 600px) {
  .standings-table,
  .tournament-table,
  .pre-signup-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .standings-table th, .standings-table td,
  .tournament-table th, .tournament-table td,
  .pre-signup-table th, .pre-signup-table td {
    padding: 6px;
  }

  .content-wrapper,
  .main-content {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .section {
    padding: 20px;
  }

  .tourney-schedule {
    font-size: 1rem;
  }

  .tourney-schedule li {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 400px) {
  .standings-table,
  .tournament-table,
  .pre-signup-table {
    font-size: 0.7rem;
  }

  .standings-table th, .standings-table td,
  .tournament-table th, .tournament-table td,
  .pre-signup-table th, .pre-signup-table td {
    padding: 4px;
  }
}
.nav-mobile {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 1rem 0;
}

.nav-mobile a {
  color: #a4c639;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  position: relative;
}

#mobile-nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 250px;
  background: #333;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 60px 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1002;
}
#mobile-nav-menu.open {
  transform: translateX(0);
}
#mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1001;
}
#mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

body.mobile .content-wrapper {
  margin-top: 70px;           /* adjust spacing below the fixed header */
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #fff;
  background-color: #dc3545;
  border-radius: 0.5rem;
}

nav a .badge,
.nav-mobile a .badge {
  position: absolute;
  top: -6px;
  right: -10px;
}

.bg-primary {
  background-color: #0d6efd;
}

/* Messaging layout */
.messaging-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  background-color: #fff;
}

.messaging-container .inbox-thread {
  display: flex;
  gap: 1rem;
  flex-direction: row;
}

.messaging-container .inbox {
  flex: 1;
  border: 1px solid #ddd;
  padding: 1rem;
  background-color: #f9f9f9;
  border-right: 1px solid #ccc;
  border-radius: 8px;
}

.messaging-container .thread {
  flex: 2;
  border: 1px solid #ddd;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

#thread-messages {
  max-height: 60vh;      /* adjust as needed */
  overflow-y: auto;
  flex-grow: 1;
}

/* Stack inbox and thread vertically on small screens */
@media (max-width: 768px) {
  .messaging-container .inbox-thread {
    flex-direction: column;
  }
  .messaging-container .inbox,
  .messaging-container .thread {
    flex: none;
    width: 100%;
    border-radius: 8px;
  }
  .messaging-container .inbox {
    border-right: none;
    border-bottom: 1px solid #ccc;
  }
}

/* Message bubbles */
.message {
  max-width: 70%;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
}

.message p {
  margin: 0;
}

.message.sent {
  background-color: #a4c639;
  color: #fff;
  margin-left: auto;
  text-align: right;
}

.message.received {
  background-color: #f1f1f1;
  margin-right: auto;
}

.message-meta {
  display: flex;
  gap: 4px;
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.message.sent .message-meta {
  justify-content: flex-end;
}

.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007bff;
  margin-left: 4px;
}

/* Search dropdown */
.search-bar {
  position: relative;
}

#search-results-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

#search-results-container ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#search-results-container li {
  padding: 8px 12px;
  cursor: pointer;
}

#search-results-container li:hover,
#search-results-container li.active {
  background-color: #f0f0f0;
}

#search-results-container a {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* Message textarea styling */
#message-body {
  width: 100%;
  height: 150px;
  resize: none;
  border-radius: 8px;
}

.btn, .btn-primary {
  background-color: #a4c639;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.btn:hover,
.btn-primary:hover {
  background-color: #89a52d;
}

@keyframes navMessageFlash {
  0%, 100% {
    color: #a4c639;
  }
  50% {
    color: #ffffff;
  }
}

.nav-message-flash {
  animation: navMessageFlash 1s infinite;
}

