/*
Theme Name: Markaz ul Irfan Ultimate
Theme URI: https://markazulirfan.com
Description: Luxury Islamic Khanqah - Responsive Desktop & Mobile
Author: Markaz ul Irfan
Template: astra
Version: 8.0.0
License: GPL v2 or later
Text Domain: markaz-ultimate
*/
/* Safe Urdu Fonts - No External Dependency */

body {
  font-family: 'Segoe UI', 'Arial Unicode MS', 'Lucida Grande', sans-serif !important;
  color: #2E2E2E;
  background: #FFFAF0;
  line-height: 2;
  direction: rtl;
  width: 100%;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Segoe UI', 'Arial Unicode MS', 'Lucida Grande', sans-serif !important;
  color: #1B3A0F;
  line-height: 1.6;
  font-weight: 700;
}

p { 
  font-family: 'Segoe UI', 'Arial Unicode MS', 'Lucida Grande', sans-serif !important;
  line-height: 2;
  margin-bottom: 1rem;
}

/* Numbers/English */
.mk-stat-number {
  font-family: 'Arial', 'Helvetica', sans-serif !important;
}

.mk-ornament, .mk-divider, .mk-buttons {
  font-family: 'Segoe UI', 'Arial Unicode MS', sans-serif !important;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  direction: rtl;
}
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;700&display=swap');

@font-face {
  font-family: 'Noto Nastaliq Urdu';
  src: url('https://fonts.gstatic.com/s/notoNastaliqUrdu/v14/Dg4uEP5HT_wPXm9h6bDnDiWfnGvqp2jFBfkbOHMwdLtqLKhAYCYEFBF68U7FmfW.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Nastaliq Urdu';
  src: url('https://fonts.gstatic.com/s/notoNastaliqUrdu/v14/Dg4uEP5HT_wPXm9h6bDnDiWfnGvqp2jFBfkbOHMwdLtqLKhAYCYEFBF68U7FmfW.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

body, h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Nastaliq Urdu', 'Alvi Nastaleeq', serif !important;
}
body {
  font-family: 'Noto Nastaliq Urdu', 'Alvi Nastaleeq', serif;
  color: #2E2E2E;
  background: #FFFAF0;
  line-height: 2;
  direction: rtl;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Hide Astra on homepage */
body.home .astra-header-wrap { display: none !important; }
body.home .site-header { display: none !important; }
body.home .main-header-bar-wrap { display: none !important; }
body.home .ast-container { max-width: 100% !important; padding: 0 !important; }
body.home .site-content { margin: 0 !important; padding: 0 !important; width: 100% !important; }
body.home #primary { width: 100% !important; max-width: 100% !important; }
body.home #secondary { display: none !important; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Nastaliq Urdu', serif;
  color: #1B3A0F;
  line-height: 1.6;
  font-weight: 700;
}

p { line-height: 2; margin-bottom: 1rem; }
a { color: #9B7D1A; text-decoration: none; transition: all 0.3s; }
a:hover { color: #1B3A0F; }

/* ════════ HERO ════════ */
.mk-hero {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #1B3A0F 0%, #2D5016 50%, #234012 100%);
  color: white;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.mk-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(212,175,55,.06) 0 2px, transparent 2px 40px),
    repeating-linear-gradient(-60deg, rgba(212,175,55,.06) 0 2px, transparent 2px 40px);
  pointer-events: none;
  z-index: 1;
}

.mk-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}

.mk-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 2rem;
}

.mk-ornament {
  font-size: 2.5rem;
  color: #D4AF37;
  letter-spacing: 1.5rem;
  margin-bottom: 2rem;
}

.mk-hero h1 {
  font-size: 5.5rem;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 4px 30px rgba(0,0,0,.4);
  line-height: 1.2;
}

.mk-hero .mk-subtitle {
  font-size: 2.2rem;
  background: linear-gradient(90deg, #E8CE7A, #D4AF37, #E8CE7A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2rem;
  font-weight: 700;
}

.mk-divider {
  width: 140px;
  height: 2px;
  margin: 2.5rem auto;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.mk-hero .mk-description {
  font-size: 1.3rem;
  line-height: 2.4;
  margin-bottom: 3rem;
  color: rgba(255,255,255,.95);
}

.mk-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mk-btn {
  padding: 18px 52px;
  font-size: 1.15rem;
  border-radius: 60px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.mk-btn-gold {
  background: linear-gradient(135deg, #E8CE7A, #D4AF37, #9B7D1A);
  color: #1B3A0F !important;
  box-shadow: 0 10px 30px rgba(212,175,55,.5);
}

.mk-btn-gold:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 45px rgba(212,175,55,.7);
}

.mk-btn-ghost {
  background: rgba(255,255,255,.1);
  color: white !important;
  border: 2px solid white;
  backdrop-filter: blur(4px);
}

.mk-btn-ghost:hover {
  background: white;
  color: #1B3A0F !important;
}

.mk-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.8);
  font-size: 2rem;
  z-index: 2;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(15px); }
}

/* ════════ SECTIONS ════════ */
.mk-section {
  width: 100%;
  padding: 100px 2rem;
  margin: 0;
}

.mk-container {
  max-width: 1400px;
  margin: 0 auto;
}

.mk-section-light { background: #FFFAF0; }
.mk-section-dark { background: #141414; color: white; }

/* ════════ HEADINGS ════════ */
.mk-heading-wrap {
  text-align: center;
  margin-bottom: 4rem;
}

.mk-eyebrow {
  display: inline-block;
  font-size: 1rem;
  color: #9B7D1A;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
  padding: 8px 28px;
  border: 1px solid #D4AF37;
  border-radius: 50px;
  background: rgba(212,175,55,.08);
}

.mk-heading {
  font-size: 3.5rem;
  color: #1B3A0F;
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 0;
}

.mk-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.mk-subheading {
  font-size: 1.2rem;
  color: #555;
  max-width: 800px;
  margin: 1.5rem auto 0;
  line-height: 2.2;
}

/* ════════ ABOUT ════════ */
.mk-about-box {
  max-width: 950px;
  margin: 0 auto;
  background: white;
  padding: 4rem 3.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(27,58,15,.12);
  border: 1px solid rgba(212,175,55,.25);
  text-align: center;
  font-size: 1.2rem;
  line-height: 2.4;
  color: #333;
  position: relative;
}

.mk-about-box::before {
  content: '❝';
  position: absolute;
  top: -30px;
  right: 60px;
  font-size: 4.5rem;
  color: #D4AF37;
  opacity: 0.5;
}

/* ════════ STATS - DESKTOP 4 COLUMNS ════════ */
.mk-stats { background: linear-gradient(160deg, #1B3A0F, #2D5016); color: white; }

.mk-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  text-align: center;
}

.mk-stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: #D4AF37;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 0.5rem;
}

.mk-stat-label {
  font-size: 1.15rem;
  color: rgba(255,255,255,.9);
}

/* ════════ SCHEDULE - DESKTOP 3 COLUMNS ════════ */
.mk-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.mk-schedule-card {
  background: white;
  padding: 3rem 2.5rem;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(27,58,15,.1);
  border-top: 5px solid #D4AF37;
  transition: all 0.3s;
}

.mk-schedule-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(27,58,15,.18);
}

.mk-day-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1B3A0F, #4A7C3F);
  color: white;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 700;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  box-shadow: 0 5px 15px rgba(27,58,15,.25);
}

.mk-schedule-row {
  margin: 1.5rem 0;
  line-height: 2.2;
  text-align: right;
}

.mk-schedule-row strong {
  color: #9B7D1A;
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

/* ════════ VIDEOS - DESKTOP 3 COLUMNS ════════ */
.mk-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.mk-video-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.1);
  transition: all 0.3s;
}

.mk-video-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.mk-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
}

.mk-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.mk-video-title {
  padding: 1.8rem;
  font-weight: 700;
  color: #1B3A0F;
  line-height: 1.8;
  font-size: 1.1rem;
  border-top: 3px solid #D4AF37;
}

/* ════════ BOOKS - DESKTOP 3 COLUMNS ════════ */
.mk-books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.mk-book-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(27,58,15,.1);
  transition: all 0.3s;
}

.mk-book-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 0 20px 60px rgba(27,58,15,.18);
}

.mk-book-cover {
  height: 240px;
  background: linear-gradient(135deg, #1B3A0F, #2D5016);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
}

.mk-book-cover::after {
  content: '';
  position: absolute;
  inset: 15px;
  border: 2px solid rgba(212,175,55,.6);
  border-radius: 10px;
}

.mk-book-info {
  padding: 2rem;
  text-align: center;
}

.mk-book-info h3 {
  color: #1B3A0F;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.mk-book-info p {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

/* ════════ CONTACT - DESKTOP 3 COLUMNS ════════ */
.mk-contact {
  background: linear-gradient(160deg, #141414, #1B3A0F);
  color: white;
  padding: 100px 2rem;
}

.mk-contact .mk-heading { color: white; }

.mk-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.mk-contact-item {
  text-align: center;
  background: rgba(255,255,255,.08);
  padding: 2.5rem;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,.3);
  transition: all 0.3s;
}

.mk-contact-item:hover {
  background: rgba(212,175,55,.15);
  transform: translateY(-8px);
}

.mk-contact-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.mk-contact-item strong {
  display: block;
  color: #D4AF37;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.mk-contact-item a {
  color: white;
  font-size: 1.15rem;
  font-weight: 600;
}

.mk-contact-item a:hover {
  color: #D4AF37;
}

/* ════════ FOOTER ════════ */
.mk-footer {
  background: #0A0A0A;
  color: rgba(255,255,255,.8);
  padding: 3.5rem;
  text-align: center;
  border-top: 3px solid #D4AF37;
  font-size: 1rem;
}

.mk-footer-logo {
  color: #D4AF37;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ════════ ANIMATIONS ════════ */
.mk-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.mk-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════ EMPTY STATE ════════ */
.mk-empty {
  text-align: center;
  padding: 3.5rem;
  background: white;
  border: 2px dashed #D4AF37;
  border-radius: 18px;
  color: #666;
  font-size: 1.15rem;
}

/* ════════════════════════════════════════
   MOBILE RESPONSIVE - ONLY 1 COLUMN
   ════════════════════════════════════════ */

@media (max-width: 768px) {
  .mk-section { padding: 60px 1.5rem; }
  
  .mk-hero { height: auto; min-height: 70vh; padding: 80px 1rem; }
  .mk-hero-content { padding: 0 1rem; }
  .mk-hero h1 { font-size: 2.5rem; }
  .mk-hero .mk-subtitle { font-size: 1.4rem; }
  .mk-hero .mk-description { font-size: 1.1rem; }
  .mk-buttons { flex-direction: column; gap: 1rem; }
  .mk-btn { width: 100%; }
  .mk-scroll-hint { display: none; }

  .mk-heading { font-size: 2.2rem; }
  .mk-subheading { font-size: 1rem; }
  
  .mk-about-box {
    padding: 2rem 1.5rem;
    font-size: 1.05rem;
  }
  .mk-about-box::before { right: 20px; font-size: 3rem; }

  .mk-stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .mk-stat-number { font-size: 2.2rem; }
  .mk-stat-label { font-size: 1rem; }

  /* MOBILE: 1 COLUMN FOR ALL GRIDS */
  .mk-schedule-grid,
  .mk-video-grid,
  .mk-books-grid,
  .mk-contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mk-schedule-card,
  .mk-video-card,
  .mk-book-card,
  .mk-contact-item {
    padding: 1.5rem;
  }

  .mk-schedule-card:hover,
  .mk-video-card:hover,
  .mk-book-card:hover,
  .mk-contact-item:hover {
    transform: translateY(-6px);
  }

  .mk-book-cover { height: 180px; font-size: 3.5rem; }
  .mk-book-info { padding: 1.2rem; }
  .mk-book-info h3 { font-size: 1.05rem; }

  .mk-contact { padding: 60px 1.5rem; }
  .mk-contact .mk-heading { font-size: 2.2rem; }

  .mk-footer { padding: 2rem 1rem; }
  .mk-footer-logo { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .mk-section { padding: 50px 1rem; }
  .mk-hero { min-height: 60vh; padding: 60px 0.8rem; }
  .mk-hero-content { padding: 0 0.8rem; }
  .mk-hero h1 { font-size: 2rem; }
  .mk-hero .mk-subtitle { font-size: 1.1rem; }
  .mk-hero .mk-description { font-size: 1rem; }

  .mk-heading { font-size: 1.8rem; }
  .mk-ornament { letter-spacing: 0.8rem; font-size: 1.8rem; }

  .mk-about-box { padding: 1.5rem 1rem; }
  .mk-about-box::before { top: -25px; right: 10px; }

  .mk-stats-grid { gap: 1.2rem; }
  .mk-stat-number { font-size: 1.8rem; }

  .mk-schedule-card { padding: 1.2rem; }
  .mk-day-badge { font-size: 0.95rem; padding: 8px 20px; }

  .mk-contact-icon { font-size: 2rem; }
  .mk-contact-item strong { font-size: 0.95rem; }
  .mk-contact-item a { font-size: 1rem; }

  .mk-empty { padding: 2rem 1rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
