/* Style for the page introduction text */
.page-description {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  max-width: 80ch; /* Limits the line length for better readability */
  margin: 0 auto 3rem auto; /* Centers the text block and adds space below */
  color: #333; /* A dark grey for the main text */
}

/* --- Key People Card Styles --- */

.key-people-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; /* Allows cards to stack on smaller screens */
  margin-bottom: 3rem;
}

.key-person-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--color-green-100); /* CHANGED: Was --color-green-50 */
  padding: 1.5rem;
  border-radius: 0.75rem; /* 12px */
  border: 1px solid var(--color-green-200);
  min-width: 300px;
  flex: 1;
  max-width: 350px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.key-person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.key-person-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
  color: var(--color-green-700);
  border-radius: 50%;
  border: 2px solid var(--color-green-700);
}

.key-person-icon svg {
    width: 2rem;
    height: 2rem;
}

.key-person-details {
  text-align: left;
}

.key-person-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  color: var(--color-green-800);
  font-weight: 500;
}

.key-person-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

/* --- Page Content Animations --- */

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Generic Content Section Styles --- */

.content-section {
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.content-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-gray-800);
    margin-bottom: 1.5rem;
    text-align: center;
}


/* --- Committee Card Grid Styles --- */

.committee-grid {
    display: grid;
    /* This creates a responsive grid that fits as many cards as possible per row */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.committee-member-card {
    background-color: var(--color-green-100); /* CHANGED: Was --color-white */
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.09);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.committee-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.member-role {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-green-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.member-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-800);
}

/* --- Events Section & Vertical Timeline Styles --- */
.events-section {
    background-color: transparent;
    padding: 2rem 1.5rem;
    margin-top: 0rem;
    margin-bottom: 5rem;
    border-radius: 8px;
}

.vertical-timeline {
    position: relative; /* Establishes a positioning context for the ::before pseudo-element */
    border-left: 3px solid var(--color-green-200);
    padding-left: 2rem; /* Creates space for the content */
    max-width: 500px;
    margin: 2rem auto 0 auto;
}

.timeline-event {
    position: relative; /* Establishes a positioning context for its own dot */
    padding-bottom: 2rem;
}

/* The final event shouldn't have extra space at the bottom */
.timeline-event:last-child {
    padding-bottom: 0;
}

/* The circular dot on the timeline */
.timeline-event::before {
    content: '';
    position: absolute;
    /* Move the dot leftwards to sit on top of the parent's border */
    left: -44px; /* (padding-left + half of parent's border-width + half of own width) -> 32px + 1.5px */
    top: 0px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 3px solid var(--color-green-700);
}

.event-date {
    font-weight: 600;
    color: var(--color-green-800);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-gray-800);
}

/* Style for past events */
.timeline-event.is-past {
    opacity: 0.7;
}

.timeline-event.is-past .event-name {
    text-decoration: line-through;
    color: var(--color-gray-500);
}

.timeline-event.is-past::before {
    background-color: var(--color-gray-300);
    border-color: var(--color-gray-500);
}

/* --- Desktop Layout: Simple Horizontal Row of Cards --- */
@media screen and (min-width: 992px) {
    .vertical-timeline {
        /* On desktop, the container becomes a flex row */
        display: flex;
        gap: 1rem; /* Space between cards */
        border-left: none; /* Remove the vertical line */
        padding-left: 0;
        padding-top: 1rem;
        max-width: none;
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        padding-bottom: 1rem; /* Space for scrollbar */
    }

    .timeline-event {
        /* Each event is now a card */
        flex: 0 0 180px; /* Cards will be 180px wide, no growing/shrinking */
        padding: 1.5rem 1rem;
        padding-bottom: 1.5rem; /* Override bottom padding */
        background-color: var(--color-white);
        border-radius: 0.5rem;
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;

        /* ADDED: A bolder border for future events */
        border: 2px solid var(--color-green-300);
        /* ADDED: The subtle box shadow */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .timeline-event:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

    .timeline-event::before {
        /* Hide the dot on desktop, it's not needed for this card layout */
        display: none;
    }

    /* ADDED: A specific grey border for past events */
    .timeline-event.is-past {
        border-color: var(--color-gray-400);
    }

    .event-date {
        font-size: 1rem;
    }

    .event-name {
        font-size: 1rem;
    }
}

/* --- Clickable Event Styles --- */

.timeline-event.is-clickable {
    cursor: pointer;
}

.timeline-event.is-clickable:hover {
    /* Make the dot slightly bigger on hover */
    &::before {
        transform: scale(1.3);
    }
    /* Make the text slightly bolder */
    .event-name {
        color: var(--color-green-800);
        font-weight: 600;
    }
}

/* --- Timeline Note Style --- */
.timeline-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray-600);
    max-width: 450px;
    margin: -1rem auto 2rem auto; /* Use negative top margin to pull it closer to the title */
    padding: 0.5rem 1rem;
    background-color: var(--color-white);
    border-radius: 0.5rem;
    border: 1px solid var(--color-green-200);
}

/* --- Competition Results Section Styles --- */
.results-section {
    background-color: var(--color-green-900);
    padding: 1rem 1.5rem;
    margin-top: 4rem;
    border-radius: 8px;
    margin-bottom: 5rem;
}

/* Make the title white on the dark background */
.results-section .content-subtitle {
    color: var(--color-white);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.result-card {
    background-color: var(--color-green-800);
    border: 1px solid var(--color-green-700);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: opacity 0.5s ease, transform 0.5s ease; /* ADD THIS LINE */
}

.competition-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-green-700);
}

.result-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.result-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-green-900);
}

.result-icon.gold {
    color: #ffd700;
}

.result-icon.silver {
    color: #c0c0c0;
}

.result-details {
    display: flex;
    flex-direction: column;
}

.result-label {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--color-gray-300);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-names {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-white);
}

/* --- Tab Control Styles for Results --- */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-green-700);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-50);
    opacity: 0.5;
    background-color: transparent;
    border: none;
    border-radius: 10px 10px 0px 0px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(1px); /* Aligns with the container's bottom border */
}

.tab-button:hover {
    background-color: var(--color-green-800);
    color: var(--color-white);
}

.tab-button.is-active {
    color: var(--color-white);
    border-bottom-color: var(--color-green-400);
    opacity: 1;
}

.tab-panel {
    display: none; /* Hide all panels by default */
    animation: fadeIn 0.5s ease;
}

.tab-panel.is-active {
    display: block; /* Show only the active panel */
}

/* A simple fade-in animation for the panels */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Style for Vacant Committee Cards --- */

.committee-member-card.is-vacant {
    background-color: var(--color-gray-100);
    border-color: var(--color-gray-200);
}

.committee-member-card.is-vacant .member-role {
    color: var(--color-gray-500);
}

.committee-member-card.is-vacant .member-name {
    color: var(--color-gray-400);
    font-style: italic;
    font-weight: 500;
}

/* Optional: Disable the hover effect for vacant cards */
.committee-member-card.is-vacant:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

#ladies-events-timeline {
  /* Adjust the value to match your header's height */
  scroll-margin-top: 6rem; 
}