/*
Theme Name:  Mambaul Ulum
Theme URI:   https://mambaululum.sch.id
Author:      Amor El-Kutub
Author URI:  https://instagram.com/amorelkutub
Description: WordPress Theme untuk Pondok Pesantren Mambaul Ulum Waru Sidoarjo. Generasi Qurani Pewaris Negeri. Dirancang khusus dengan tampilan modern, SEO-AEO optimized, mobile responsif, dan fitur manajemen konten lengkap.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License:     GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mambaul-ulum
Tags:        pesantren, islamic, education, custom-menu, custom-logo, featured-images, responsive-layout, right-sidebar, translation-ready
*/

/* =========================================================
   DESIGN SYSTEM — Mambaul Ulum v1.0
   Palet: Dark Cyan + Gold Islami + Navy Deep
   Font: Cormorant Garamond (display) + Nunito Sans (body)
   ========================================================= */

:root {
  /* === PRIMARY PALETTE === */
  --mu-cyan:        #037075;
  --mu-cyan-dark:   #025558;
  --mu-cyan-deeper: #013f42;
  --mu-cyan-light:  #0a9ca2;
  --mu-cyan-pale:   #e0f4f5;
  --mu-cyan-glass:  rgba(3, 112, 117, 0.12);

  /* === ACCENT GOLD (Islami Touch) === */
  --mu-gold:        #C9A84C;
  --mu-gold-dark:   #a68530;
  --mu-gold-light:  #e8c96b;
  --mu-gold-pale:   #fdf6e3;

  /* === NEUTRAL PALETTE === */
  --mu-dark:        #0d1f2d;
  --mu-dark-alt:    #1a2d3d;
  --mu-navy:        #12344d;
  --mu-text:        #2c3e50;
  --mu-text-light:  #5f7285;
  --mu-text-muted:  #8fa5b5;
  --mu-border:      #d4e8e9;
  --mu-light:       #f4f9f9;
  --mu-light-alt:   #e8f4f4;
  --mu-white:       #ffffff;

  /* === TYPOGRAPHY === */
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'Nunito Sans', 'Segoe UI', sans-serif;
  --font-arabic:    'Amiri', 'Traditional Arabic', serif;
  --font-mono:      'Fira Code', monospace;

  /* === SPACING SCALE === */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* === RADIUS === */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-sm:  0 1px 3px rgba(3,112,117,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(3,112,117,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 40px rgba(3,112,117,0.15), 0 4px 16px rgba(0,0,0,0.1);
  --shadow-xl:  0 20px 60px rgba(3,112,117,0.18), 0 8px 24px rgba(0,0,0,0.12);
  --shadow-gold: 0 4px 20px rgba(201,168,76,0.25);

  /* === TRANSITIONS === */
  --transition-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --transition-base:   300ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow:   500ms cubic-bezier(0.4,0,0.2,1);
  --transition-spring: 400ms cubic-bezier(0.34,1.56,0.64,1);

  /* === Z-INDEX === */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;

  /* === SECTION PADDING === */
  --section-py: clamp(3rem, 8vw, 6rem);
}

/* ── ALIAS VARIABLES (compat dengan main.css & front-page.css) ─── */
:root {
  --color-primary:   #037075;
  --color-primary-dark: #025a5e;
  --color-gold:      #C9A84C;
  --color-gold-dark: #a68530;
  --color-navy:      #0d1f2d;
  --color-navy-alt:  #12344d;
  --color-text:      #2c3e50;
  --color-text-muted:#6b7280;
  --color-light:     #f4f9f9;
  --section-padding: 5rem 0;
}


/* =========================================================
   BASE RESET
   ========================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mu-text);
  background-color: var(--mu-white);
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--mu-cyan); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--mu-cyan-light); }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--mu-dark);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

.text-arabic {
  font-family: var(--font-arabic);
  font-size: 1.3em;
  line-height: 1.8;
  direction: rtl;
  text-align: center;
}

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.container--wide  { max-width: 1400px; }
.container--narrow { max-width: 800px; }

.section { padding-block: var(--section-py); }
.section--dark { background: var(--mu-dark); color: var(--mu-white); }
.section--cyan { background: var(--mu-cyan); color: var(--mu-white); }
.section--light { background: var(--mu-light); }
.section--gold-bg { background: var(--mu-gold-pale); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* =========================================================
   SECTION HEADER PATTERN
   ========================================================= */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mu-gold);
  margin-bottom: var(--space-md);
}

.section-label::before,
.section-label::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--mu-gold);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--mu-dark);
  margin-bottom: var(--space-md);
}

.section-title span { color: var(--mu-cyan); }
.section-title--white { color: var(--mu-white); }
.section-title--white span { color: var(--mu-gold); }

.section-desc {
  font-size: 1.05rem;
  color: var(--mu-text-light);
  max-width: 600px;
  line-height: 1.8;
}

.section-desc--white { color: rgba(255,255,255,0.8); }

.section-header { margin-bottom: var(--space-3xl); }
.section-header--center { text-align: center; }
.section-header--center .section-desc { margin-inline: auto; }
.section-header--center .section-label { justify-content: center; }

/* =========================================================
   ISLAMIC GEOMETRIC PATTERN (SVG Background)
   ========================================================= */

.geo-pattern {
  position: relative;
  overflow: hidden;
}

.geo-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0 L60 15 L60 45 L30 60 L0 45 L0 15 Z' fill='none' stroke='rgba(3,112,117,0.06)' stroke-width='1'/%3E%3Cpath d='M30 10 L50 20 L50 40 L30 50 L10 40 L10 20 Z' fill='none' stroke='rgba(201,168,76,0.05)' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.geo-pattern > * { position: relative; z-index: 1; }

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--mu-cyan);
  color: var(--mu-white);
  border-color: var(--mu-cyan);
  box-shadow: 0 4px 15px rgba(3,112,117,0.3);
}

.btn-primary:hover {
  background: var(--mu-cyan-dark);
  border-color: var(--mu-cyan-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(3,112,117,0.4);
  color: var(--mu-white);
}

.btn-gold {
  background: var(--mu-gold);
  color: var(--mu-dark);
  border-color: var(--mu-gold);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: var(--mu-gold-dark);
  border-color: var(--mu-gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201,168,76,0.4);
  color: var(--mu-dark);
}

.btn-outline {
  background: transparent;
  color: var(--mu-white);
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--mu-white);
  color: var(--mu-cyan);
  border-color: var(--mu-white);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: transparent;
  color: var(--mu-cyan);
  border-color: var(--mu-cyan);
}

.btn-outline-cyan:hover {
  background: var(--mu-cyan);
  color: var(--mu-white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.82rem;
}

.btn svg, .btn .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
  background: var(--mu-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--mu-border);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--mu-cyan-pale);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-body { padding: var(--space-xl); }

.card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mu-cyan);
  margin-bottom: var(--space-sm);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mu-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--mu-text-light);
  line-height: 1.7;
}

/* =========================================================
   BADGES & TAGS
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-cyan { background: var(--mu-cyan-pale); color: var(--mu-cyan-dark); }
.badge-gold { background: var(--mu-gold-pale); color: var(--mu-gold-dark); }
.badge-dark { background: var(--mu-dark); color: var(--mu-white); }

/* =========================================================
   FORM ELEMENTS
   ========================================================= */

.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mu-dark);
  margin-bottom: var(--space-sm);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--mu-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--mu-text);
  background: var(--mu-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--mu-cyan);
  box-shadow: 0 0 0 3px var(--mu-cyan-glass);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* =========================================================
   ADMIN BAR OFFSET
   ========================================================= */

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
