/* General Body */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Header / Navbar */
.topbar {
  width: 100%;
  /* max-width: 1200px; */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  box-sizing: border-box;
  background: #fff;   /* white background */
  position: relative;
  z-index: 10;
  border-bottom: 1px solid #eee; /* subtle divider */
}

/* Logo styling */
.logo {
  height: 70px;
  width: 70px;
  border-radius: 50%;   /* circular */
  object-fit: contain;  /* fit logo inside */
  background: white;    /* clean circle background */
  padding: 5px;         /* spacing around logo */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* optional subtle shadow */
}

/* Navbar list */
.nav-list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  color: #333;   /* dark text */
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: color 0.2s ease-in-out;
}

.nav-list li a:hover {
  color: #007b5e;  /* green hover */
}

/* Donate Button */
.btn-donate {
  background: #007b5e;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}
.btn-donate:hover { background: #005f46; }
/* Transparent prayer bar */
header.hero .prayer-bar {
  background: rgba(44, 122, 123, 0.25); /* teal, 60% visible */
  backdrop-filter: blur(4px); /* subtle blur for readability */
}

header.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  color: #fff;                 /* white text */
  text-shadow: 2px 2px 6px #000; /* glow for readability */
}

header.hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #f9f9f9;              /* softer white */
  text-shadow: 1px 1px 4px #000;
  max-width: 700px;
  margin: 0 auto 20px;
}


.prayer-bar {
  background: rgb(44, 122, 123);
  backdrop-filter: blur(4px);
  font-size: 1.1rem;          /* smaller font */
  font-weight: bold;           /* lighter weight */
  padding: 10px 0;         /* less padding */
  display: flex;
  justify-content: space-between; /* push left/right */
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;                  /* tighter spacing */
}

.prayer-bar span {
  margin: 0 25px; /* more spacing between each time */
  display: inline-block;
}


#prayer-title {
  color: #fffae5;
  font-size: 1rem;            /* smaller title */
  font-weight: 600;
  margin-right: 6px;
}

#prayer-times {
  font-size: 0.85rem;
  line-height: 1.3;
  color: #fff;
  font-weight: bold;
}

#gregorian-date, #hijri-date {
  font-size: 0.8rem;          /* compact dates */
  color: #fffae5;
  white-space: nowrap;
}

.jummah-reminder {
  color: #ffd54f;             /* softer highlight */
  font-weight: 600;
}

@media (max-width: 768px) {
  .prayer-bar {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }
}

/* Hamburger */
.menu-toggle {
  font-size: 28px;
  color: #333;   /* dark icon now */
  cursor: pointer;
  display: none;
}

/* Sidebar */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0; left: 0;
  background-color: #004d40;
  overflow-x: hidden;
  transition: 0.4s;
  padding-top: 60px;
  z-index: 1000;
}
.sidebar ul { list-style: none; padding: 0; }
.sidebar ul li { padding: 15px 25px; }
.sidebar ul li a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  display: block;
}
.sidebar ul li a:hover { background: #00695c; border-radius: 5px; }
.sidebar.active { width: 250px; }

/* Transparent navbar on home page only */
header.hero .topbar {
  background: transparent;
  border-bottom: none;
  position: absolute; /* overlay on hero */
  top: 0;
  left: 0;
  width: 100%;
}

header.hero {
  background: url('images/iseb1.png') no-repeat center center/cover;
  height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white; /* or maybe dark text if you lighten image */
  text-align: center;
  padding: 40px 20px;
  position: relative;
}

header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

header.hero h1, header.hero p, header.hero .btn {
  position: relative;
  z-index: 2;
}

/* Small Header (Inner pages) */
header.small-header {
  background: #fff;   /* white background */
  color: #222;        /* dark text for visibility */
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee; /* subtle divider */
  position: relative;
}

header.small-header h1 {
  margin: 25px auto 15px;
  max-width: 1100px;
  padding: 0 20px;
  font-size: 2rem;
  color: #111;        /* strong dark headline */
}


/* Buttons */
.btn {
  background: #007b5e;
  color: #fff;
  padding: 12px 25px;
  margin: 5px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}
.btn:hover { background: #005f46; }

/* Sections */
section {
  padding: 50px 20px;
  max-width: 1100px;
  margin: auto;
}

/* Programs Grid */
.programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* bigger min width */
  gap: 30px; /* more breathing room */
  text-align: center;
}

/* Each Program Tile */
.programs div {
  padding: 30px;
  border: none; /* cleaner look */
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2); /* deeper shadow for emphasis */
}

/* Unified Program Tile Style */
.program-tile {
  padding: 40px 25px; /* extra space */
  border-radius: 16px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25); /* stronger shadow */
  background-size: cover;
  background-position: center;
  min-height: 350px; /* taller tiles */
}

/* Overlay for readability */
.program-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45); /* dark overlay improves text contrast */
  border-radius: 16px;
  z-index: 0;
}

/* Text Styling inside tiles */
.program-tile h3,
.program-tile p,
.program-tile a {
  position: relative;
  z-index: 1;
}

.program-tile h3 {
  font-size: 1.8rem; /* larger heading */
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.6); /* ensures readability */
}

.program-tile p {
  font-size: 1.1rem;
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6); /* softer readability */
}

/* Events List */
ul.events-list { list-style: none; padding: 0; text-align: center; }
ul.events-list li { margin: 10px 0; }

/* Iqama Section */
.iqama-section {
  max-width: 800px;
  margin: 40px auto;
  text-align: center;
}
.iqama-section h2 { margin-bottom: 20px; color: #2c7a7b; }
.iqama-table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.iqama-table th, .iqama-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
}
.iqama-table th { background: #2c7a7b; color: white; }
.iqama-table tr:nth-child(even) { background: #f9f9f9; }
/* Highlight next prayer row */
.highlight-row {
  background: #fff8e1;
  font-weight: bold;
  border-left: 4px solid #ff9800;
}


/* Board */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  text-align: center;
  padding: 10px 0 30px;
}
.board-member h4 { margin: 8px 0 4px; }
.board-member p { margin: 0; color: #555; }

/* Footer */
footer {
  background: #f5f5f5;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  margin-top: 40px;
}

/* About Page Cards */
.about-section, .vision-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  line-height: 1.7;
  font-size: 1.05rem;
}
.about-section { background: #f9fafc; border-left: 6px solid #2c7a7b; }
.vision-section { background: #ffffff; border-left: 6px solid #3182ce; }
.about-section h2, .vision-section h2 {
  color: #2d3748;
  font-size: 1.8rem;
  margin-bottom: 15px;
}
.about-section h3 { color: #2c7a7b; margin-top: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .menu-toggle { display: block; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .logo { height: 60px; }
  header.hero { height: 60vh; }
  .prayer-bar { font-size: 0.8rem; padding: 5px 0; }
}

/* Islamic Events Table */
.islamic-events-upcoming {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.islamic-events-upcoming h2 {
  font-size: 1.8rem;
  color: #2c7a7b;
  margin-bottom: 20px;
  text-align: center;
}
.events-table {
  width: 100%;
  border-collapse: collapse;
}
.events-table thead th {
  text-align: left;
  padding: 12px;
  background: #f0f4f5;
  color: #333;
}
.events-table tbody tr:nth-child(even) {
  background: #f9f9f9;
}
.events-table td {
  padding: 12px;
  vertical-align: top;
}
.events-footer {
  text-align: center;
  margin-top: 20px;
}
.btn-explore {
  display: inline-block;
  padding: 10px 20px;
  background: #007b5e;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease;
}
.btn-explore:hover {
  background: #005f46;
}
/* Highlight next upcoming Islamic event */
.events-table tr.next-event {
  background-color: #fff8e1;   /* soft yellow highlight */
  font-weight: bold;
  border-left: 4px solid #ff9800;
}

.avatar-initial {
  width: 100px;
  height: 100px;
  border-radius: 50%;       /* Perfect circle */
  background: linear-gradient(135deg, #2685b2, #38b2ac);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin: 0 auto 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.board-member:hover .avatar-initial {
  transform: scale(1.1);
  background: linear-gradient(135deg, #38b2ac, #2c7a7b);
}
/* =====================================================
   🌙 FINAL ISEB NAVBAR + DROPDOWN FIX (No flicker, no jump)
   ===================================================== */

.navbar {
  position: relative;
  z-index: 1000;
}

/* Main nav list */
.navbar .nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Remove bullets globally */
.navbar ul,
.navbar li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Dropdown wrapper */
.navbar .dropdown {
  position: relative;
}

/* Dropdown toggle link */
.navbar .dropdown > a {
  position: relative;
  z-index: 2;
}

/* Dropdown menu */
.navbar .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  padding: 8px 0;
  margin: 0;
  list-style: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.navbar .dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar .dropdown-menu li a:hover {
  background: #f5f5f5;
  color: #2c7a7b;
}

/* =====================================================
   💻 Desktop hover — smooth, no layout jump
   ===================================================== */
@media (min-width: 768px) {
  .navbar .dropdown:hover > .dropdown-menu,
  .navbar .dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .navbar .dropdown-menu {
    display: block;
    visibility: hidden;
  }

  .navbar .dropdown:hover .dropdown-menu,
  .navbar .dropdown:focus-within .dropdown-menu {
    visibility: visible;
  }

  /* Desktop always shows nav inline */
  .navbar .nav-list {
    display: flex !important;
    background: none;
    position: static;
    flex-direction: row;
  }

  .menu-toggle {
    display: none !important;
  }
}

/* =====================================================
   📱 Mobile behavior — hide nav until toggled
   ===================================================== */
@media (max-width: 767px) {
  .navbar .nav-list {
    display: none;
    flex-direction: column;
    background: #004d40;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 9999;
    transition: all 0.3s ease;
  }

  .navbar .nav-list.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .navbar .nav-list li a {
    color: #fff;
    padding: 12px 20px;
    display: block;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .navbar .nav-list li a:hover {
    background: rgba(255,255,255,0.1);
  }

  .navbar .dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
    padding-left: 16px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }

  .navbar .dropdown.open > .dropdown-menu {
    display: block;
  }

  .menu-toggle {
    display: block !important;
  }
}

/* Nav hover polish */
.navbar .nav-list li a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar .nav-list li a:hover,
.navbar .nav-list li a.active {
  color: #007b5e;
  background: rgba(0, 123, 94, 0.1);
}
/* ===============================================
   ISLAMIC GUIDE PAGE STYLING
   =============================================== */
.guide-main {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.guide-card {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 25px 20px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.guide-card:hover {
  background: #f0fdfb;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  transform: translateY(-5px);
}

.guide-card h3 {
  font-size: 1.3rem;
  color: #2c7a7b;
  margin-bottom: 12px;
}

.guide-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}


 /* Floating Chat Widget */
    #chat-widget {
      position: fixed;
      bottom: 20px;
      right: 20px;
      font-family: Arial, sans-serif;
      z-index: 1000;
    }

    #chat-toggle {
      background: #2c7a7b;
      color: #fff;
      border: none;
      padding: 12px 18px;
      border-radius: 25px;
      cursor: pointer;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    #chat-box {
      display: none;
      background: #fff;
      border-radius: 12px;
      padding: 20px;
      width: 300px;
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
      margin-bottom: 10px;
    }

    #chat-box h3 {
      margin-top: 0;
      text-align: center;
      color: #2c7a7b;
    }

    #chat-box input,
    #chat-box textarea {
      width: 100%;
      margin: 8px 0;
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 6px;
    }

    #chat-box button {
      width: 100%;
      padding: 10px;
      background: #ff7a00;
      color: #fff;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-weight: bold;
    }

    #chat-box button:hover {
      background: #cc6300;
    }

/* Overlay for sidebar background click */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

/* Show overlay when sidebar is open */
.sidebar.active + .sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

