* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Quicksand", sans-serif;
  color: #333;
  background: #f9f9f9;
  line-height: 1.6;
}

/* Sticky Nav */
.sticky {
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1000;
  border-bottom: 1px solid #e0e0e0;
}

/* Navbar */
.nav-container {
  max-width: 1000px;
  margin: auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  height: 40px;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 600;
}

.donate-button {
  background-color: #f19783;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: bold;
}

/* Language toggle */
.language-toggle {
  margin-left: 1rem;
}

.language-toggle select {
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: white;
  font-family: "Quicksand", sans-serif;
}

/* Mega Menu */
.dropdown {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw; /* Prevent overflow */
  background-color: #f0f0f0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-top: 2px solid #f19783;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-sizing: border-box;
}

.dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-title {
  font-size: 1.1rem;
  font-weight: bold;
  padding-right: 2rem;
  min-width: 100px;
  white-space: nowrap;
}

.mega-items {
  display: grid;
  /* Updated for better organization, allows up to 3 columns if content fits */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-auto-rows: auto;
  gap: 1rem 2rem;
  max-width: 600px; /* Adjusted to potentially accommodate more columns */
}

.mega-items a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  white-space: nowrap;
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, #357a74, #f5d5cb);
  color: white;
text-align: center;
  padding: 2rem 1rem;
  opacity: 0; /* Initial state for animation */
  transition: opacity 0.5s ease, max-height 0.5s ease; /* Added max-height for smooth transition */
  max-height: 1300px; /* Default for the initial hero content */
  overflow: hidden;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.hero .years {
  font-size: 4rem;
  font-weight: 700;
  font-family: "Pacifico", cursive;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  display: inline-block;
  margin: 1rem 0;
}

.hero p {
  font-size: 1.3rem;
  line-height: 1.8;
}

.hero .highlight {
  font-style: italic;
  font-family: "Pacifico", cursive;
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Mission Section */
.mission {
  background: #fff;
  padding: 3rem 1rem;
  text-align: center;
}

.mission h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.mission p {
  max-width: 800px;
  margin: auto;
  font-size: 1.1rem;
  color: #555;
}

/* Footer */
.footer {
  background-color: #4c7c59;
  color: white;
  text-align: center;
  padding: 1rem 0.5rem;
  font-size: 0.9rem;
}

.footer a.facebook-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
}

.footer a.facebook-link i {
  background-color: #3b5998;
  padding: 0.5rem 0.6rem;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.footer a.facebook-link:hover i {
  background-color: #2d4373;
}

/* Event Sections (for dynamically loaded content) */
.event-section {
  font-family: 'Segoe UI', sans-serif;
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  color: #333;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Four items per row */
  gap: 30px;
}

.event-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.event-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.event-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-content h3 {
  color: #4c7c59;
  font-size: 1.3em;
  margin-bottom: 15px;
}

.event-content p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 15px;
  flex-grow: 1;
}

.event-content a.more-link {
  align-self: start;
  padding: 6px 14px;
  background-color: #4c7c59;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.event-content a.more-link:hover {
  background-color: #3a5e46;
}

/* Card Grid for Shokuiku Exchange Meeting (similar to event-grid but with different styling) */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: auto;
}

.card-content {
  padding: 20px;
}

.card h3 {
  margin-top: 0;
  color: #4c7c59;
  font-size: 1.2em;
}

.card p {
  font-size: 0.95em;
  line-height: 1.6;
  color: #333;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: #4c7c59;
  font-weight: bold;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 992px) { /* Adjust for 3 columns on medium screens */
  .event-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .language-toggle {
    margin-top: 1rem;
    margin-left: 0;
  }
  .mega-menu {
    flex-direction: column;
    padding: 1rem;
  }
  .mega-title {
    padding-bottom: 0.5rem;
  }
  .mega-items {
    grid-template-columns: 1fr; /* Single column on small screens */
    justify-items: flex-start;
    max-width: unset; /* Remove max-width on small screens */
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .event-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns on small screens */
  }
  .card-grid { /* For shokuiku-exchange-meeting.html */
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .mega-menu {
    display: none;
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 0;
  }
  
  .mega-menu.mobile-active {
    display: block;
  }
  
  .dropdown.open > a {
    color: #f19783; /* Your accent color */
  }
  
  .mega-title {
    font-size: 1.2rem;
    margin: 10px 0;
  }
  
  .mega-items {
    display: block;
  }
  
  .mega-items a {
    display: block;
    padding: 8px 15px;
    border-left: 3px solid #f19783;
    margin: 5px 0;
  }
  
  .language-toggle {
    display: none;
    width: 100%;
    padding: 15px;
  }
  
  .language-toggle.active {
    display: block;
  }
}
@media (max-width: 480px) { /* Adjust for 1 column on very small screens */
  .event-grid {
    grid-template-columns: 1fr;
  }
  .card-grid { /* For shokuiku-exchange-meeting.html */
    grid-template-columns: 1fr;
  }
}
/* General improvements for readability within About Us sections */
.about-content {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: 40px auto;
  max-width: 900px;
  line-height: 1.7;
  color: #333;
  font-family: 'Quicksand', sans-serif;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.about-content h1 {
  font-family: "Bitter", serif; /* Distinct font for main titles */
  color: #4c7c59;
  font-size: 2.5rem;
  margin-bottom: 25px;
  text-align: left;
}

.about-content h2.sub-heading {
  font-family: 'Quicksand', sans-serif;
  color: #6a8e7a;
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.about-content p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.about-content strong {
  color: #4c7c59;
}

/* Styling for lists */
.about-content .activity-list,
.about-content .service-list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.about-content .activity-list li,
.about-content .service-list li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

/* Image styling within About Us content */
.about-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Management Team Table Styling (moved from inline style) */
.executive-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #fff;
  font-family: 'Quicksand', sans-serif;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 20px;
}

.executive-table thead {
  background-color: #4c7c59;
  color: #fff;
}

.executive-table th,
.executive-table td {
  padding: 14px 20px;
  text-align: left;
  vertical-align: top;
}

.executive-table th {
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 15px;
}

.executive-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.executive-table tbody tr:hover {
  background-color: #eef5f0;
  transition: background-color 0.2s ease;
}

.executive-table td {
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

/* Social Media Links Styling */
.social-links {
  text-align: center;
  margin-top: 30px;
}

.social-icon {
  display: inline-block;
  font-size: 2.5rem;
  color: #4c7c59;
  margin: 0 15px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px);
  color: #3a5e46;
}


/* --- Responsive Design with Hamburger Menu --- */

/* Add a hamburger icon for mobile */
.hamburger-menu {
  display: none; /* Hidden by default */
  font-size: 2rem;
  color: #4c7c59;
  cursor: pointer;
  z-index: 1001; /* Ensure it's above other content */
}

/* Adjust header for mobile */
@media (max-width: 768px) {
  .nav-container {
    justify-content: space-between;
  }

  .nav-links {
    display: none; /* Hide regular menu by default */
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px; /* Adjust based on header height */
    left: 0;
    background-color: #f8f8f8; /* Light background for mobile menu */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #eee;
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex; /* Show when active */
  }

  .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  .nav-links li a {
    padding: 12px 20px;
    display: block;
    color: #333;
  }

  .nav-links li a:hover {
    background-color: #eef5f0;
  }

  .dropdown .mega-menu {
    position: static; /* Allow mega menu to flow naturally */
    width: 100%;
    box-shadow: none;
    border-top: none;
    padding: 0;
  }

  .dropdown:hover .mega-menu,
  .dropdown:focus-within .mega-menu {
    display: flex; /* Always show when parent is active/hovered */
    flex-direction: column;
    padding: 10px 0;
  }

  .mega-title {
    text-align: center;
    padding: 10px;
    background-color: #e0e0e0;
    margin-bottom: 10px;
  }

  .mega-items a {
    padding: 10px 20px;
    text-align: center;
  }

  .language-toggle {
    margin-top: 15px;
    text-align: center;
  }

  .hamburger-menu {
    display: block; /* Show hamburger icon */
    position: absolute;
    right: 20px;
    top: 15px;
  }

  /* Adjust hero section for smaller screens */
  .hero {
    padding: 60px 20px;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .artistic-number {
    font-size: 6rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  /* Adjust mission section for smaller screens */
  .mission {
    padding: 30px 20px;
  }

  .mission h2 {
    font-size: 2rem;
  }

  .mission p {
    font-size: 1rem;
  }

  /* Adjust footer for smaller screens */
  .footer {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .footer .facebook-link {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .artistic-number {
    font-size: 5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .about-content {
    padding: 20px;
  }

  .about-content h1 {
    font-size: 2rem;
  }

  .about-content h2.sub-heading {
    font-size: 1.5rem;
  }

  .executive-table th,
  .executive-table td {
    padding: 10px 15px;
    font-size: 13px;
  }
}