/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #E6F0F2; /* Light teal background */
    font-size: 16px; /* Base font size for scalability */
}

/* Navigation styles */
nav {
    background-color: #ffffff; /* White background */
    color: #1A4D4D; /* Dark teal text */
    margin: 5px;
    border: 2px solid #1A4D4D;
    border-top: none;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.logo img {
    height: 80px; /* Slightly smaller for mobile */
    width: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast; /* HD quality */
}

/* Hamburger menu for mobile */
.nav-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    color: #1A4D4D;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 8px; /* Larger touch target */
}

.nav-links a:hover {
    text-decoration: underline;
}

.donate-button {
    background-color: #23d331;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}


.donate-button:hover {
    background-color: #143737; /* Darker shade on hover */
}

/* Footer styles */
footer {
    background-color: #1A4D4D; /* Dark teal for footer */
    color: white;
    padding: 30px 15px;
    margin: 5px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-section {
    flex: 1;
    min-width: 180px; /* Adjusted for smaller screens */
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    cursor: pointer;
}

.footer-section p, .footer-section ul {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding-left: 0;
    display: none; /* Hidden by default */
}

.footer-section ul li {
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.footer-section:hover ul {
    display: block; /* Show on hover for desktop */
}

.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

#map {
    height: 200px;
    width: 100%;
    margin-top: 20px;
    border-radius: 10px;
}

/* About page styles */
.about-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
}

.about-section {
    margin: 20px 0;
    padding: 20px;
    transition: transform 0.3s ease;
}

.about-section.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-section:hover {
    transform: translateY(-5px);
}

.about-section h1 {
    color: #1A4D4D;
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
}

.about-section h2 {
    color: #1A4D4D;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-align: center;
}

.about-section h3 {
    color: #1A4D4D;
    font-size: 1.4rem;
    margin: 10px 0;
}

.about-section p {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

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

.who-we-are-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.who-we-are-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    image-rendering: -webkit-optimize-contrast;
}

.who-we-are-content p {
    font-style: italic;
    flex: 1;
    min-width: 200px;
}

.inspiring-story-content {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.inspiring-story-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 15px;
}

.inspiring-story-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    image-rendering: -webkit-optimize-contrast;
}

.inspiring-story-item p {
    flex: 1;
    margin: 0 15px;
    min-width: 200px;
}

.timeline {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.timeline-item {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.timeline-item.active {
    display: flex;
}

.timeline-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    image-rendering: -webkit-optimize-contrast;
    margin-bottom: 20px;
}

.timeline-item h3 {
    margin-bottom: 10px;
}

.timeline-item p {
    flex: 1;
    max-width: 600px;
}

.timeline-controls {
    text-align: center;
    margin-top: 20px;
}

.timeline-controls button {
    background-color: #1A4D4D;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.timeline-controls button:hover {
    background-color: #143737;
}

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

.financial-reports-content,
.funders-sponsors-content,
.partners-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.financial-reports-content img,
.funders-sponsors-content img,
.partners-content img {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    image-rendering: -webkit-optimize-contrast;
}

.grateful-content {
    margin: 20px 0;
}

.problems-section {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    flex: 1;
    min-width: 300px;
}

.problems-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.problems-section h2 {
    color: #1A4D4D;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-align: center;
}

.problems-section h3 {
    color: #1A4D4D;
    font-size: 1.4rem;
    margin: 10px 0;
}

.problems-section p {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

.problems-section img {
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
}

.graph-container.card,
.graph-info.card,
.stories.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px 0;
}

.cry-for-help {
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 5px solid #1A4D4D;
    margin: 20px 0;
    position: relative;
}

.cry-for-help h3 {
    color: #1A4D4D;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.cry-for-help p {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.cry-for-help .story-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.cry-for-help .canvas-container {
    flex: 1;
    min-width: 250px;
}

.cry-for-help .graph-container {
    position: relative;
    text-align: center;
}

.cry-for-help .graph-info {
    margin-top: 10px;
    text-align: left;
}

.cry-for-help .graph-info ul {
    list-style: none;
    padding: 0;
}

.cry-for-help .graph-info ul li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.cry-for-help .graph-info ul li span.color-box {
    width: 15px;
    height: 15px;
    margin-right: 10px;
    display: inline-block;
}

.cry-for-help .stories {
    flex: 1;
    min-width: 250px;
}

.cry-for-help .story-item {
    display: none;
}

.cry-for-help .story-item.active {
    display: block;
}

.cry-for-help .story-controls {
    text-align: center;
    margin-top: 10px;
}

.cry-for-help .story-controls button {
    background-color: #1A4D4D;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.cry-for-help .story-controls button:hover {
    background-color: #143737;
}

.call-to-action {
    text-align: center;
    padding: 20px;
    background-color: #1A4D4D;
    color: white;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 1.1rem;
    font-weight: bold;
    position: relative;
}

.call-to-action img {
    max-width: 100px;
    height: auto;
    margin: 10px auto;
    display: block;
}

.call-to-action a {
    color: white;
    text-decoration: underline;
    margin-top: 10px;
    display: inline-block;
}

.call-to-action a:hover {
    color: #e6f0f2;
}

.partner-button,
.join-us a,
.what-we-do-button {
    display: inline-block;
    background-color: #1A4D4D;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    font-size: 0.9rem;
}

.partner-button:hover,
.join-us a:hover,
.what-we-do-button:hover {
    background-color: #143737;
}

.join-us {
    text-align: center;
    margin-top: 40px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .logo img {
        height: 60px; /* Smaller logo for mobile */
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default on mobile */
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 10px;
        font-size: 1.1rem; /* Larger for touch */
    }

    .donate-button {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    footer {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .footer-section {
        width: 100%;
        text-align: center;
    }

    .footer-section ul {
        display: block; /* Always visible on mobile */
    }

    #map {
        height: 150px; /* Smaller map on mobile */
    }

    .about-container {
        padding: 10px;
    }

    .about-section {
        padding: 15px;
    }

    .about-section h1 {
        font-size: 1.8rem;
    }

    .about-section h2 {
        font-size: 1.5rem;
    }

    .about-section h3 {
        font-size: 1.2rem;
    }

    .about-section p {
        font-size: 0.9rem;
    }

    .who-we-are-content {
        flex-direction: column;
        align-items: center;
    }

    .inspiring-story-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .inspiring-story-item img {
        max-width: 100%;
    }

    .inspiring-story-item p {
        margin: 15px 0;
    }

    .timeline-item img {
        max-width: 100%;
    }

    .financial-reports-content,
    .funders-sponsors-content,
    .partners-content {
        flex-direction: column;
        align-items: center;
    }

    .financial-reports-content img,
    .funders-sponsors-content img,
    .partners-content img {
        max-width: 100%;
    }

    .partner-button,
    .join-us a,
    .what-we-do-button {
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    /* Problems page mobile styles */
    .problems-section h2 {
        font-size: 1.5rem;
    }

    .problems-section h3 {
        font-size: 1.2rem;
    }

    .problems-section p {
        font-size: 0.9rem;
    }

    .cry-for-help h3 {
        font-size: 1.2rem;
    }

    .cry-for-help p {
        font-size: 0.9rem;
    }

    .cry-for-help .story-container {
        flex-direction: column;
        align-items: center;
    }

    .cry-for-help .canvas-container,
    .cry-for-help .stories {
        width: 100%;
    }

    .cry-for-help .graph-info ul li {
        font-size: 0.8rem;
    }

    .call-to-action {
        font-size: 1rem;
    }
}

/* Hamburger menu toggle */
.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #1A4D4D;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .hamburger {
        display: block; /* Show hamburger on mobile */
        align-self: flex-end;
    }
}

/* Scroll to Top Button */
    .scroll-to-top {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background-color: #1A4D4D; /* Matches your site's dark teal */
      color: white;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      cursor: pointer;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      transition: background-color 0.3s, transform 0.3s;
      z-index: 1000; /* Ensures button stays above other content */
    }
    .scroll-to-top:hover {
      background-color: #143737; /* Darker shade on hover */
      transform: scale(1.1);
    }
    .scroll-to-top::before {
      content: '↑'; /* Up arrow */
    }

    /* Hide button on small screens if needed, or adjust size */
    @media (max-width: 768px) {
      .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
      }
    }