/* SECTION WRAPPER */
.articles-title {
  text-align: center;
  font-size: 36px;
  margin-top: 40px;
  color: #EB1551;
  font-weight: 700;
}

.articles-header {
  max-width: 1200px;
  margin: 40px auto;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 0 20px;
}

/* IMAGE SECTION */
.header-image {
  flex: 1;
}

.header-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* CONTENT SECTION */
.header-content {
  flex: 1;
}

.header-content h2 {
  font-size: 28px;
  color: #222;
  margin-bottom: 20px;
  line-height: 1.3;
}

.header-content h3 {
  font-size: 22px;
  color: #444;
  margin-top: 25px;
  margin-bottom: 10px;
}

.header-content p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .articles-header {
    flex-direction: column;
    gap: 20px;
  }

  .header-content h2 {
    font-size: 24px;
  }

  .articles-title {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .articles-title {
    font-size: 28px;
  }

  .header-content h2 {
    font-size: 22px;
  }

  .header-content p {
    font-size: 15px;
  }

  .articles-header {
    padding: 0 15px;
  }
}

/* MAIN TITLE */
/* MAIN TITLE */
.articles-main-title {
  text-align: center;
  font-size: 38px;
  font-weight: 700;
  margin: 50px 0 30px;
  color: #EB1551;
}

/* GRID CONTAINER */
.articles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;      /* ★ Gives margin on both sides */
  justify-items: stretch; /* ★ Cards align naturally */
}

/* CARD */
.card {
  width: 100%;          /* ★ Card takes full grid width */
  max-width: none;      /* ★ Prevents uneven card width */
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

/* CARD IMAGE */
.card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CARD CONTENT */
.card-tag {
  display: inline-block;
  width: fit-content; /* TAG FITS TEXT */
  padding: 6px 14px;
  margin: 15px 20px 5px;
  font-size: 14px;
  background: #f0f0f0;
  color: #444;
  border-radius: 30px;
  font-weight: 600;
}

/* Custom tag colors */
.card-tag.nutrition {
  background: #ffe9d6;
  color: #d07a00;
}

.card-tag.activities {
  background: #e3f3ff;
  color: #0277bd;
}

.card-tag.recipes {
  background: #fde6ef;
  color: #c2185b;
}

.card-title {
  font-size: 20px;
  margin: 12px 20px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 15.5px;
  color: #555;
  line-height: 1.7;
  margin: 0 20px 20px;
  flex-grow: 1;
}

/* Responsive Layout */
@media (max-width: 1024px) {
  .articles-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 0 20px;   /* ★ Important for tablet margins */
  }

  .card-image {
    height: 200px;
  }
}


@media (max-width: 600px) {
   .articles-container {
    grid-template-columns: 1fr;
    padding: 0 18px;  /* ★ Gives clean spacing on mobile */
  }

  .articles-main-title {
    font-size: 32px;
    padding: 0 15px;
  }

  .card-image {
    height: 190px;
  }
}



/* ================= MODAL ================= */
    .article-modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .modal-content {
        width: 90%;
        max-width: 700px;
        max-height: 80vh;       /* Limit modal height to 80% of viewport */
        background: #fff;
        padding: 25px;
        border-radius: 18px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        position: relative;
        animation: popIn 0.35s ease;
        overflow-y: auto;       /* Enable vertical scrolling */
    }

    @keyframes popIn {
      from { transform: scale(0.8); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .modal-close {
      position: absolute;
      right: 18px;
      top: 12px;
      font-size: 26px;
      font-weight: bold;
      cursor: pointer;
      color: #ff4f88;
    }

    .modal-content img {
      width: 100%;
      border-radius: 12px;
      margin-bottom: 15px;
      height: 365px;
    }

    .modal-content h2 {
      margin-bottom: 10px;
      font-size: 26px;
    }

    .modal-content p {
      font-size: 16px;
      color: #444;
      line-height: 1.6;
      white-space: pre-line;
    }

    /* Explore by category */

    .categories {
  text-align: center;
  padding: 40px 20px;
}

.section-title {
  font-size: 32px;
  margin-bottom: 25px;
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 18px;
  border-radius: 20px;
  background: #ffe0ed;
  color: #333;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.filter-btn.active {
  background: #ff6fa5;
  color: white;
}

.display-box {
  margin-top: 40px;
  background: #fff5fa;
  padding: 30px;
  border-radius: 20px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  justify-content: flex-start;
  /* max-width: 1100px;  keeps layout neat */
  margin-left: auto;
  margin-right: auto;
}


.display-box img {
  width: 420px !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 15px !important;
}

.display-content {
  flex: 1;
  text-align: left;
}
@media (max-width: 768px) {
  .display-box {
    flex-direction: column;
    text-align: center;
  }

  .display-content {
    text-align: center;
  }

  .display-box img {
    width: 100%;
    height: auto;
  }
}

/* Philosophy */

/* OUR PHILOSOPHY SECTION */
.philosophy-section {
  background: #f2f2f2;
  padding: 60px 20px;
}

.philosophy-card {
  max-width: 1100px;
  margin: auto;
  background: #ffaac2;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* CONTENT */
.philosophy-content {
  flex: 1;
  text-align: left;
}

.philosophy-content h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.philosophy-content p {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
}

/* READ MORE BUTTON */
.read-more-btn {
  margin-top: 20px;
  padding: 10px 22px;
  background: #f13a7d;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
}

.read-more-btn:hover {
  background: #ff4f91;
}

/* IMAGE */
.philosophy-image {
  flex: 1;
  text-align: right;
}

.philosophy-image img {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  object-fit: cover;
}

/* MODAL */
/* MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(3px);
}

/* MODAL CARD */
.modal-content {
  background: #ffffff;
  width: 92%;
  max-width: 620px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 35px 30px;
  border-radius: 24px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalFadeUp 0.35s ease;
}

/* TITLE */
.modal-content h3 {
  font-size: 26px;
  margin-bottom: 18px;
  color: #333;
  text-align: center;
}

/* CONTENT TEXT */
.modal-content p {
  font-size: 15.5px;
  line-height: 1.75;
  color: #555;
  margin-bottom: 15px;
}

/* CLOSE BUTTON */
.close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 22px;
  color: #ff4f91;
  cursor: pointer;
  transition: 0.3s ease;
}

.close-btn:hover {
  background: #fff;
  color: #ff4f91;
}

/* CUSTOM SCROLLBAR */
.modal-content::-webkit-scrollbar {
  width: 5px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f5f5f5;
  
}

.modal-content::-webkit-scrollbar-thumb {
  background: #ff9fc1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #ff6fa5;
}

/* OPEN ANIMATION */
@keyframes modalFadeUp {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .modal-content {
    padding: 25px 20px;
  }

  .modal-content h3 {
    font-size: 22px;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .philosophy-card {
    flex-direction: column-reverse;
    text-align: center;
  }

  .philosophy-content {
    text-align: center;
  }

  .philosophy-image img {
    max-width: 100%;
  }
}

/* JOIN COMMUNITY SECTION */
.join-community {
  padding: 50px 20px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  border: 2px solid #ccc; /* border color */
  border-radius: 15px;       /* rounded corners */
  max-width: 600px;          /* optional: control width */
  margin: 40px auto;         /* center on page with spacing */
  background-color: #fff;    /* optional: white background */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* subtle shadow */
}

.join-community .container {
  max-width: 500px;
  margin: 0 auto;
}

.join-community h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}

.join-community p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.join-form {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.join-form input[type="email"] {
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid #ccc;
  flex: 1;
  box-sizing: border-box; /* ensures padding included in width */
}

.join-form input[type="email"]:focus {
  outline: none;
  border-color: #ec4275;
}


@media (max-width: 480px) {
  .join-form {
    flex-direction: column;
  }

  .join-form input,
  .join-form button {
    width: 100%;
  }
}

