:root {
    /* Harmonized Variables (Green theme) */
    --max-width: 1100px;
    --accent: #2e7d32; /* Islamic Green */
    --secondary: #1b5e20;
    --muted: #666;
    --bg-light: #f9f9f9; /* Used for hero/section backgrounds */
    --white: #ffffff;
    --text-dark: #333333;
    --header-height: 120px; /* NEW: Variable based on logo size (120px + padding) */
    --gap: 18px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
      "Helvetica Neue", Arial;
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    background: var(--bg-light); /* Changed to use bg-light */
    color: var(--text-dark);
    line-height: 1.5;
  }
  .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* --- HEADER AND NAVIGATION --- */
  
  .site-header {
    background: var(--white);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* NEW PADDING for 120px logo */
    padding: 15px 20px; 
  }
  
  /* 1. Standard Logo Size (For About, Courses, Contact, Gallery) */
.logo-img {
    height: 90px; /* Standard size */
    width: auto;
    display: block;
    transition: height 0.3s ease; /* Smooth transition */
  }
  
  /* 2. Special Class for Homepage Only */
  .logo-home {
    height: 160px !important; /* Much larger for the homepage */
  }
  
  /* Responsive Adjustments */
  @media (max-width: 768px) {
    .logo-img {
      height: 70px; /* Mobile standard */
    }
    .logo-home {
      height: 100px !important; /* Mobile homepage (still larger than standard) */
    }
  }
  .site-title {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
  }
  .slogan {
    font-size: 0.85rem;
    color: var(--muted);
  }
  
  .nav {
    margin-left: auto;
    display: flex;
    gap: 14px;
  }
  .nav a {
    text-decoration: none;
    color: var(--text-dark); /* Changed from muted to dark text for visibility */
    padding: 14px 6px;
    font-weight: 500;
  }
  .nav a.active,
  .nav a:hover {
    color: var(--accent);
  }
  .nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 8px;
    cursor: pointer;
  }
  
  /* --- BUTTONS AND HERO --- */
  
  .hero {
    background: var(--bg-light);
    padding: 60px 0;
    border-bottom: 1px solid #eee;
  }
  .hero h2 {
      color: var(--text-dark);
  }
  .btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    background: var(--accent);
    color: var(--white);
    font-weight: bold;
    transition: background 0.3s;
  }
  .btn:hover {
      background: var(--secondary);
  }
  
  /* --- CONTENT SECTIONS (General) --- */
  
  .intro {
    padding: 40px 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }
  .intro h2 {
    margin-top: 0;
    color: var(--accent);
  }
  .highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* Increased gap */
    margin: 28px 0;
    padding-bottom: 60px;
  }
  .highlights article {
    background: var(--white);
    padding: 25px; /* Increased padding */
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  .highlights article h3 {
    color: var(--accent);
    margin-top: 0;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
  }
  .highlights strong {
      color: var(--secondary);
  }
  
  /* --- GALLERY PAGE STYLES --- */
  
  .gallery-content { padding: 50px 0; }
  .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
  }
  .gallery-item {
      background: var(--white);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 10px rgba(0,0,0,0.05);
      line-height: 0; 
  }
  .gallery-item img {
      width: 100%;
      height: auto;
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
  }
  .gallery-item img:hover {
      transform: scale(1.05);
  }
  
  /* --- COURSES PAGE STYLES --- */
  
  .page-hero { background-color: var(--bg-light); padding: 50px 0; text-align: center; }
  .page-hero h1 { margin: 0; font-size: 2.2rem; color: var(--accent); }
  .course-content { padding: 50px 0; }
  .course-card {
      background: var(--white);
      padding: 30px;
      border-radius: 8px;
      border: 1px solid #eee;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      margin-bottom: 30px;
  }
  .course-card h2 { color: var(--accent); border-bottom: 2px solid var(--bg-light); padding-bottom: 10px; }
  .course-card h3 { margin-top: 30px; color: var(--secondary); }
  .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
  .admission-box { background: #e8f5e9; padding: 25px; border-radius: 6px; }
  
  
  /* --- CONTACT PAGE STYLES --- */
  
  .contact-content { 
      padding: 50px 0; 
      display: grid; 
      grid-template-columns: 1fr 2fr; 
      gap: 40px;
      max-width: 1000px;
      margin: 0 auto;
  }
  .contact-info {
      background: var(--bg-light);
      padding: 30px;
      border-radius: 8px;
      height: fit-content;
  }
  .contact-info h2 { color: var(--accent); margin-top: 0;}
  .contact-form { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
  
  .contact-form label { display: block; margin-bottom: 15px; font-weight: 500; }
  .contact-form input,
  .contact-form textarea {
      width: 100%;
      padding: 12px;
      border: 1px solid #ddd;
      border-radius: 6px;
      margin-top: 5px;
      font-size: 1rem;
      font-family: inherit;
  }
  .contact-form textarea { resize: vertical; min-height: 120px; }
  .btn-submit {
      /* Use same style as .btn but apply as a class */
      display: inline-block;
      padding: 12px 20px;
      border-radius: 8px;
      text-decoration: none;
      background: var(--accent);
      color: white;
      border: none;
      cursor: pointer;
      font-weight: 600;
      transition: background 0.3s;
  }
  .btn-submit:hover { background: var(--secondary); }
  #formResult { margin-top: 15px; font-weight: 500; color: var(--accent); }
  
  
  /* --- FOOTER --- */
  
  .site-footer {
    background: #222; /* Changed to dark for contrast */
    color: #ccc;
    margin-top: 40px;
    padding: 40px 0; /* Increased padding */
  }
  .site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
  }
  .site-footer .contacts p {
    margin: 6px 0;
    color: #ccc;
  }
  .site-footer .links a {
    display: block;
    text-decoration: none;
    color: #ccc;
    margin: 4px 0;
  }
  .copyright {
      text-align: center;
      margin-top: 30px;
      font-size: 0.9rem;
      border-top: 1px solid #444;
      padding-top: 20px;
      width: 100%;
  }
  
  
  /* --- RESPONSIVE --- */
  
  @media (max-width: 880px) {
    .highlights {
      grid-template-columns: 1fr;
    }
    .grid-2, .gallery-grid, .contact-content {
        grid-template-columns: 1fr;
    }
  }
  @media (max-width: 768px) {
    .nav {
      display: none;
      /* Mobile-specific styles for overlay menu */
      position: absolute;
      flex-direction: column;
      width: calc(100% - 40px); /* Full width minus container padding */
      top: 100%; /* Positioned below the header */
      left: 20px;
      background: var(--white);
      padding: 10px;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    }
    /* Show navigation when 'nav-open' class is applied by JS */
    .nav.nav-open {
      display: flex;
    }
    .nav-toggle {
      display: block;
      margin-left: auto;
    }
      /* Mobile logo adjustment */
      .logo-img {
          height: 80px; /* Smaller logo on small screens */
      }
      .site-header .container {
          padding: 10px 20px; /* Reduced mobile padding */
      }
  }
/* Homepage Logo Styles */
.logo-container {
    display: block;
    text-align: center;
    margin-bottom: 20px;
}
/* Mobile adjustment for the big logo */
@media (max-width: 768px) {
    .logo-img {
        height: 100px !important; /* Smaller on phone */
    }
}
