:root {
  --primary-color: #28b463;
  --fadePrimary-color: rgba(76, 175, 80, 0.7);
  --secondary-color: #5dade2;
  --accent-color: #ffc107;
  --fadeAccent-color: rgba(255, 193, 7, 0.8);
  --text-color: #333;
  --light-text-color: #f4f4f4;
  --background-light: #f9f9f9;
  --background-dark: #2c3e50;
  --card-background: #ffffff;
  --border-color: #ddd;

  --font-family-primary: "poppins", sans-serif;
  --font-family-headings: "arial", serif;

  --cs-brand: #27ae60;
  --cs-dark: #2c3e50;
  --cs-bg: #ffffff;
  --cs-muted: #6b7280;
  --cs-border: #e5e7eb;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(150, 150, 150, 0.5), rgba(0, 0, 0, 0.5)),
    url("./assets/homePageImages/heroPhoto.jpeg") no-repeat center center/cover;
  color: var(--light-text-color);
  text-align: left;
  padding: 60px 15px;
}

.hero-section h1 {
  color: var(--light-text-color);
  font-size: 2.5em;
  margin-bottom: 15px;
  font-weight: 600;
  width: 70%;
}

.hero-section p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.hero-buttons .btn {
  margin-bottom: 15px;
}

.become-mentor {
  background-color: transparent;
  color: var(--accent-color);
  border: 2.5px solid var(--accent-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Intro Section */
.intro-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 3rem 1.5rem;
  align-items: center;
  text-align: center;
}

.intro-video-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  background-color: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.play-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.intro-content {
  width: 100%; /* Take full width on mobile/tablet */
}

.intro-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.intro-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.safe-space-span {
  color: var(--secondary-color);
}

.titleSpan {
  color: var(--primary-color);
}

/* Offerings Section - Mobile First (stacked cards) */
.offerings-title {
  color: var(--accent-color);
  font-weight: 700;
}

.offerings-section {
  text-align: center;
  background: linear-gradient(rgba(150, 150, 150, 0.5), rgba(0, 0, 0, 0.5)),
    url("./assets/counselingGroupPhoto.jpeg") no-repeat center center/cover;
  background-size: cover;
  background-position: center;
  margin-top: 3rem;
  padding: 40px 0;
}

.offerings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 30px;
}

.offering-card {
  background-color: var(--fadePrimary-color);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.offering-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.offering-card i {
  font-size: 2.5em;
  color: var(--accent-color);
}

.offering-card h3 {
  margin: 10px;
  color: var(--text-color);
  font-weight: 500;
}

.offering-card p {
  font-size: 0.95em;
  margin-bottom: 15px;
  font-weight: 500;
}

.offering-card-link:hover {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  transform: translateY(-15px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.offering-card-link:hover .offering-card i {
  color: var(--accent-color);
}

.offering-card-link:hover .offering-card h3 {
  color: var(--light-text-color);
}

.offering-card-link:hover .offering-card p {
  color: var(--light-text-color);
}

/* Testimonials Section - Mobile First (stacked cards) */
.testimonials-section {
  padding: 40px 0;
}

.testimonyTitle {
  text-align: center;
  font-weight: 700;
}

.slider-container {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.testimonial-grid {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-card {
  width: 100%;
  height: 400px;
  box-sizing: border-box;
  padding: 30px;
  text-align: center;
  background-color: #fff;
  flex-shrink: 0;
  display: none;
  background-color: var(--fadeAccent-color);
}

.testimonyPhoto {
  width: 160px;
  height: 160px;
  border-radius: 100%;
  object-fit: cover;
  border: 4px solid var(--secondary-color);
}

.testimonial-card.active {
  display: block;
}

.testimonial-card p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #333;
}

.testimonial-card span {
  font-style: italic;
  color: #666;
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.slider-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* App CTA Section - Mobile First */
.app-cta-section {
  text-align: center;
}

.app-buttons {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

/*VIDEO MODAL STYLES*/
.videoModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.video-modal-content {
  position: relative;
  background-color: #938989;
  margin: auto;
  padding: 5px;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  animation-name: animatetop;
  animation-duration: 0.4s;
}

.video-close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.video-close-button:hover,
.video-close-button:focus {
  color: #000;
  text-decoration: none;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Modal animation */
@keyframes animatetop {
  from {
    top: -300px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

/* --- WhatsApp Button Styles --- */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  border-radius: 30px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.whatsapp-button i {
  font-size: 1.8rem;
  margin-right: 10px;
}

.whatsapp-text {
  font-weight: 500;
}

.whatsapp-button:hover {
  background-color: #1da851;
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
  .whatsapp-button {
    bottom: 15px;
    right: 15px;
    padding: 8px 15px;
    font-size: 1.6rem;
  }

  .whatsapp-button i {
    font-size: 1.8rem;
    margin-right: 8px;
  }

  .whatsapp-button .whatsapp-text {
    display: none;
  }
}

@media (max-width: 600px) {
  .whatsapp-button {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    bottom: 15px;
    right: 15px;
  }
}

/* --- Homepage Specific Media Queries for Larger Screens (Mobile-First) --- */

/* Small Tablets and Larger Phones (e.g., min-width 576px) */
@media (min-width: 576px) {
  /* Homepage Hero */
  .hero-section h1 {
    font-size: 3em;
  }

  .offerings-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* App Buttons */
  .app-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
  .btn-app {
    width: auto;
    max-width: 200px;
  }
}

/* Medium Devices / Tablets (e.g., min-width 768px) */
@media (min-width: 768px) {
  /* Homepage Hero */
  .hero-section {
    padding: 120px 20px;
  }
  .hero-section h1 {
    font-size: 3.8em;
  }
  .hero-section p {
    font-size: 1.2em;
  }

  /* Offerings Grid */
  .offerings-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Testimonials Grid */
  .testimonial-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }

  .app-buttons {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 30px;
  }
}

/* Large Devices / Desktops (e.g., min-width 992px) */
@media (min-width: 992px) {
  /* Homepage Hero */
  .hero-section {
    padding: 70px 20px;
  }

  .hero-section h1 {
    font-size: 4.5em;
  }

  .hero-section p {
    font-size: 1.4em;
  }

  /*intro section*/

  .intro-section {
    flex-direction: row; /* Side-by-side on desktop */
    text-align: left; /* Align text left on desktop */
    align-items: flex-start; /* Align items to the top */
  }

  .intro-video-container {
    flex: 1; /* Take equal space */
    max-width: 50%; /* Adjust as needed, or let flex-grow handle it */
    margin-right: 2rem; /* Space between video and text */
  }

  .intro-content {
    flex: 1; /* Take equal space */
  }

  /* Offerings & Testimonials Grid: 3 columns */
  .offerings-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

/* Extra Large Devices (e.g., min-width 1200px) */
@media (min-width: 1200px) {
  .offerings-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

/* ========= Calm Spaces Chat ========= */

/* Floating Action Button */
.cs-fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}
.cs-fab:hover {
  background: var(--secondary-color);
}

/* Chat Panel */
.cs-chat-panel {
  position: fixed;
  z-index: 10000;
  bottom: 80px;
  right: 16px;
  width: 90%;
  max-width: 360px;
  max-height: 80%;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: "Segoe UI", sans-serif;
}
.cs-chat-panel.cs-open {
  display: flex;
}

/* Header */
.cs-chat-header {
  background: var(--primary-color);
  color: white;
  padding: 5px;
  font-size: 15px;
  font-weight: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cs-icon-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

/* Messages */
.cs-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f9fafb;
}
.chat-message {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  max-width: 80%;
  line-height: 1.4;
}
.chat-message.bot {
  background: #e5e7eb; /* light gray */
  align-self: flex-start;
}
.chat-message.user {
  background: #3b82f6; /* blue */
  color: white;
  align-self: flex-end;
}

/* Input Bar */
.cs-inputbar {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 8px;
  background: white;
}
#chat-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
}
.cs-send {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  margin-left: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 16px;
}

/* Quick Replies */
.quick-replies {
  margin-top: 8px;
  margin-bottom: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-reply {
  background: #dbeafe;
  color: #1e3a8a;
  border: none;
  border-radius: 10px;
  padding: 3px 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.quick-reply:hover {
  background: #bfdbfe;
}

/* WhatsApp Button */
.quick-reply.whatsapp {
  background: #25d366; /* WhatsApp green */
  color: white;
  font-weight: bold;
}
.quick-reply.whatsapp:hover {
  background: #20b858;
}

/* Helplines */
.helplines {
  margin-top: 10px;
  padding: 10px;
  border: 2px solid #ef4444;
  border-radius: 5px;
  font-size: 14px;
  background: #fef2f2;
  margin-bottom: 10px;
}
.helplines .helpline-link {
  display: block;
  font-weight: bold;
  color: #b91c1c;
  text-decoration: none;
}
.helplines .helpline-link:hover {
  text-decoration: underline;
}

/* Larger Screens (Tablet/Desktop) */
@media (min-width: 640px) {
  .cs-chat-panel {
    width: 320px;
    bottom: 80px;
    right: 20px;
  }
  .cs-fab {
    width: 60px;
    height: 60px;
  }
}

/*COMMUNITY CHAT*/
