/* ================================
   Islamic Tuition Website Styling
   ================================ */

/* 🔷 CSS Variables for Theme */
:root {
  --primary: #003366;
  --accent: #ffcc00;
  --background: #f9f9f9;
  --text: #222;
  --highlight: #e2f0d9;
  --light: #f4f4f4;
  --white: #ffffff;
}

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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: var(--background);
  color: var(--text);
  padding-bottom: 100px;
}

/* ====================
   Header, Top Bar & Navigation
   ==================== */

/* 🔷 Header Wrapper */
header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 0;
  position: relative;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-section img {
  height: 60px;
  width: auto;
  display: block;
}

.site-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

/* 🔷 Navigation Menu */
#nav-menu {
  display: none;
  flex-direction: column;
  padding: 10px;
  margin-left: auto;

}

#nav-menu.show {
  display: flex;
}

nav ul {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  list-style: none;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

nav ul li a:hover {
  text-decoration: underline;
}

/* 🔷 Menu Toggle (mobile only) */
.menu-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
}

/* ====================
   Shared Page Hero (banner)
   ==================== */
.page-hero {
  --hero-img: url('/images/page-hero.jpg');
  background: var(--hero-img) center/cover no-repeat;
  min-height: 240px;              /* adjust height to taste */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;             /* keeps overlay on top nicely */
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);   /* darken image for readable text */
  z-index: 0;
}

.page-hero__overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 2rem 1rem;
  max-width: 900px;
}

.page-hero__overlay h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 0 .5rem;
  font-weight: 700;
}

.page-hero__overlay p {
  font-size: 1.05rem;
  opacity: 0.95;
}

/* Trial button in home page header */
.trial-btn {
  display: inline-block;
  background-color: #ffcc00;
  color: #003366;
  font-weight: bold;
  padding: 12px 28px;
  margin-top: 20px;
  border-radius: 6px;
  font-size: 1.1rem;
  text-decoration: none;
  transition: 0.3s ease;
}

.trial-btn:hover {
  background-color: #e6b800;
  color: white;
}

/* ====================
   Hero Slider Section
   ==================== */
.hero-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 40px;
  margin-bottom: 50px;
}

 .swiper-slide.hero-slide-split {
  display: flex !important;
  flex-direction: row !important;
  align-items: center; /* Image left, content right */
  width: 100%;
  min-height: 80vh; /* full hero look */
}

.slide-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 80vh;
}

.slide-content {
  flex: 1;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  color: #333;
}

.slide-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.slide-content .btn {
  background: #00a884;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.slide-content .btn:hover {
  background: #008f72;
}

/* Swiper Pagination Styling */
.swiper-pagination {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ====================
   Buttons
   ==================== */
.btn {
  background: var(--accent);
  color: black;
  padding: 0.8rem 1.2rem;
  border: none;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  display: inline-block;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #e6b800;
}

/* ====================
   Section Headings
   ==================== */
.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary);
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ====================
   About Section
   ==================== */
.page-header {
  background-color: #f0f0f0;
  padding: 2rem;
  text-align: center;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
/* ====================
   About Section (Centered Content)
   ==================== */
.about-section {
  padding: 3rem 1.5rem;
  background: var(--white);
  text-align: center;              /* center-align content */
  max-width: 900px;                /* limit width for readability */
  margin: 2rem auto;               /* center in the page */
  line-height: 1.7;
  font-size: 1.1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.about-section h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-section p {
  margin-bottom: 1.5rem;
}

.about-section ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-section ul li {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

/* ====================
   Courses Section
   ==================== */
.courses-section {
  padding: 2rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.course-card {
  background: var(--white);
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.course-card:hover {
  transform: translateY(-5px);
}

/* ====================
   Features Section
   ==================== */
.features-section {
  padding: 3rem 1rem;
  background: var(--background);
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: auto;
}

.feature-box {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-icon {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ====================
     Why Us Section
   ==================== */
.why-us-container {
  background: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

.why-us-container .section-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #003366;
  font-weight: bold;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.why-us-item {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.why-us-item:hover {
  transform: translateY(-5px);
}

.why-us-item i {
  font-size: 2.2rem;
  color: #00a884;
  margin-bottom: 15px;
}

.why-us-item h3 {
  font-size: 1.2rem;
  color: #003366;
  margin-bottom: 10px;
}

.why-us-item p {
  font-size: 0.95rem;
  color: #555;
}

   /* ====================
   Featured Courses
   ==================== */
.courses-page {
        max-width: 1000px;
        margin: 2rem auto;
        padding: 1rem;
      }
      .intro-text {
        text-align: center;
        color: #444;
        margin-bottom: 2rem;
      }
      .package {
        margin-bottom: 2.5rem;
        padding: 1.5rem;
        background: #f9f9f9;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
      }
      .package h2 {
        color: #003366;
        margin-bottom: 0.5rem;
      }
      .package-desc {
        font-style: italic;
        margin-bottom: 1rem;
        color: #666;
      }
      .levels {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
      }
      .level-card {
        background: #fff;
        padding: 1rem;
        border-left: 5px solid #003366;
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
      }
      .level-card h3 {
        margin-top: 0;
        color: #003366;
      }
      .level-card p {
        color: #555;
        margin: 0.5rem 0 0;
      }
      .no-levels {
        color: #999;
        font-style: italic;
      }

/* ====================
   Unified Form Wrapper
   ==================== */
.form-wrapper {
  max-width: 600px;
  margin: 40px auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-wrapper form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-wrapper label {
  font-weight: bold;
}

.form-wrapper input,
.form-wrapper select,
.form-wrapper textarea {
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.form-wrapper button,
.form-wrapper .btn {
  background-color: #00a884;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 1rem;
  cursor: pointer;
}

.form-wrapper button:hover,
.form-wrapper .btn:hover {
  background-color: #00856f;
}

.alert {
  padding: 12px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-weight: bold;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ====================
   Fees Section
   ==================== */

.fees-container {
  max-width: 900px;
  margin: 50px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.plan-card {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.plan-card h2 {
  color: #003366;
  margin-bottom: 10px;
}

.plan-card p {
  color: #555;
}

.trial-notice {
  grid-column: 1 / -1;
  background: #00a88433;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

/* ====================
   Trial Banner
   ==================== */
.trial-banner {
  background: #00a884;
  color: white;
  padding: 10px;
  text-align: center;
  margin: 20px 0;
  border-radius: 6px;
}
.trial-banner a {
  color: #fff;
  text-decoration: underline;
}

/* ====================
   Student Payment page
   ==================== */

.form-title {
  text-align: center;
  color: #003366;
  margin-bottom: 1rem;
}

.student-info {
  text-align: center;
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: #555;
}

.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: bold;
  margin-left: 6px;
}

.status-badge.paid {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.due {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.pay-btn {
  display: block;
  width: 100%;
  margin-top: 15px;
}

.trial-note {
  text-align: center;
  margin-top: 15px;
  font-size: 0.95rem;
  color: #666;
}

/* ====================
   Auth Boxes (Admin)
   ==================== */
.auth-box {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #ccc;
  background: var(--background);
  border-radius: 8px;
}

/* ====================
   Footer
   ==================== */

footer {
  margin-top: 50px;
  color: white;
  font-size: 14px;
}

.footer-main {
  background: #003366;
  display: flex;
  justify-content: space-between;
  padding: 30px;
}
.footer-column h3 {
  margin-bottom: 10px;
  color: #ffd700;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin: 5px 0;
}
.footer-column ul li a {
  color: white;
  text-decoration: none;
}
.footer-column ul li a:hover {
  color: #ffd700;
}
.social-icons a {
  margin-right: 10px;
  color: white;
  font-size: 18px;
}
.social-icons a:hover {
  color: #ffd700;
}
.footer-bottom {
  background: #001f4d;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #ccc;
}

.footer-bottom p {
  margin: 0.3rem 0;
}

/* ====================
   Messages
   ==================== */
.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #c3e6cb;
}

/* ====================
   admin dashboard
   ==================== */

.dashboard-shell {
        display: grid;
        grid-template-columns: 240px 1fr;
        min-height: 100vh;
      }

      .sidebar {
        background: #003366;
        color: white;
        padding: 1rem;
      }
      .sidebar-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
      }
      .sidebar-menu {
        list-style: none;
        padding: 0;
        margin: 0;
      }
      .sidebar-menu li {
        margin: 0.8rem 0;
      }
      .sidebar-menu a {
        color: white;
        text-decoration: none;
      }
      .sidebar-menu a:hover {
        text-decoration: underline;
      }

      .content {
        padding: 2rem;
        background: #f9f9f9;
      }

      .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
      }
      .card {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        text-align: center;
      }
      .card h3 {
        margin-bottom: 0.5rem;
        color: #003366;
      }
      .card p {
        font-size: 1.5rem;
        font-weight: bold;
        color: #00a884;
      }

      .content h1 { 
        color: #003366; 
        margin-bottom: 1rem;
       }

      .filter-section {
         margin: 1rem 0; 
        }

      /* Table container for scroll */
.table-container {
  overflow-x: auto;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 1rem;
}

#enrollmentsTable th {
  background: #003366;
  color: #fff;
}

#enrollmentsTable td, 
#enrollmentsTable th {
  padding: 0.75rem;
  border: 1px solid #ddd;
}

      .approve-btn {
        background: #13dc24;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
      }
      .approve-btn:hover { background: #0b8b16; }
      .delete-btn {
        background: #c62828;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
      }
      .delete-btn:hover { background: #b71c1c; }

/* ====================
   Media Queries (Mobile)
   ==================== */
@media (max-width: 768px) {
  
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
    position: relative;
    z-index: 1001;
    background: none;
    border:none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
  }

  #nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary);
    padding: 1rem 1.5rem;
    position:absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
  }
  #nav-menu.show {
    display: flex;
    
  }

  /* Hero slider mobile layout */
  .hero-slide-split {
    flex-direction: column;
  }

  .slide-image {
    width: 100%;
    height: 40vh;
  }

  .slide-content {
    width: 100%;
    height: auto;
    padding: 2rem;
    text-align: center;
    justify-content: flex-start;
  }

  .slide-content h2 {
    font-size: 2rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  .slide-content .btn {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-section {
    flex-direction: column;
  }

  .hero-slider {
    margin-top: 0;
    
  }
    .page-hero {
    min-height: 180px;
  }
  .page-hero__overlay h1 {
    font-size: 1.7rem;
  }
  .page-hero__overlay p {
    font-size: .95rem;
  }

  /* Footer responsive fix */
  .footer-main {
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: 1.5rem;
    text-align: center; /* center content for mobile */
  }

  .footer-column {
    width: 100%;
  }

  .footer-column ul {
    padding: 0;
    list-style: none;
  }

  .footer-column h3 {
    margin-bottom: 0.5rem;
  }

  .footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

}

/* ====================
   Navigation (Desktop)
   ==================== */
@media (min-width: 769px) {
  #nav-menu {
    display: flex !important;   /* Always visible */
    position: static;
    flex-direction: row;
    background: none;
    width: auto;
    padding: 0;
  }

  .menu-toggle {
    display: none;   /* Hide hamburger button */
  }

  nav ul {
    flex-direction: row;   /* Horizontal */
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .page-hero {
    min-height: 300px;
  }
  .page-hero__overlay h1 {
    font-size: 2.6rem;
  }
}