/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

/* Navbar */
/* Navbar Styling */
    .navbar {
      position: fixed;
      top: 0;
      width: 100%;
      padding: 15px 30px;
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 1000;
    }

    .navbar a img {
      height: 50px;
    }

    .nav-links {
      display: flex;
      list-style: none;
      gap: 20px;
    }

    .nav-links li a {
      color: white;
      text-decoration: none;
      font-weight: bold;
    }

    .hamburger {
      display: none;
      flex-direction: column;
      cursor: pointer;
    }

    .hamburger div {
      width: 25px;
      height: 3px;
      background-color: white;
      margin: 4px;
    }

    /* Responsive Navbar */
    @media (max-width: 768px) {
      .hamburger {
        display: flex;
      }

      .nav-links {
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        display: none;
      }

      .nav-links.show {
        display: flex;
      }

      #openModalBtn {
        margin-top: 10px;
      }
    }



/*login form * //

/* Login Modal Overlay */
#loginModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

#loginModal.show {
  display: flex;
}

/* Modal Content */
#loginModal .modal-content {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 30px 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: loginFadeIn 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Animation */
@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Close Button */
#loginModal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  background: transparent;
  border: none;
  line-height: 1;
}

/* Form Layout */
#loginModal form {
  display: flex;
  flex-direction: column;
}

/* Labels */
#loginModal label {
  margin-top: 15px;
  font-weight: bold;
  color: #000;
}

/* Inputs */
#loginModal input[type="text"],
#loginModal input[type="password"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 5px;
  color: #000;
  background-color: #fff;
}

/* Submit Button */
#loginModal button[type="submit"] {
  margin-top: 20px;
  padding: 10px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

#loginModal button[type="submit"]:hover {
  background-color: #222;
}

/* Forgot Password Link */
#loginModal .forgot {
  text-align: right;
  margin-top: 10px;
}

#loginModal .forgot a {
  font-size: 0.9em;
  text-decoration: none;
  color: #007bff;
}





/* Hero Section */
.hero {
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
}

/* We'll set background image inline via your Flask template, so no static url here */

.hero img {
  width: 150px;
  height: auto;
}

.hero-content {
  background: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 10px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-buttons .btn {
  padding: 10px 20px;
  margin: 0 10px;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.btn-primary {
  background: #00bcd4;
}

.btn-primary:hover {
  background: #0097a7;
}

.btn-secondary {
  background: #e91e63;
}

.btn-secondary:hover {
  background: #b0003a;
}


/*=============================
  About Section Styles
=============================*/
.about-section {
  background: white;
  padding: 80px 20px;
  font-family: 'Segoe UI', sans-serif;
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.about-text {
  flex: 1 1 500px;
}

.about-text h2 {
  font-size: 2.8rem;
  color: #333;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
}

.about-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background-color: #7295df;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.about-btn:hover {
  background-color: #1e40af;
}

.about-images {
  position: relative;
  flex: 1 1 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
}

.about-img {
  width: 650px;
  height: 400px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.img1 {
  position: relative;
  z-index: 2;
  transform: rotate(-2deg);
}

.img2 {
  position: absolute;
  top: 20px;
  left: 30px;
  z-index: 1;
  transform: rotate(2deg);
  opacity: 0.95;
}


/* Hero Section buttons */
.hero-btn {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: inline-block;
  user-select: none;
  cursor: pointer;
}

.btn-primary.hero-btn {
  background: linear-gradient(45deg, #ff6a00, #ee0979);
  color: #fff;
  border: none;
}

.btn-primary.hero-btn:hover {
  background: linear-gradient(45deg, #ee0979, #ff6a00);
  box-shadow: 0 6px 20px rgba(238, 9, 121, 0.6);
  transform: translateY(-3px);
}

.btn-secondary.hero-btn {
  background: #fff;
  color: #ff6a00;
  border: 2px solid #ff6a00;
}

.btn-secondary.hero-btn:hover {
  background: #ff6a00;
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.6);
  transform: translateY(-3px);
}



/*=============================
  Modal Styles
=============================*/

/* Wider Landscape Modal */
.custom-modal-width {
  max-width: 1100px;
  width: 90%;
  height: 500px;
  margin: auto;
  border-radius: 12px;
  overflow: hidden;
}

/* Force Landscape Format */
.landscape-modal {
  display: flex;
  flex-direction: row;
  height: 50%;
  max-height: 90vh;
}

/* Modal Body in Row */
.modal-body {
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 0;
}

/* Scrollable Text Section */
.modal-text {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

/* Paragraph Styling */
.modal-body p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
}

/* "X" Close Button Styling */
.custom-close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 1051;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #000;
  opacity: 0.8;
  cursor: pointer;
  line-height: 1;
}
.custom-close:hover {
  opacity: 1;
}


/* Our Stories */
.our-stories {
  position: relative;
  background: url('/static/img/stories1.avif') center/cover no-repeat;
  padding: 80px 20px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(4px);
}

.background-overlay {
  background: rgba(0, 0, 0, 0.6);
  padding: 50px;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.our-stories h2 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

.our-stories p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  justify-content: center;
  justify-items: center;
}

.story-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  max-height: 560px; /* increased by ~6px */
  width: 320px;
}

.story-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.story-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: center center;
}

.story-info {
  padding: 16px;
  text-align: left;
  color: #fff;
  overflow: visible;  /* For Android fix */
}

.story-info .date {
  font-size: 0.85rem;
  font-weight: 500;
  color: #f0f0f0;
  margin-bottom: 8px;
  display: block;
}

.story-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.story-info p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #fefefe;
  max-height: calc(1.4em * 8.7); /* roughly 8.7 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  /* Removed -webkit-line-clamp for better Android support */
}

/* Responsive */
@media (max-width: 768px) {
  .our-stories h2 {
    font-size: 2rem;
  }

  .our-stories p {
    font-size: 1rem;
  }

  .story-info h3 {
    font-size: 1rem;
  }

  .story-info p {
    font-size: 0.9rem;
    max-height: calc(1.4em * 6.7); /* roughly 6.7 lines */
  }

  .story-card {
    max-height: 540px; /* increased by ~6px */
    width: 90vw;
  }
}


/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #ccc;
}

#modalCaption {
  margin: 15px auto;
  text-align: center;
  color: #fff;
  font-size: 1rem;
  max-width: 90%;
}

.more-stories-button {
  text-align: center;
  margin-top: 30px;
}

.more-stories-button .btn {
  background-color: #d35400;
  color: #fff;
  padding: 8px 16px;  /* Smaller padding */
  border: none;
  border-radius: 20px;  /* Slightly less round for smaller button */
  font-size: 0.875rem;  /* Smaller text */
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.more-stories-button .btn:hover {
  background-color: #e67e22;
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}


/* Services & Latest News Shared Styles */
.section-container {
  padding: 60px 20px;
  background-color: #fff;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #333;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.card-box {
  background-color: #f5f5f5;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.card-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-box h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #222;
}

.card-box p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
}

.card-box .btn {
  background-color: #00bcd4;
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.card-box .btn:hover {
  background-color: #0097a7;
}


.donate-btn.filled-info {
  background-color: #17a2b8;
  color: white;
  border: none;
}

.donate-btn.filled-info:hover {
  background-color: #138496;
}

