:root {
   --primary: #2E7D32;
   --accent: #F4A261;
   --bg-light: #F5F5F5;
   --text-dark: #333;
}

body.dark-mode {
   --bg-light: #121212;
   --text-dark: #EEE;
}

body {
   margin: 0;
   font-family: 'Merriweather', serif;
   background: var(--bg-light);
   color: var(--text-dark);
   line-height: 1.6;
}

.container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 1rem;
}

.navbar {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 1rem;
   background: white;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
   position: sticky;
   top: 0;
   z-index: 100;
}

body.dark-mode .navbar {
   background: #1E1E1E;
}

.logo {
   font-family: 'Lato', sans-serif;
   font-size: 1.5rem;
   color: var(--primary);
}

.nav-links {
   display: flex;
   list-style: none;
   gap: 1rem;
}

.nav-links a {
   text-decoration: none;
   color: var(--text-dark);
   transition: color 0.3s;
}

.nav-links a:hover {
   color: var(--accent);
}

.search-bar {
   display: flex;
   align-items: center;
   background: #EEE;
   padding: 0.5rem;
   border-radius: 20px;
}

body.dark-mode .search-bar {
   background: #333;
}

.search-bar input {
   border: none;
   background: transparent;
   outline: none;
}

#theme-toggle {
   background: none;
   border: none;
   cursor: pointer;
   font-size: 1.2rem;
}

.hero {
   background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/libary.jpg');
   
   background-size: cover;
   height: 60vh;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   color: white;
}

.hero-content h1 {
   font-family: 'Lato', sans-serif;
   font-size: 3rem;
}

.cta-btn {
   background: var(--primary);
   color: white;
   padding: 1rem 2rem;
   text-decoration: none;
   border-radius: 5px;
   transition: background 0.3s;
}

.cta-btn:hover {
   background: var(--accent);
}

.features {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
   gap: 2rem;
   padding: 2rem;
}

.feature-card {
   background: white;
   padding: 1rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   transition: transform 0.2s;
}

body.dark-mode .feature-card {
   background: #1E1E1E;
}

.feature-card:hover {
   transform: scale(1.05);
}

.stats {
   display: flex;
   justify-content: center;
   gap: 2rem;
   padding: 2rem;
   text-align: center;
}

.stat-item h3 {
   font-size: 2.5rem;
   color: var(--primary);
}

.newsletter {
   text-align: center;
   padding: 2rem;
   background: var(--primary);
   color: white;
}

.newsletter form {
   display: flex;
   justify-content: center;
   gap: 1rem;
}

.newsletter input {
   padding: 0.5rem;
   border: none;
   border-radius: 5px;
}

.newsletter button {
   background: var(--accent);
   color: white;
   border: none;
   padding: 0.5rem 1rem;
   cursor: pointer;
   border-radius: 5px;
}

footer {
   text-align: center;
   padding: 1rem;
   background: var(--primary);
   color: white;
}

.back-to-top {
   position: fixed;
   bottom: 1rem;
   right: 1rem;
   background: var(--accent);
   color: white;
   padding: 0.5rem;
   border-radius: 50%;
   display: none;
}

.intro,
.mission {
   padding: 3rem 0;
   text-align: center;
}

.timeline {
   padding: 3rem 0;
   background: var(--bg-light);
   position: relative;
}

body.dark-mode .timeline {
   background: #1E1E1E;
}

.timeline::before {
   content: '';
   position: absolute;
   left: 50%;
   top: 0;
   bottom: 0;
   width: 2px;
   background: var(--primary);
   transform: translateX(-50%);
}

.timeline-items {
   display: flex;
   flex-direction: column;
   gap: 2rem;
   position: relative;
}

.timeline-item {
   display: flex;
   align-items: center;
   margin: 1rem 0;
}

.timeline-item:nth-child(even) {
   flex-direction: row-reverse;
}

.timeline-dot {
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: var(--accent);
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   z-index: 1;
}

.timeline-content {
   background: white;
   padding: 1rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   width: 45%;
   margin: 0 1rem;
}

body.dark-mode .timeline-content {
   background: #1E1E1E;
}

.timeline-item:nth-child(even) .timeline-content {
   margin-left: 2rem;
}

.timeline-item:nth-child(odd) .timeline-content {
   margin-right: 2rem;
}

.mission-stats {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   gap: 2rem;
   margin-top: 2rem;
}

.stat {
   text-align: center;
   padding: 1rem;
}

.stat i {
   font-size: 2rem;
   color: var(--accent);
}

.team {
   padding: 3rem 0;
}

.team-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
   gap: 2rem;
}

.team-card {
   background: white;
   padding: 1.5rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   text-align: center;
   transition: transform 0.3s;
}

body.dark-mode .team-card {
   background: #1E1E1E;
}

.team-card:hover {
   transform: translateY(-5px);
}

.team-card img {
   width: 100px;
   height: 100px;
   border-radius: 50%;
   object-fit: cover;
   margin-bottom: 1rem;
}

.team-card a {
   color: var(--primary);
   text-decoration: none;
}

.blog,
.contact,
.resources,
.events {
   padding: 3rem 0;
}

.blog-layout,
.contact-layout {
   display: grid;
   grid-template-columns: 2fr 1fr;
   gap: 3rem;
   margin-bottom: 2rem;
}

.blog-posts {
   display: grid;
   gap: 2rem;
}

.blog-card {
   background: white;
   border-radius: 8px;
   overflow: hidden;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   transition: transform 0.3s;
}

body.dark-mode .blog-card {
   background: #1E1E1E;
}

.blog-card:hover {
   transform: translateY(-3px);
}

.blog-card img {
   width: 100%;
   height: 200px;
   object-fit: cover;
}

.blog-meta {
   display: flex;
   justify-content: space-between;
   padding: 1rem;
   font-size: 0.9rem;
   color: #666;
}

.blog-card h2 {
   padding: 0 1rem;
   margin: 0.5rem 0;
}

.blog-card p {
   padding: 0 1rem;
   margin: 0 0 1rem;
}

.read-more {
   display: inline-block;
   padding: 0 1rem 1rem;
   color: var(--primary);
   text-decoration: none;
}

.read-more:hover {
   color: var(--accent);
}

.tags {
   padding: 0 1rem 1rem;
   display: flex;
   gap: 0.5rem;
   flex-wrap: wrap;
}

.tag {
   background: var(--accent);
   color: white;
   padding: 0.2rem 0.5rem;
   border-radius: 12px;
   font-size: 0.8rem;
}

.blog-sidebar {
   display: flex;
   flex-direction: column;
   gap: 2rem;
}

.sidebar-widget {
   background: white;
   padding: 1.5rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .sidebar-widget {
   background: #1E1E1E;
}

.sidebar-widget h3 {
   margin-top: 0;
}

.sidebar-widget ul {
   list-style: none;
   padding: 0;
}

.sidebar-widget li {
   margin: 0.5rem 0;
}

.sidebar-widget a {
   color: var(--text-dark);
   text-decoration: none;
}

.sidebar-widget a:hover {
   color: var(--accent);
}

.subscribe-form {
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}

.subscribe-form input {
   padding: 0.5rem;
   border: 1px solid #DDD;
   border-radius: 4px;
}

.subscribe-form button {
   background: var(--primary);
   color: white;
   border: none;
   padding: 0.5rem;
   border-radius: 4px;
   cursor: pointer;
}

.pagination {
   display: flex;
   justify-content: center;
   gap: 1rem;
   margin-top: 2rem;
}

.page-link {
   color: var(--primary);
   text-decoration: none;
   padding: 0.5rem 1rem;
   border: 1px solid var(--primary);
   border-radius: 4px;
}

.page-numbers {
   padding: 0.5rem 1rem;
   background: var(--primary);
   color: white;
   border-radius: 4px;
}

.contact-form {
   background: white;
   padding: 2rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .contact-form {
   background: #1E1E1E;
}

.form-group {
   margin-bottom: 1rem;
}

.form-group label {
   display: block;
   margin-bottom: 0.5rem;
   font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
   width: 100%;
   padding: 0.75rem;
   border: 1px solid #DDD;
   border-radius: 4px;
   box-sizing: border-box;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
   background: #333;
   color: #EEE;
   border-color: #555;
}

.contact-info {
   background: white;
   padding: 2rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .contact-info {
   background: #1E1E1E;
}

.info-item {
   display: flex;
   align-items: center;
   gap: 1rem;
   margin-bottom: 1.5rem;
}

.info-item i {
   font-size: 1.5rem;
   color: var(--primary);
   width: 30px;
}

.social-links {
   margin-top: 2rem;
}

.social-links h3 {
   margin-bottom: 1rem;
}

.social-links a {
   display: inline-block;
   margin-right: 1rem;
   font-size: 1.5rem;
   color: var(--primary);
   transition: color 0.3s;
}

.social-links a:hover {
   color: var(--accent);
}

.map-section {
   margin-top: 3rem;
   text-align: center;
}

.map-section h2 {
   margin-bottom: 1rem;
}

.filters,
.event-filters {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 2rem;
   flex-wrap: wrap;
}

.filters select,
.event-filters select {
   padding: 0.5rem;
   border: 1px solid #DDD;
   border-radius: 4px;
}

.resources-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   gap: 2rem;
   margin-bottom: 3rem;
}

.resource-card {
   background: white;
   padding: 1.5rem;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   transition: transform 0.3s;
}

body.dark-mode .resource-card {
   background: #1E1E1E;
}

.resource-card:hover {
   transform: translateY(-3px);
}

.resource-link {
   display: inline-block;
   margin-top: 1rem;
   color: var(--primary);
   text-decoration: none;
}

.resource-link:hover {
   color: var(--accent);
}

.accordion-section {
   background: var(--bg-light);
   padding: 2rem;
   border-radius: 8px;
}

body.dark-mode .accordion-section {
   background: #1E1E1E;
}

.accordion {
   max-width: 800px;
   margin: 0 auto;
}

.accordion-item {
   border: 1px solid #DDD;
   border-radius: 4px;
   margin-bottom: 1rem;
   overflow: hidden;
}

body.dark-mode .accordion-item {
   border-color: #555;
}

.accordion-header {
   width: 100%;
   padding: 1rem;
   background: var(--primary);
   color: white;
   border: none;
   cursor: pointer;
   display: flex;
   justify-content: space-between;
   align-items: center;
}

.accordion-header h3 {
   margin: 0;
}

.accordion-content {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.3s ease;
   background: white;
   padding: 0 1rem;
}

body.dark-mode .accordion-content {
   background: #1E1E1E;
}

.accordion-content.active {
   max-height: 200px;
   /* Adjust as needed */
   padding: 1rem;
}

.accordion-content ul {
   list-style: none;
   padding: 0;
}

.accordion-content a {
   color: var(--primary);
   text-decoration: none;
}

.accordion-content a:hover {
   text-decoration: underline;
}

.event-filters {
   gap: 1rem;
}

.events-grid {
   display: grid;
   gap: 2rem;
}

.event-card {
   display: flex;
   background: white;
   border-radius: 8px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   overflow: hidden;
}

body.dark-mode .event-card {
   background: #1E1E1E;
}

.event-date {
   background: var(--primary);
   color: white;
   padding: 1rem;
   min-width: 120px;
   text-align: center;
   font-weight: bold;
}

.event-content {
   padding: 1.5rem;
   flex: 1;
}

.event-meta {
   font-size: 0.9rem;
   color: #666;
   margin: 0.5rem 0;
}

.rsvp-btn {
   background: var(--accent);
   color: white;
   border: none;
   padding: 0.5rem 1rem;
   border-radius: 4px;
   cursor: pointer;
   text-decoration: none;
   display: inline-block;
   margin-top: 0.5rem;
}

.rsvp-btn:hover {
   background: #E57C00;
   /* Darken accent for hover */
}

.rsvp-modal {
   display: none;
   position: fixed;
   z-index: 1000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.5);
}

.modal-content {
   background: white;
   margin: 15% auto;
   padding: 2rem;
   border-radius: 8px;
   width: 80%;
   max-width: 500px;
   position: relative;
}

body.dark-mode .modal-content {
   background: #1E1E1E;
}

.close {
   position: absolute;
   right: 1rem;
   top: 1rem;
   font-size: 1.5rem;
   cursor: pointer;
}

#rsvpForm .form-group {
   margin-bottom: 1rem;
}

#rsvpForm label {
   display: block;
   margin-bottom: 0.5rem;
}

#rsvpForm input {
   width: 100%;
   padding: 0.5rem;
   border: 1px solid #DDD;
   border-radius: 4px;
}

body.dark-mode #rsvpForm input {
   background: #333;
   color: #EEE;
   border-color: #555;
}

#rsvpForm button {
   background: var(--primary);
   color: white;
   border: none;
   padding: 0.75rem 1.5rem;
   border-radius: 4px;
   cursor: pointer;
   width: 100%;
}

@media (max-width: 768px) {
   .navbar {
      flex-wrap: wrap;
   }

   .nav-links {
      flex-direction: column;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background: white;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
   }

   body.dark-mode .nav-links {
      background: #1E1E1E;
   }

   .nav-links.mobile-open {
      max-height: 300px;
      /* Adjust based on link count */
   }

   .nav-links li {
      padding: 1rem;
      border-bottom: 1px solid #EEE;
   }

   body.dark-mode .nav-links li {
      border-bottom-color: #333;
   }

   .search-bar {
      order: 3;
      width: 100%;
      margin-top: 1rem;
   }

   #theme-toggle {
      order: 2;
      margin-left: auto;
   }

   .mobile-menu-btn {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--primary);
      order: 1;
   }

   .hero-content h1 {
      font-size: 2rem;
   }

   .features {
      grid-template-columns: 1fr;
   }

   .stats {
      flex-direction: column;
      gap: 1rem;
   }

   .newsletter form {
      flex-direction: column;
      align-items: center;
   }

   .newsletter input {
      width: 100%;
      max-width: 300px;
   }

   .blog-layout,
   .contact-layout {
      grid-template-columns: 1fr;
   }

   .timeline::before {
      left: 20px;
   }

   .timeline-item {
      flex-direction: column !important;
      align-items: flex-start;
   }

   .timeline-content {
      width: 100%;
      margin: 1rem 0 !important;
   }

   .timeline-dot {
      left: 20px;
   }

   .event-card {
      flex-direction: column;
   }

   .filters,
   .event-filters {
      flex-direction: column;
      align-items: stretch;
   }

   .mission-stats {
      grid-template-columns: 1fr;
   }

   .team-grid {
      grid-template-columns: 1fr;
   }
}

@media (max-width: 480px) {
   .hero {
      height: 50vh;
   }

   .hero-content h1 {
      font-size: 1.5rem;
   }
}