/* Base Styles */
:root {
  --brand-color: #adcfe9; /* Light blue/periwinkle for counseling */
  --text-color: #333;
  --dark-color: #1a3445;
  --link-hover: #8abfe0;
  --padding-base: 1.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #fff;
  /* Prevents scrollbar flash when mobile menu is open */
  overflow-x: hidden;
}

/* Header and Navigation */
header {
  background-color: var(--dark-color);
  padding: var(--padding-base) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--padding-base);
  /* 🌟 CHANGE: Use flex to distribute space */
  display: flex;
  justify-content: space-between; /* Pushes Logo, Nav, and Utility to edges */
  align-items: center;
}

.logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

#main-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: var(--padding-base);
  padding: 0.5rem 0;
  transition: color 0.3s;
}

#main-nav a:hover {
  color: var(--brand-color);
}

/* Utility Controls (Lang Toggle & Mobile Button) */
.utility-controls {
  display: flex;
  align-items: center;
}

#lang-toggle {
  background: var(--link-hover);
  color: var(--dark-color);
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 4px;
  margin-left: 10px;
  transition: background 0.3s;
}

#lang-toggle:hover {
  background: #fff;
}

/* CTA Button Styling */
.cta-button {
  display: inline-block;
  background-color: var(--brand-color);
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 8px;
  transition: background-color 0.3s;
  border: 2px solid var(--brand-color);
}

.cta-button:hover {
  background-color: #fff;
  border-color: var(--brand-color);
}

.cta-link {
  display: block;
  text-align: center;
  padding: 1rem;
  background: var(--brand-color);
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 700;
  margin: var(--padding-base) auto;
  max-width: 300px;
  border-radius: 4px;
}

/* Hero Section */
.hero-section {
  padding: 3rem var(--padding-base);
  text-align: center;
  color: var(--dark-color); /* Dark text on light background */
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-section p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Content/Cards */
.content-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 var(--padding-base);
  text-align: center;
}

.service-cards {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap; /* Allows wrapping on smaller screens */
  justify-content: center;
}

.card {
  flex: 1 1 300px; /* Flex basis for better responsiveness */
  background: #f4f8fa;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #fff;
  padding: 3rem var(--padding-base);
  margin-top: 3rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-grid h4 {
  color: var(--brand-color);
  margin-bottom: 1rem;
}

.footer-grid p,
.footer-grid a {
  color: #ccc;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-grid p a {
    /* 1. Allows long, unbroken words (like URLs or phone numbers) to break */
    word-wrap: break-word; 
    overflow-wrap: break-word;
    /* 2. Important: Ensure link elements are treated inline-block so word-wrap applies */
    display: inline-block;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid ul li a:hover {
  color: var(--link-hover);
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

/* Decrease the font size of the specific hotline numbers */
.footer-emergency .crisis-number {
  font-size: 0.9rem; /* Slightly smaller than the default 1rem body text */
  font-weight: 500; /* Reduce boldness from previous example for a subtler look */
  /*color: #f00; Keeping red for visibility */
}

/* Ensure the instructional text remains the standard size or slightly larger if needed */
#footer-emergency-text {
  font-size: 1rem; /* Standard text size for clear instructions */
  font-style: normal;
}

/* ------------------------------------------- */
/* 🌟 MOBILE TOGGLE STYLING (FIXED) 🌟 */
/* ------------------------------------------- */

/* Base style for the hamburger button container */
#mobile-menu-toggle {
  display: none; /* Hidden by default on desktop, overridden in media query */
  cursor: pointer;
  background: none;
  border: none;
  margin-left: var(--padding-base);
  padding: 10px;
  position: relative;
  z-index: 1001;
  /* Ensure button has size and proper alignment for bars */
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

/* 🌟 FIX: Styling for the hamburger bars to make them visible */
#mobile-menu-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff; /* White bars against the dark header */
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Desktop Navigation (Visible only on large screens) */
@media screen and (min-width: 769px) {
  #main-nav {
    /* This pushes the nav links to the left of the utility controls */
    margin-left: auto;
    margin-right: var(
      --padding-base
    ); /* Gives a little space from the nav to the toggle */
    display: flex; /* Show the full navigation bar */
  }
  /* Ensure the toggle button is hidden on large screens */
  #mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Specific Styles */
@media screen and (max-width: 768px) {
  /* 1. Show the hamburger button (FIXED: ensures display: flex for mobile) */
  #mobile-menu-toggle {
    display: flex;
  }

  /* 2. Hide the main navigation by default (Desktop menu disappears) */
  #main-nav {
    display: flex; /* Kept flex for column layout */
    flex-direction: column;
    justify-content: flex-start;
    position: fixed; /* Fixed position for full screen overlay */
    top: 0;
    left: -100%; /* Move the menu off-screen to the left */
    width: 100%;
    height: 100vh;
    background-color: var(--dark-color);
    padding-top: 6rem; /* Space for the header content */
    transition: left 0.3s ease-in-out;
    z-index: 999;
  }

  #main-nav a {
    display: block;
    padding: 1rem var(--padding-base);
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
    text-align: center;
  }

  .header-container {
    /* Ensure logo and buttons are aligned and contained in a visible row */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
  }

  /* 3. State when the menu is OPEN */
  /* When 'nav-open' is on the body, slide the menu into view */
  body.nav-open #main-nav {
    left: 0; /* Slide in from the left */
  }

  /* Optional: Disable body scroll when menu is open */
  body.nav-open {
    overflow: hidden;
  }

  /* Footer adjustments for mobile */
  .footer-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ----------------------------------------------------- */
/* 🌟 NEW BOOKING PAGE STYLES (Vertical Timeline) 🌟 */
/* ----------------------------------------------------- */

/* Style for a general page hero section on subpages */
.page-hero {
  padding: 3rem var(--padding-base);
  text-align: center;
  background-color: #f4f8fa; /* Light background to frame the title */
  border-bottom: 2px solid var(--brand-color);
  margin-bottom: 3rem;
}

.page-hero h1 {
  font-size: 2rem;
  color: var(--dark-color);
}

.page-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 800px;
  margin: 0.5rem auto 0;
}

/* Container for the timeline flow */
.booking-timeline-container {
  max-width: 800px; /* Constrain the width for readability */
  /* Remove center alignment for content section to align timeline to the left */
  text-align: left;
  margin: 3rem auto;
  padding: 0 var(--padding-base);
}

.timeline-flow {
  position: relative;
  padding-left: 25px; /* Space for the line and circles */
  margin-bottom: 3rem;
}

/* The vertical line connecting the steps */
.timeline-flow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  width: 2px;
  height: 100%;
  background-color: var(--brand-color);
}

.timeline-step {
  position: relative;
  margin-bottom: 3rem;
}

.step-icon-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background-color: var(--brand-color);
  color: var(--dark-color);
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  line-height: 24px;
  transform: translateX(-50%); /* Center the circle over the line */
  z-index: 10; /* Ensure circle is above the line */
}

.step-content {
  padding-left: 20px; /* Align content next to the line/circle */
}

.step-content h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

/* Styling for the CTA button inside the flow */
.portal-cta {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  /* Ensure it doesn't try to inherit the full width block style of .cta-link */
  display: inline-block;
}

/* Alternative Booking Box */
.alternative-booking-box {
  text-align: center;
  padding: 2rem;
  background-color: var(--dark-color);
  color: #fff;
  border-radius: 8px;
  margin: 3rem auto;
  max-width: 600px;
}

.alternative-booking-box h2 {
  color: var(--brand-color);
  margin-bottom: 0.5rem;
}

.alternative-booking-box .phone-number-info {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1rem;
}

/* ----------------------------------------------------- */
/* 🌟 NEW FAQ PAGE STYLES (Accordion) 🌟 */
/* ----------------------------------------------------- */

/* Reusing page-hero styles from booking page for consistency */
/* ADD THIS SECTION */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Styling for each group section (General, Billing, etc.) */
.faq-group {
  margin-bottom: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee; /* Separator between groups */
}

.faq-group h2 {
  color: var(--color-primary-dark); /* Uses the mapped link-hover color */
  font-size: 1.8rem;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--color-background-light);
  padding-bottom: 10px;
  text-align: left; /* Ensure group title is left-aligned */
}

.page-hero {
  /* These styles already exist above, keeping them here for completeness but they are redundant */
  padding: 3rem var(--padding-base);
  text-align: center;
  background-color: #f4f8fa; /* Light background */
  border-bottom: 2px solid var(--brand-color);
  margin-bottom: 3rem;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto 5rem;
  /* Reset content-section alignment from center to left for the accordions */
  text-align: left;
}

.faq-item-accordion {
  border: 1px solid #eee;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Style for the question/summary area */
.faq-item-accordion summary {
  display: block; /* Necessary to control the pointer icon */
  padding: 1.2rem var(--padding-base);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-color);
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  user-select: none; /* Prevents text selection on click */

  /* 🌟 Custom pointer for the accordion */
  list-style: none; /* Hides default triangle */
  position: relative;
}

/* Add a plus/minus icon visual */
.faq-item-accordion summary::after {
  content: "+";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--brand-color);
  transition: transform 0.2s;
}

/* Style when the accordion is OPEN */
.faq-item-accordion[open] {
  border-color: var(--brand-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-item-accordion[open] summary {
  background-color: var(--brand-color);
  color: var(--dark-color);
  border-bottom: none;
}

.faq-item-accordion[open] summary::after {
  content: "–"; /* Change to minus sign */
  transform: translateY(-50%) rotate(0deg);
  color: var(--dark-color);
}

/* Style for the answer content */
.faq-answer-content {
  padding: 1rem var(--padding-base) 1.5rem;
  background-color: #f9f9f9;
  /* Optional: Smooth slide effect for browsers that support it */
  animation: fadein 0.3s ease-in;
}

.faq-answer-content p {
  margin: 0;
}

/* Simple keyframes for a visual fade-in */
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------- */
/* 🌟 NEW PREPARATION PAGE STYLES 🌟 */
/* ----------------------------------------------------- */

.preparation-guide-container {
  max-width: 850px;
  margin: 3rem auto;
  text-align: left; /* Ensure text is left-aligned in the guide */
}

.prepare-step {
  display: flex;
  align-items: flex-start; /* Aligns icon and content at the top */
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
}

.prepare-step:last-of-type {
  border-bottom: none; /* No line after the last step */
}

.prepare-icon {
  font-size: 2.2rem; /* Large, noticeable icon */
  flex-shrink: 0; /* Prevents icon from shrinking on small screens */
  width: 35px; /* Fixed width for alignment */
  text-align: center;
}

.prepare-step .step-content {
  flex-grow: 1;
}

.prepare-step h3 {
  color: var(--dark-color);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

/* Visually distinct highlight box */
.important-highlight-box {
  margin: 4rem auto 2rem;
  padding: 2.5rem;
  background-color: var(--brand-color); /* Use light blue brand color */
  color: var(--dark-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.important-highlight-box h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  /* Use the dark color for contrast */
  color: var(--dark-color);
}

.important-highlight-box p {
  font-size: 0.9rem;
  line-height: 1.8;
}

/* Mobile adjustments (ensures good spacing) */
@media screen and (max-width: 600px) {
  .prepare-step {
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .prepare-icon {
    font-size: 2rem;
    width: 30px;
  }

  .important-highlight-box {
    padding: 1.5rem;
  }
}

/* ----------------------------------------------------- */
/* 🌟 NEW COUNSELLOR PROFILE STYLES 🌟 */
/* ----------------------------------------------------- */

.counsellor-profile-container {
  max-width: 900px;
  margin: 2rem auto 4rem;
  text-align: left;
}

.profile-card {
  padding: var(--padding-base);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.counsellor-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%; /* Circular photo for a friendly look */
  border: 4px solid var(--brand-color);
  flex-shrink: 0;
}

.credentials h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

.credentials p {
  color: var(--text-color);
  font-size: 0.95rem;
  margin: 0;
}

.profile-bio {
  margin-bottom: 2rem;
}

.profile-bio h2 {
  color: var(--brand-color);
  border-left: 4px solid var(--dark-color);
  padding-left: 10px;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Specialties Section Styling */
.specialties {
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}

.specialties h2 {
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.6rem;
}

.specialty-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.specialty-item {
  flex-basis: 45%; /* Two items per row on desktop */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem;
  background-color: #f8fbfc;
  border-radius: 6px;
  border: 1px solid var(--link-hover);
}

.specialty-item i {
  color: var(--dark-color);
  font-size: 1.2rem;
}

.specialty-item p {
  margin: 0;
  font-weight: 500;
  color: var(--dark-color);
}

/* Mobile Responsiveness for Profile */
@media screen and (max-width: 650px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .counsellor-photo {
    width: 120px;
    height: 120px;
  }

  .specialty-grid {
    flex-direction: column; /* Stacks specialties vertically on mobile */
    gap: 0.75rem;
  }

  .specialty-item {
    flex-basis: 100%;
  }
}
/* --- Services Page Specific Styles --- */
/* Styling for the Fee Table */
.fee-structure-section {
  margin-top: 40px;
  padding: 40px 0;
  border-top: 1px solid #ddd;
}

.info-note {
  font-style: italic;
  color: #555;
  padding: 10px 0 20px;
  font-size: 0.95rem;
}

/* Table Container (for responsiveness and border) */
.fee-table-container {
  overflow-x: auto; /* Allows horizontal scroll on very small screens */
  margin-top: 20px;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.fee-structure-section table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.fee-structure-section th {
  background-color: var(--color-primary); /* Brand color header */
  color: var(--color-text-dark);
  padding: 15px 20px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary-dark);
}

.fee-structure-section td {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.fee-structure-section tbody tr:nth-child(even) {
  background-color: var(--color-background-light); /* Alternating row color */
}

.fee-structure-section tbody tr:last-child td {
  border-bottom: none;
}

.fee-structure-section .cta-link {
  margin-top: 30px;
  width: 100%; /* Full width on mobile */
  text-align: center;
  font-size: 1rem;
  padding: 12px 20px;
}

/* On larger screens, the CTA link centers naturally or uses less width */
@media (min-width: 768px) {
  .fee-structure-section .cta-link {
    width: auto;
  }
}

/* Styling for the Service Cards and Layout */
.service-types-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default to single column for mobile */
  gap: 30px;
}

.service-card {
  padding: 25px;
  border-left: 5px solid var(--color-primary); /* Branded accent line */
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-5px); /* Subtle lift on hover */
}

.icon-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.icon-header i {
  font-size: 2rem;
  color: var(--color-primary);
}

.service-card h3 {
  margin: 0;
  color: var(--color-primary-dark);
}

/* Media Query for Tablet/Desktop Layout */
@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr); /* Three columns on desktop */
  }
}
