/* === HERO IMAGE === */
.events-hero {
  background-image: url('assets/media/CheetahsArusha (31 of 93).jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 50vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.events-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .events-hero {
    height: 40vh;
  }
}

/* === SECTION LAYOUT === */
.events-section {
  padding: 60px 40px;
  text-align: center;
}

.events-section h2 {
  font-size: 2.2em;
  color: var(--green);
  margin-bottom: 30px;
}

/* === POSTER BESIDE EVENT DETAILS === */
.event-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.event-poster-side {
  flex: 0 0 400px;
  max-width: 400px;
}

.event-poster-side img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.event-details {
  flex: 1;
  min-width: 300px;
}

/* === EVENT CARDS === */
.event-card {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 30px;
  margin-bottom: 30px;
  text-align: left;
}

.event-card h3 {
  color: #006400;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.event-card p {
  font-size: 1em;
  line-height: 1.6;
  color: #333;
}

/* === HIGHLIGHT CARDS === */
.highlight-card {
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.highlight-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.highlight-card h3 {
  color: #b8860b;
  font-size: 1.4em;
  margin-bottom: 10px;
}

.highlight-card p {
  font-size: 1em;
  color: #333;
  line-height: 1.6;
}

/* === COLLABORATIONS LIST === */
.events-section ul {
  list-style: none;
  padding: 0;
  max-width: 700px;
  margin: 0 auto;
}

.events-section ul li {
  background-color: #fcee30;
  margin: 10px 0;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 1em;
  color: #222;
  text-align: left;
}

/* === COUNTDOWN TIMER === */
.countdown-box {
  background-color: #fff8dc;
  padding: 20px;
  border-radius: 10px;
  margin: 30px auto;
  max-width: 600px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#countdown {
  display: flex;
  justify-content: space-around;
  font-size: 1.2em;
  margin-top: 10px;
  color: #006400;
}

#countdown span {
  background-color: var(--white);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* === FORM TOGGLE BUTTON === */
.form-toggle {
  text-align: center;
  margin: 40px 0 20px;
}

.btn-form {
  background-color: #fbc02d;
  color: #222;
  border: none;
  padding: 12px 20px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-form:hover {
  background-color: #e0b400;
}

/* === TEAM REGISTRATION FORM === */
.form-container {
  background-color: #e0f7f4;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  margin: 0 auto 60px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-container h3 {
  color: var(--green);
  margin-bottom: 20px;
  text-align: center;
}

.form-container form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-container input,
.form-container select,
.form-container textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.btn-submit {
  background-color: var(--green);
  color: var(--white);
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-submit:hover {
  background-color: #fbc02d;
  color: #222;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .events-section {
    padding: 40px 20px;
  }

  .event-layout {
    flex-direction: column;
    align-items: center;
  }

  .event-poster-side,
  .event-details {
    max-width: 100%;
  }

  .event-card,
  .highlight-card,
  .registration-form,
  .countdown-box,
  .form-container {
    padding: 20px;
  }

  .events-section h2 {
    font-size: 1.8em;
  }

  .event-card h3,
  .highlight-card h3 {
    font-size: 1.3em;
  }
}

:root {
    --green: #006400;
    --gold: #FFD700;
    --gray: #f0f0f0;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray);
    color: #333;
    padding-top: 120px;
}

.events-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h1 {
    color: var(--green);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-header h1 i {
    color: var(--gold);
    margin-right: 15px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* No Events State */
.no-events {
    background: white;
    padding: 80px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.no-events-icon {
    font-size: 5rem;
    color: var(--danger-color);
    margin-bottom: 30px;
    opacity: 0.8;
}

.no-events h2 {
    color: var(--green);
    margin-bottom: 15px;
    font-weight: 700;
}

.no-events .btn {
    background: var(--green);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
    margin-top: 15px;
}

.no-events .btn:hover {
    background: var(--gold);
    color: var(--green);
    border-color: var(--green);
}

.no-events p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.event-card {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.event-card-header {
    background: linear-gradient(135deg, var(--green) 0%, var(--gold) 100%);
    color: white;
    padding: 25px;
}

.event-date-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.event-card-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.event-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-description {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
    word-wrap: break-word;
}

/* Countdown Timer */
.countdown-section {
    background: linear-gradient(135deg, var(--green) 0%, var(--gold) 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-display {
  display: flex;
  gap: 10px;
  justify-content: space-around;
  font-family: 'Courier New', monospace;
}

.countdown-item {
  flex: 1;
  background: white;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border: 2px solid var(--gold);
}

.countdown-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
}

.countdown-unit {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
}

/* === ACTION BUTTONS === */
.event-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.event-card-actions button,
.event-card-actions a {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 0.9rem;
}

.btn-register {
  background: var(--green);
  color: white;
  border: 2px solid var(--gold);
}

.btn-register:hover {
  background: var(--gold);
  color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
  font-weight: 700;
}

.btn-details {
  background: rgba(0, 100, 0, 0.1);
  color: var(--gold);
  border: 2px solid var(--light-green);
  font-weight: 600;
}

.btn-details:hover {
  background: var(--gold);
  color: var(--green);
  transform: translateY(-2px);
  border-color: var(--gold);
  font-weight: 700;
}

/* === LOADING STATE === */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === NO EVENTS STATE === */
.no-events {
  background: white;
  padding: 80px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.no-events-icon {
  font-size: 5rem;
  color: #dc3545;
  margin-bottom: 30px;
  opacity: 0.8;
}

.no-events h2 {
  color: var(--green);
  margin-bottom: 15px;
  font-weight: 700;
}

.no-events .btn {
  background: var(--green);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
  margin-top: 15px;
}

.no-events .btn:hover {
  background: var(--gold);
  color: var(--green);
  border-color: var(--green);
}

.no-events p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* === EVENTS SECTION === */
.events-section {
  padding: 40px 20px;
  text-align: center;
}

.events-section h2 {
  color: var(--green);
  font-size: 2rem;
  margin-bottom: 20px;
}

.events-section ul {
  text-align: left;
  max-width: 600px;
  margin: 20px auto;
  padding-left: 20px;
}

.events-section li {
  margin-bottom: 10px;
  color: #555;
}

/* === HIGHLIGHT CARDS === */
.highlight-card {
  display: flex;
  gap: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  padding: 20px;
}

.highlight-card img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.highlight-card h3 {
  color: var(--green);
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.highlight-card p {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* === RESPONSIVE DESIGN === */

/* Mobile: ≤768px */
@media (max-width: 768px) {
  .events-hero {
    height: 35vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
  }

  .events-hero img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
  }

  .events-container {
    padding: 20px 15px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  .section-header {
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .section-header h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 0;
  }

  .event-card {
    flex-direction: column;
    margin-bottom: 20px;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease;
    text-align: center;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .event-card-header {
    padding: 10px 0;
    width: 100%;
    margin-bottom: 10px;
  }

  .event-card-title {
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--green);
    font-weight: 700;
  }

  .event-card-body {
    padding: 0;
    width: 100%;
    text-align: left;
  }

  .event-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
    text-align: justify;
    color: #555;
  }

  .event-image {
    width: 100%;
    height: auto;
    max-height: 220px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .event-details-and-image {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .event-details-and-image .event-image {
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .event-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .event-detail-item {
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .countdown-section {
    padding: 12px;
    margin-bottom: 15px;
  }

  .countdown-display {
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .countdown-item {
    padding: 6px 4px;
    min-width: 45px;
    flex: 1;
    max-width: 60px;
  }

  .countdown-value {
    font-size: 1rem;
  }

  .countdown-unit {
    font-size: 0.6rem;
  }

  .event-card-actions {
    gap: 8px;
    flex-direction: column;
  }

  .event-card-actions button,
  .event-card-actions a {
    min-width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
  }

  .no-events {
    padding: 40px 20px;
    margin: 0 10px;
  }

  .no-events-icon {
    font-size: 2.5rem;
  }

  .events-section {
    padding: 20px 15px;
    margin: 0;
  }

  .events-section h2 {
    font-size: 1.4rem;
  }

  .events-section ul {
    padding-left: 15px;
    margin: 15px 0;
  }

  .events-section li {
    font-size: 0.9rem;
    padding: 8px 12px;
    margin-bottom: 8px;
    word-wrap: break-word;
  }

  .highlight-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 15px;
    margin: 0 10px 20px;
    width: calc(100% - 20px);
    box-sizing: border-box;
  }

  .highlight-card img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
  }

  .highlight-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .highlight-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .events-hero {
    height: 50vh;
  }

  .events-container {
    max-width: 900px;
    padding: 30px 20px;
  }

  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .event-card-title {
    font-size: 1.8rem;
  }

  .event-image {
    height: 400px;
  }

  .countdown-display {
    gap: 8px;
  }

  .countdown-item {
    padding: 9px;
  }

  .countdown-value {
    font-size: 1.2rem;
  }

  .events-section {
    padding: 30px 20px;
  }

  .events-section h2 {
    font-size: 1.8rem;
  }

  .highlight-card {
    gap: 15px;
  }

  .highlight-card img {
    width: 180px;
    height: 135px;
  }
}

/* Desktop: ≥1025px */
@media (min-width: 1025px) {
  .events-hero {
    height: 60vh;
  }

  .events-container {
    max-width: 1200px;
    padding: 40px 20px;
  }

  .events-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
  }

  .event-card-title {
    font-size: 2rem;
  }

  .event-image {
    height: 450px;
  }

  .countdown-display {
    gap: 10px;
  }

  .countdown-item {
    padding: 10px;
  }

  .countdown-value {
    font-size: 1.3rem;
  }

  .events-section {
    padding: 40px 20px;
  }

  .events-section h2 {
    font-size: 2rem;
  }

  .highlight-card {
    gap: 20px;
  }

  .highlight-card img {
    width: 200px;
    height: 150px;
  }
}

/* === LAZY LOADING ANIMATION === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-card {
  animation: fadeIn 0.5s ease;
}
