/* style.css */

/* --- Global Styles & CSS Variables --- */
:root {
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* --- MODIFIED: New Blue Color Palette --- */
 --color-green-50: #f0fdf4;
  --color-green-100: #dcfce7;
  --color-green-200: #bbf7d0;
  --color-green-300: #86efac;
  --color-green-400: #4ade80;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;
  --color-green-800: #166534;
  --color-green-900: #14532d;
  --color-green-1200: #0f3b1e; 
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background-color: #FAF9FB; /* CORRECTED: This sets the default background to white */
  color: var(--color-gray-800);
}

.container {
  width: 90%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.hidden {
  display: none !important;
}


/* --- Header --- */
.site-header {
  background-color: var(--color-white);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar {
  background-color: var(--color-green-800); /* MODIFIED */
  color: var(--color-white);
  padding: 0.25rem 0;
}

.top-bar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.875rem;
  gap: 1rem;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.contact-icon {
  height: 0.75rem;
  width: 0.75rem;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 3rem;  /* MODIFIED: Reduced from 3.5rem to 3rem */
  height: 3rem; /* MODIFIED: Reduced from 3.5rem to 3rem */
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* This correctly scales the image to fit the container */
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin: 0;
}

/* --- Navigation Styles (Mobile First) --- */

.desktop-nav {
  display: none;
}

.mobile-menu-button {
  display: block;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-icon-svg {
  height: 1.5rem;
  width: 1.5rem;
}

.mobile-nav {
  display: flex; 
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border-top: 1px solid var(--color-gray-300);
  max-height: 0;
  opacity: 0;
  overflow: hidden; 
  pointer-events: none; 
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-nav.is-open {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out 0.1s;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  color: var(--color-gray-700);
}

.nav-link:hover {
  color: var(--color-green-700); /* MODIFIED */
  background-color: var(--color-green-50); /* MODIFIED */
}

.nav-link.active {
  color: var(--color-green-700); /* MODIFIED */
  background-color: var(--color-green-100); /* MODIFIED */
}

.mobile-nav .nav-link {
  font-size: 1rem;
  text-align: left;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.mobile-nav.is-open .nav-link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav.is-open .nav-link:nth-child(1) { transition-delay: 0.15s; }
.mobile-nav.is-open .nav-link:nth-child(2) { transition-delay: 0.20s; }
.mobile-nav.is-open .nav-link:nth-child(3) { transition-delay: 0.25s; }
.mobile-nav.is-open .nav-link:nth-child(4) { transition-delay: 0.30s; }
.mobile-nav.is-open .nav-link:nth-child(5) { transition-delay: 0.35s; }
.mobile-nav.is-open .nav-link:nth-child(6) { transition-delay: 0.40s; }
.mobile-nav.is-open .nav-link:nth-child(7) { transition-delay: 0.45s; }


/* --- Hero Section --- */
.hero-section {
  position: relative;
  color: var(--color-white);
  overflow: hidden;

  /* MODIFIED: Replaced the gradient with a background image */
  background-image: url('../assets/images/club.png');
  background-size: cover;
  background-position: center center;
}

/* --- NEW: Style for the blurred text container in the hero section --- */
.hero-text-box {
  background-color: rgba(81, 172, 111, 0.137); /* Semi-transparent dark blue */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* For Safari browser support */
  border-radius: 1rem; /* 16px */
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  margin-bottom: 4rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  display: block;
  color: var(--color-green-200); /* MODIFIED */
}

.hero-tagline {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--color-grey-100); /* MODIFIED */
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-grey-50); /* MODIFIED */
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.button {
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.button-primary {
  background-color: var(--color-green-600); /* MODIFIED */
  color: var(--color-white);
}

.button-primary:hover {
  background-color: var(--color-green-500); /* MODIFIED */
}

.button-secondary {
  border: 2px solid var(--color-green-300); /* MODIFIED */
  color: var(--color-green-100); /* MODIFIED */
}

.button-secondary:hover {
  background-color: var(--color-green-300); /* MODIFIED */
  color: var(--color-green-900); /* MODIFIED */
}

.button-icon {
  height: 1.25rem;
  width: 1.25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.stat-item {
  text-align: center;
}

.stat-icon-wrapper {
  background-color: rgba(49, 184, 83, 0.3); /* MODIFIED */
  border-radius: 9999px;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.stat-icon {
  height: 2rem;
  width: 2rem;
  color: var(--color-green-200); /* MODIFIED */
}

.stat-icon.why {
  height: 2rem;
  width: 2rem;
  color: var(--color-green-600); /* MODIFIED */
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-green-200); /* MODIFIED */
  margin: 0;
}

.stat-label {
  color: var(--color-green-100); /* MODIFIED */
  margin: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.section-footer {
    text-align: center;
}

.features-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}
.feature-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: box-shadow 0.3s, transform 0.2s ease-in-out;
}
.feature-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transform: scale(1.02);
}
.feature-icon-wrapper {
    background-color: var(--color-green-100); /* MODIFIED */
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--color-green-800);
}
.feature-icon {
    height: 2rem;
    width: 2rem;
    color: var(--color-green-600); /* MODIFIED */
}
.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.75rem;
}
.feature-description {
    color: var(--color-gray-600);
}

.news-section {
    padding: 4rem 0;
    background-color: var(--color-gray-50);
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.news-card {
    background-color: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s ease-in-out;
}
.news-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transform: scale(1.02);
}
.news-card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}
.news-card-content {
    padding: 1.5rem;
}
.news-card-meta {
    display: flex;
    align-items: center;
    color: var(--color-gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}
.news-card-icon {
    margin-right: 0.5rem;
}
.news-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 0.75rem;
}
.news-card-excerpt {
    color: var(--color-gray-600);
    margin-bottom: 1rem;
}
.news-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-green-600); /* MODIFIED */
    font-weight: 500;
    text-decoration: none;
}
.news-card-link:hover {
    color: var(--color-green-700); /* MODIFIED */
}

.site-footer {
    background-color: var(--color-green-900); /* MODIFIED */
    color: var(--color-white);
}
.footer-grid {
    padding-top: 3rem;
    padding-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer-contact-info, .quick-links, .social-links, .opening-hours-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.footer-icon {
    flex-shrink: 0;
    height: 1.25rem;
    width: 1.25rem;
    color: var(--color-green-400); /* MODIFIED */
}
.footer-subheading {
    font-weight: 500;
    margin-bottom: 0.75rem;
}
.social-links {
    flex-direction: row;
}
.footer-link, .social-link {
    color: var(--color-gray-300);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover, .social-link:hover {
    color: var(--color-green-400); /* MODIFIED */
}
.footer-bottom {
    border-top: 1px solid var(--color-gray-800);
    margin-top: 3rem;
    padding-block: 1rem;
    text-align: center;
    color: var(--color-gray-400);
    background-color: var(--color-green-1200);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- REMOVED this generic rule --- */
/* .hero-content > * { animation: fadeIn 0.8s ease-out forwards; } */

/* --- ADDED these specific rules for sequential animation --- */
.hero-text-box, .stat-item {
    opacity: 0;
    animation: fadeIn 0.7s ease-out forwards;
}

.hero-text-box {
    animation-delay: 0.1s;
}

.hero-stats .stat-item:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-stats .stat-item:nth-child(2) {
    animation-delay: 0.7s;
}

.hero-stats .stat-item:nth-child(3) {
    animation-delay: 0.9s;
}
/* --- End of animation changes --- */


/* --- Responsive Styles (Desktop) --- */
@media (min-width: 768px) { /* md breakpoint */
    .desktop-nav {
        display: flex;
        gap: 1.5rem;
    }
    .mobile-menu-button {
        display: none;
    }
    .mobile-nav {
        display: none !important; 
    }
    .hero-buttons {
        flex-direction: row;
    }
    .hero-title {
        font-size: 3.75rem;
    }
    .hero-tagline {
        font-size: 1.5rem;
    }
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .section-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- MODIFIED: Base Card Styling for the new .home-card --- */
.home-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--color-white);
    transition: 
      opacity 0.6s ease-out, 
      transform 0.6s ease-out, 
      box-shadow 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
}
.home-card.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.home-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}


/* --- MODIFIED: Staggered transition delay for the new .home-card --- */
#facilities .home-card.is-visible:nth-child(1) {
  transition-delay: 0.1s;
}
#facilities .home-card.is-visible:nth-child(2) {
  transition-delay: 0.2s;
}
#facilities .home-card.is-visible:nth-child(3) {
  transition-delay: 0.3s;
}
#facilities .home-card.is-visible:nth-child(4) {
  transition-delay: 0.4s;
}


.material-symbols-outlined {
    font-size: 2.1rem !important;
}

/* Removes the default underline from the new logo link */
.logo-link {
    text-decoration: none;
}

.custom-shape-divider-top-1751552247 {
    position: absolute;
    bottom: 0; /* UPDATED: This positions the divider at the bottom */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* REMOVED the rotate transform as it's no longer needed */
}

.custom-shape-divider-top-1751552247 svg {
    position: relative;
    display: block;
    width: calc(155% + 1.3px);
    height: 59px;
}

.custom-shape-divider-top-1751552247 .shape-fill {
    fill: #FFFFFF; /* This will fill the shape with white */
}

.footer-shape-divider {
    /* This negative margin pulls the shape up to overlap the section above it */
    margin-top: -1px;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* This flips the shape to curve downwards */
    transform: rotate(180deg);
}

.footer-shape-divider svg {
    position: relative;
    display: block;
    width: calc(141% + 1.3px);
    height: 100px;
    transform: rotate(180deg);
    height: 2rem;
}

.footer-shape-divider .shape-fill {
    /* This sets the color to match your dark green footer */
    fill: var(--color-green-900);
}

/* ADD this new class for the full-card anchor link */
a.news-card-anchor {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease-in-out;
}

/* ADD a hover effect for the new anchor */
a.news-card-anchor:hover {
    transform: scale(1.02);
}

.news-card-link-text {
    display: inline-flex;
    align-items: center;
    color: var(--color-green-600);
    font-weight: 500;
    text-decoration: none;
}

/* --- Equal Height Event Cards --- */

/* Ensure the anchor tag and the card within it fill the entire grid cell */
a.news-card-anchor,
.news-card {
    height: 100%;
}

/* We'll use Flexbox to control the layout of the card's content */
.news-card {
    display: flex;
    flex-direction: column;
}

.news-card-content {
    display: flex;
    flex-direction: column;
    /* This makes the content area grow to fill all available vertical space */
    flex-grow: 1;
}

.news-card-excerpt {
    /* This makes the description take up any extra empty space,
       pushing the link text down to the bottom of the card */
    flex-grow: 1;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

/* --- No Upcoming Events Card --- */
.no-events-card {
    background-color: var(--color-white);
    border-radius: 0.75rem; /* 12px */
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--color-green-200);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.07);
    transform: perspective(1000px) rotateX(0deg);
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease;
    /* Make it span all columns in the grid */
    grid-column: 1 / -1; 
    margin: 1rem auto; /* Center it */
    max-width: 500px;
}

.no-events-card:hover {
    transform: perspective(1000px) translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.no-events-icon {
    margin: 0 auto 1.5rem auto;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: var(--color-green-100);
    color: var(--color-green-700);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-events-icon svg {
    width: 2rem;
    height: 2rem;
}

.no-events-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-gray-800);
    margin: 0 0 0.75rem 0;
}

.no-events-text {
    color: var(--color-gray-600);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Sponsors Section --- */
.sponsors-section {
    padding: 4rem 0;
    background-color: var(--color-gray-50);
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap; /* Allows sponsors to wrap to the next line if there are many */
    justify-content: center; /* This centers the group of sponsors horizontally */
    align-items: center;
    gap: 2rem; /* The space between sponsor logos */
    margin-top: 3rem;
}

.sponsor-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px; /* A fixed height for uniform vertical alignment */
    padding: 1rem;
    background-color: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Sizing rules for responsiveness */
    flex-grow: 1; /* Allow the item to grow */
    flex-shrink: 1; /* Allow the item to shrink */
    flex-basis: 180px; /* Each item will have a base width */
    max-width: 220px; /* But won't grow larger than this */
}

.sponsor-logo-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.sponsor-logo {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.sponsor-logo-link:hover .sponsor-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Staggered Animation for Dynamic Sections --- */
.news-card-anchor,
.sponsor-logo-link {
    opacity: 0;
    visibility: hidden; /* Added to prevent interaction when invisible */
    transform: translateY(40px); /* Changed direction to slide up consistently */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    /* The fixed 'transition-delay' was removed from here */
}

.news-card-anchor.is-visible,
.sponsor-logo-link.is-visible {
    opacity: 1;
    visibility: visible; /* Added for consistency */
    transform: translateY(0);
}

/* --- Positioning for the sponsor logo on event cards --- */

/* Add position: relative to the content area so the logo can be positioned inside it */
.news-card-content {
    position: relative;
}

.event-sponsor {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 0.25rem;
    border-radius: 0.375rem; /* 6px */
    display: flex;
    align-items: center;
}

.event-sponsor img {
    height: 30px; /* Adjust size as needed */
    width: auto;
}