/* Global Styles */
:root {
  --primary-color: #17823b; /* Tennis green */
  --secondary-color: #f2cb05; /* Tennis ball yellow */
  --accent-color: #e74c3c; /* Energetic red accent */
  --dark-color: #2c3e50;
  --light-color: #f9f9f9;
  --white-color: #fff;
  --footer-bg: #121212; /* Dark footer background */
  --footer-text: #e0e0e0; /* Light text for footer */
  --transition: all 0.3s ease;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --header-height: 80px;
}

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

body {
  font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

section {
  padding: 100px 0;
  position: relative;
  overflow: hidden; /* Prevent content overflow */
  clear: both; /* Ensure no float issues between sections */
}

/* Fixed section margins to prevent overlap */
section + section {
  margin-top: 40px;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 60px;
  text-align: center;
  color: var(--primary-color);
  position: relative;
  font-weight: 700;
  letter-spacing: -0.5px;
  width: 100%; /* Ensure it takes full width */
  clear: both; /* Ensure no floating elements affect it */
}

h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 4px;
}

p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #555;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 14px 28px;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(23, 130, 59, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(23, 130, 59, 0.4);
}

.btn:hover::before {
  width: 100%;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
  margin-bottom: 30px;
}

/* Tennis-themed Background Elements */
.tennis-bg {
  position: absolute;
  opacity: 0.05;
  z-index: -1;
}

.tennis-ball {
  position: absolute;
  width: 300px;
  height: 300px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  filter: blur(150px);
}

/* Header */
header {
  background-color: var(--white-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
}

header.scrolled {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.95);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  height: var(--header-height);
  transition: height 0.3s ease;
}

header.scrolled .container {
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.logo img {
  width: 60px;
  margin-right: 15px;
  transition: var(--transition);
}

.logo h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
  transition: var(--transition);
  font-weight: 700;
}

header.scrolled .logo img {
  width: 50px;
}

header.scrolled .logo h1 {
  font-size: 1.6rem;
}

.menu {
  display: flex;
  flex-wrap: wrap;
}

.menu li {
  margin-left: 25px;
  margin-bottom: 5px;
  position: relative;
}

.menu a {
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

.menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.menu a:hover {
  color: var(--primary-color);
}

.menu a:hover::after {
  width: 100%;
}

/* Submenu Styles */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 10px 0;
  min-width: 180px;
  z-index: 10;
}

.has-submenu:hover .submenu {
  display: block;
  animation: fadeIn 0.3s ease;
}

.submenu li {
  margin: 0;
  padding: 0;
}

.submenu a {
  display: block;
  padding: 8px 20px;
  color: var(--dark-color);
  font-weight: 500;
  font-size: 0.9rem;
}

.submenu a:hover {
  background-color: rgba(23, 130, 59, 0.1);
}

.submenu a::after {
  display: none;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
  z-index: 1010;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('tennis-court.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--white-color);
  text-align: center;
  padding: 200px 0 150px;
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, transparent 100%);
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 4rem;
  margin-bottom: 30px;
  color: var(--white-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1.2s ease-out;
}

.hero h2::after {
  display: none;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--white-color);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1.5s ease-out;
}

.hero .btn {
  background-color: var(--secondary-color);
  color: var(--dark-color);
  font-weight: 700;
  padding: 15px 40px;
  animation: fadeInUp 1.8s ease-out;
  box-shadow: 0 4px 15px rgba(242, 203, 5, 0.4);
}

.hero .btn:hover {
  background-color: var(--white-color);
}












/* Content Wrapper to handle floating elements */
.content-wrapper {
  display: flow-root; /* Modern clearfix */
  margin-bottom: 60px;
}

/* Image Styles for Sections - Fixed */
.image-right {
  float: right;
  margin: 0 0 20px 30px;
  width: 40%;
  max-width: 450px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.4s ease;
  overflow: hidden;
  /* Ensure image is above text layer */
  position: relative;
  z-index: 1;
}

.image-right img {
  width: 100%;
  transition: transform 0.5s ease;
}

.image-right:hover img {
  transform: scale(1.05);
}

.image-left {
  float: left;
  margin: 0 30px 20px 0;
  width: 40%;
  max-width: 450px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.4s ease;
  overflow: hidden;
  /* Ensure image is above text layer */
  position: relative;
  z-index: 1;
}

.image-left img {
  width: 100%;
  transition: transform 0.5s ease;
}

.image-left:hover img {
  transform: scale(1.05);
}

/* Section content with text that wraps around images */
.section-content {
  margin-bottom: 40px;
  overflow: hidden; /* Contain floated elements */
}

/* Clear fix for floated images */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Section heading that needs to be clear of floats */
.section-heading {
  clear: both;
  text-align: center;
  margin: 60px 0 40px;
  padding-top: 20px;
  width: 100%;
}

/* Club Section */
.club-section {
  background-color: #f9f9f9;
  position: relative;
  clear: both;
}

.club-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

.club-content h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.club-content .feature-list {
  display: inline-block;
  text-align: left;
  margin: 0 auto;
}

.club-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.info-card {
  background-color: var(--white-color);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 4px solid transparent;
  text-align: left;
}

.info-card:hover {
  transform: translateY(-15px);
  border-bottom: 4px solid var(--primary-color);
}

.info-card h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 15px;
}

.info-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.info-card ul li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 25px;
}

.info-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-size: 1.5rem;
  line-height: 1;
}

/* Feature List Styling */
.feature-list li {
  margin-bottom: 20px;
  position: relative;
  padding-left: 35px;
  font-size: 1.1rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  background-color: var(--secondary-color);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Teams Section */
.teams-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

.teams-content p {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.teams-content .feature-list {
  display: inline-block;
  text-align: left;
  margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
  background-color: #f9f9f9;
  position: relative;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: default; /* Change from cursor: pointer */
    pointer-events: none; /* Disable pointer events on the image */
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
/* Make the article have pointer events for scrolling and text selection */
.gallery-article {
    pointer-events: auto;
    background-color: var(--white-color);
    padding: 25px;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    display: block; /* Make articles visible by default */
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover::before {
  opacity: 0;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.active {
  opacity: 1;
  visibility: visible;
}

.gallery-modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.gallery-modal.active .gallery-modal-content {
  transform: scale(1);
}

.gallery-modal img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-modal-close:hover {
  color: var(--secondary-color);
  transform: rotate(90deg);
}

/* Contact Section */
.contact-section {
  background-color: #fff;
  position: relative;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.contact-card {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  text-align: center;
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.contact-card p {
  color: #666;
  margin-bottom: 10px;
}

.contact-form {
  margin-top: 50px;
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(23, 130, 59, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Tennis Divider */
.tennis-divider {
  height: 50px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100"><path fill="%23f2cb05" d="M0,50 C200,100 400,0 600,50 C800,100 1000,0 1200,50 C1400,100 1440,50 1440,50 L1440,100 L0,100 Z"></path></svg>') no-repeat;
  background-size: cover;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 70px 0 30px;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo img {
  width: 80px;
  max-height: 80px;
  margin-bottom: 20px;
}

.footer-logo h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--white-color);
}

.footer-logo p {
  color: #aaa;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 15px;
}
.gallery-article {
    background-color: var(--white-color);
    padding: 25px;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.gallery-article h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.gallery-article p {
    color: #555;
    line-height: 1.6;
}


.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white-color);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: var(--white-color);
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary-color);
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  color: #aaa;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

.footer-links ul li a::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  transition: all 0.3s ease;
}

.footer-links ul li a:hover {
  color: var(--white-color);
  padding-left: 20px;
}

.footer-links ul li a:hover::before {
  color: var(--secondary-color);
}

.footer-contact p {
  color: #aaa;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

.footer-contact i {
  margin-right: 15px;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #777;
  font-size: 0.9rem;
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Section Animation Classes */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
  section {
    padding: 80px 0;
  }
  
  h2 {
    font-size: 2.4rem;
  }
  
  .hero h2 {
    font-size: 3.2rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .info-card:hover {
    transform: translateY(-10px);
  }
  
  .image-right,
  .image-left {
    width: 45%;
  }
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
  
  h2 {
    font-size: 2rem;
    margin-bottom: 40px;
  }
  
  header .container {
    position: relative;
  }
  
  .logo {
    margin-bottom: 0;
  }
  
  .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 999;
  }
  
  .menu li {
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid #eee;
  }
  
  .submenu {
    position: static;
    box-shadow: none;
    display: none;
    background-color: #f5f5f5;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
  }
  
  .has-submenu.active .submenu {
    display: block;
  }
  
  .menu.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero {
    padding: 150px 0 100px;
  }
  
  .hero h2 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .image-right,
  .image-left {
    float: none;
    width: 100%;
    margin: 0 0 30px 0;
  }
  
  /* Ensure section headings are clear on mobile */
  .section-heading {
    margin-top: 40px;
  }
}

@media (max-width: 576px) {
  section {
    padding: 60px 0;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}


