/*
Theme Name: Jamiatul Ilm Wal Huda
Theme URI: https://www.jamiah.co.uk
Author: Jamiah Web Team
Description: Official theme for Jamiatul Ilm Wal Huda — College of Islamic Knowledge & Guidance. Features gold & navy branding, Customizer-editable content, and responsive design.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: jamiah
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  color: hsl(220, 20%, 18%);
  background: #fff;
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', Georgia, serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

/* ── Variables ── */
:root {
  --primary: hsl(38, 85%, 50%);
  --primary-fg: #fff;
  --foreground: hsl(220, 20%, 18%);
  --background: #fff;
  --card: hsl(40, 30%, 97%);
  --muted: hsl(220, 10%, 45%);
  --accent: hsl(210, 60%, 35%);
  --secondary: hsl(40, 25%, 93%);
  --border: hsl(40, 15%, 88%);
  --gold-gradient: linear-gradient(135deg, hsl(38, 85%, 50%), hsl(35, 75%, 42%));
  --hero-overlay: linear-gradient(180deg, hsla(220, 20%, 18%, 0.7), hsla(220, 20%, 18%, 0.85));
  --container: 1200px;
}

/* ── Utility ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.gold-accent { color: var(--primary); }
.gold-bar { background: var(--gold-gradient); height: 3px; width: 60px; margin: 0 auto; }
.section-label {
  color: var(--primary); font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; font-size: 0.875rem; margin-bottom: 12px;
}
.page-section { padding: 96px 0; }
.page-section.alt { background: var(--secondary); }
.page-header { text-align: center; margin-bottom: 48px; }
.page-header h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 16px; }
.page-header p { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: hsla(0, 0%, 100%, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar-brand { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.15rem; }
.navbar-links { display: flex; gap: 0; align-items: center; }
.navbar-links > .nav-item { position: relative; }
.navbar-links > .nav-item > a {
  display: block; padding: 20px 14px;
  font-size: 0.78rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--primary); transition: opacity 0.2s;
}
.navbar-links > .nav-item > a:hover { opacity: 0.7; }
/* Dropdown */
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--background); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 8px 24px hsla(220, 20%, 18%, 0.12); padding: 8px 0; z-index: 60;
}
.nav-item:hover > .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 10px 20px; font-size: 0.82rem; font-weight: 400;
  color: var(--foreground); text-transform: none; letter-spacing: 0; transition: background 0.15s;
}
.nav-dropdown a:hover { background: var(--secondary); color: var(--primary); }
/* Toggle */
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.navbar-toggle svg { width: 24px; height: 24px; stroke: var(--foreground); }
/* Mobile menu */
.mobile-menu { display: none; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--background); max-height: 80vh; overflow-y: auto; }
.mobile-menu .mobile-parent { font-weight: 600; }
.mobile-menu a { display: block; padding: 8px 0; font-size: 0.85rem; text-transform: uppercase; font-weight: 500; color: var(--primary); }
.mobile-menu .mobile-sub { padding-left: 16px; }
.mobile-menu .mobile-sub a { font-weight: 400; text-transform: none; font-size: 0.82rem; color: var(--foreground); padding: 6px 0; }
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-toggle { display: block; }
  .mobile-menu.open { display: block; }
}

/* ── Hero Carousel ── */
.hero {
  position: relative; min-height: 85vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; color: var(--primary-fg);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: var(--hero-overlay); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 0 24px; }
.hero-content .section-label { margin-bottom: 16px; }
.hero h1 { font-size: 3.5rem; font-weight: 700; line-height: 1.15; margin-bottom: 24px; }
.hero p { font-size: 1.15rem; font-weight: 300; opacity: 0.85; max-width: 600px; margin: 0 auto; }
/* Carousel dots */
.hero-dots {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 10px;
}
.hero-dot {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--primary-fg);
  background: transparent; cursor: pointer; transition: background 0.3s; padding: 0;
}
.hero-dot.active { background: var(--primary); border-color: var(--primary); }
@media (max-width: 768px) { .hero h1 { font-size: 2.2rem; } }

/* ── Announcements ── */
.announcements { padding: 48px 0; background: var(--background); }
.announce-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.announce-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; text-align: left; transition: box-shadow 0.3s;
  box-shadow: 0 2px 8px hsla(220, 20%, 18%, 0.06);
}
.announce-card:hover { box-shadow: 0 8px 24px hsla(38, 85%, 50%, 0.12); }
.announce-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; color: var(--foreground); }
.announce-card p { color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
.announce-btn {
  display: inline-block; background: var(--gold-gradient); color: var(--primary-fg);
  padding: 10px 24px; border-radius: 10px; font-weight: 600; font-size: 0.88rem;
  transition: opacity 0.2s;
}
.announce-btn:hover { opacity: 0.85; }

/* ── Principal ── */
.principal { padding: 96px 0; background: var(--secondary); }
.principal .inner { max-width: 800px; margin: 0 auto; text-align: center; }
.principal h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.principal .arabic { font-size: 1.3rem; margin-bottom: 24px; color: var(--primary); }
.principal .message p { color: var(--muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 16px; text-align: left; }
.principal .signature { margin-top: 32px; text-align: right; font-style: italic; color: var(--foreground); }
.principal .signature strong { display: block; font-style: normal; }

/* ── Programs Grid ── */
.programs { padding: 96px 0; }
.programs .header { text-align: center; margin-bottom: 64px; }
.programs h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.programs .header p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.1rem; }
.programs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.program-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 32px; transition: box-shadow 0.3s;
}
.program-card:hover { box-shadow: 0 10px 30px -10px hsla(38, 85%, 50%, 0.15); }
.program-icon {
  width: 48px; height: 48px; border-radius: 8px; background: hsla(38, 85%, 50%, 0.1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  color: var(--primary); font-size: 1.4rem;
}
.program-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.program-card p { color: var(--muted); line-height: 1.7; }
@media (max-width: 1024px) { .programs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .programs-grid { grid-template-columns: 1fr; } }

/* ── Contact Form ── */
.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 6px;
  font-family: inherit; font-size: 1rem; margin-bottom: 20px; background: var(--background);
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); outline: none; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button {
  background: var(--gold-gradient); color: var(--primary-fg); border: none;
  padding: 14px 32px; border-radius: 6px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: opacity 0.2s;
}
.contact-form button:hover { opacity: 0.9; }

/* ── Info Cards ── */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.info-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 32px;
}
.info-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 12px; }
.info-card p, .info-card li { color: var(--muted); line-height: 1.7; }
.info-card ul { padding-left: 20px; list-style: disc; }
.info-card ul li { margin-bottom: 8px; }
@media (max-width: 768px) { .info-grid { grid-template-columns: 1fr; } }

/* ── Achievements ── */
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: center; }
.achievement-item { padding: 32px; }
.achievement-number { font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.achievement-label { color: var(--muted); font-size: 1rem; }
@media (max-width: 768px) { .achievement-grid { grid-template-columns: 1fr; } }

/* ── Donations ── */
.donation-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.donation-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 32px;
}
.donation-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.donation-card p { color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.donation-card strong { color: var(--foreground); }
@media (max-width: 768px) { .donation-methods { grid-template-columns: 1fr; } }

/* ── Live Stream ── */
.livestream-container { max-width: 800px; margin: 0 auto; text-align: center; }
.livestream-embed {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: 8px; background: var(--card); border: 1px solid var(--border); margin-bottom: 24px;
}
.livestream-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.livestream-placeholder {
  display: flex; align-items: center; justify-content: center; min-height: 400px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-size: 1.1rem;
}

/* ── Footer ── */
.site-footer { background: var(--foreground); color: hsla(0,0%,100%,0.7); padding: 48px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.site-footer h3, .site-footer h4 { color: var(--primary-fg); }
.site-footer h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.site-footer h4 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.site-footer li { margin-bottom: 8px; font-size: 0.9rem; }
.site-footer li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid hsla(0,0%,100%,0.1); padding-top: 24px; text-align: center; font-size: 0.85rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── WordPress Alignment Classes ── */
.alignleft { float: left; margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 16px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 8px; }