/*
Theme Name: Masail World
Theme URI: https://masailworld.com
Author: Masail World Team
Author URI: https://masailworld.com
Description: A premium, modern English-UI WordPress theme for Masail World (Darul Ifta Ahl-e-Sunnat). Built with Tailwind CSS, Google Fonts (Outfit & Inter), Glassmorphic Cards, Fatawa, Articles, Books, and custom Navy Dome & Gold Color Theme with official local logo.
Version: 2.8.0
Text Domain: masailworld
Domain Path: /languages
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'NaatFont';
  src: url('https://res.cloudinary.com/awescreative/raw/upload/v1749150996/Awes/naatfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Background */
  --background-white: #F7F7F5;
  --background-ivory: #F3F3EF;
  --background-warm: #EEEBDF;

  /* Navy Dome */
  --navy-dark: #0C2340;
  --navy-primary: #1C3E5D;
  --navy-highlight: #476582;

  /* Gold — Dark to Light */
  --gold-dark: #906632;
  --gold-deep: #A37D45;
  --gold-medium: #B89559;
  --gold-primary: #C8AA70;
  --gold-light: #E2C681;
  --gold-pale: #E0D0AC;

  /* Subtle Globe/Grid Lines */
  --grid-line: #E0D0AC;
  --grid-line-soft: rgba(184, 149, 89, 0.18);

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-urdu: 'NaatFont', serif;
}

html, body {
  scroll-behavior: smooth;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#wpadminbar {
  display: none !important;
}

/* Global Website Smooth Transitions */
a, button, input, select, textarea, .card, .topic-item, .nav-link, .circular-logo {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-body);
  font-size: 95%;
  background-color: var(--background-ivory);
  color: var(--navy-dark);
  padding-bottom: 0;
  padding-top: 0 !important;
  margin-top: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 767px) {
  html, body {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  body {
    padding-bottom: 84px !important;
  }
  #mw-header {
    top: 0 !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

.font-urdu {
  font-family: var(--font-urdu), serif;
  letter-spacing: normal !important;
}

/* Glassmorphism & Card styling */
.glass-card {
  background: rgba(247, 247, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--grid-line-soft);
}

/* Hero Ken Burns Zoom-Pan & Soft Swap Background Animation */
.hero-section {
  position: relative;
  background-color: var(--navy-dark);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroKenBurnsSwap 18s infinite ease-in-out;
  will-change: transform, opacity;
}

.hero-slide.slide-1 {
  animation-delay: 0s;
}

.hero-slide.slide-2 {
  animation-delay: 6s;
}

.hero-slide.slide-3 {
  animation-delay: 12s;
}

@keyframes heroKenBurnsSwap {
  0% {
    opacity: 0;
    transform: scale(1) translate(0%, 0%);
  }
  5% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  38% {
    opacity: 0;
    transform: scale(1.15) translate(-1.5%, -1%);
  }
  100% {
    opacity: 0;
    transform: scale(1.18) translate(-2%, -1.5%);
  }
}

.circular-logo {
  border-radius: 50%;
  object-fit: cover;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--gold-deep);
  border-radius: 4px;
}
::-webkit-scrollbar-track {
  background: var(--background-warm);
}

/* Tag dropdown combobox styles */
.tag-combobox { position: relative; min-width: 240px; }
.tag-button { width: 100%; text-align: left; }
.tag-panel { position: absolute; top: 100%; left: 0; z-index: 50; background: var(--background-white); border: 1px solid var(--gold-pale); border-radius: 12px; margin-top: 8px; width: min(360px, 90vw); box-shadow: 0 12px 28px rgba(12, 35, 64, 0.15); }
.tag-panel .inner { max-height: 320px; overflow-y: auto; }
.tag-search { border: 0; border-bottom: 1px solid var(--grid-line-soft); padding: 10px 12px; width: 100%; outline: none; background: var(--background-white); }
.tag-option { padding: 10px 12px; cursor: pointer; text-align: left; }
.tag-option:hover { background: var(--background-warm); }
.tag-option[aria-selected="true"] { background: var(--gold-pale); font-weight: bold; color: var(--navy-dark); }

/* Pagination buttons */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.page-btn { border: 1px solid var(--gold-pale); background: var(--background-white); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--navy-primary); }
.page-btn.active { background: var(--navy-primary); color: var(--gold-light); font-weight: bold; border-color: var(--navy-dark); }
.page-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Custom Toast Notifications */
.mw-toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: var(--navy-dark);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(12, 35, 64, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Line Clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hero Latest Fatwa Ticker Loop Slider Animation (Mobile & Desktop) */
@keyframes mwTickerMarquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.mw-ticker-track {
  display: flex;
  width: max-content;
  animation: mwTickerMarquee 35s linear infinite;
  will-change: transform;
}
.mw-ticker-track:hover {
  animation-play-state: paused;
}

/* Website-Wide Subtle Fade-In */
@keyframes mwFadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mw-animate-fade {
  animation: mwFadeInUp 0.6s ease-out forwards;
}

/* Fatawa Single Page Non-Editable Read-Only Enforcement */
[contenteditable],
#fatwa-container,
#fatwa-question,
#fatwa-answer {
  -webkit-user-modify: read-only !important;
  outline: none !important;
}
[contenteditable="true"] {
  outline: none !important;
}

/* ==========================================================================
   AI Fatwa Chatbot ChatGPT Minimalist & Premium UI Custom Styles
   ========================================================================== */

#mw-ai-chat-drawer {
  box-shadow: 0 20px 50px rgba(12, 35, 64, 0.5), 0 0 30px rgba(200, 170, 112, 0.2);
}

/* Chat Messages Custom Scrollbar */
#mw-chat-messages::-webkit-scrollbar {
  width: 5px;
}
#mw-chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(200, 170, 112, 0.4);
  border-radius: 10px;
}
#mw-chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: rgba(200, 170, 112, 0.8);
}
#mw-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

/* Suggestion Chips Hover */
.mw-chip {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mw-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 170, 112, 0.25);
}

/* Chat Action Button */
.mw-chat-btn-primary {
  transition: all 0.2s ease-in-out;
}
.mw-chat-btn-primary:hover {
  transform: translateX(-2px);
  box-shadow: 0 4px 14px rgba(12, 35, 64, 0.3);
}

/* Pulse Glow for AI Floating Button */
@keyframes mwGlowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(200, 170, 112, 0.4), 0 8px 25px rgba(12, 35, 64, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(226, 198, 129, 0.8), 0 12px 35px rgba(12, 35, 64, 0.7);
  }
}
/* Full-Screen AI App Specific Styles */
body.page-template-page-ask #loader {
  display: none !important;
}

#mw-app-sidebar::-webkit-scrollbar {
  width: 4px;
}
#mw-app-sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(200, 170, 112, 0.3);
  border-radius: 10px;
}

/* Pro Fatwa Reader Font Scaling & Premium Typography */
.fatwa-font-sm { font-size: 1.25rem !important; line-height: 2.0 !important; }
.fatwa-font-md { font-size: 1.45rem !important; line-height: 2.2 !important; }
.fatwa-font-lg { font-size: 1.65rem !important; line-height: 2.4 !important; }
.fatwa-font-xl { font-size: 1.95rem !important; line-height: 2.6 !important; }

#fatwa-question, #fatwa-answer {
  font-size: 1.45rem;
  line-height: 2.2;
}
@media (min-width: 768px) {
  #fatwa-question, #fatwa-answer {
    font-size: 1.65rem;
    line-height: 2.4;
  }
}

/* Modal Backdrop Blur & Animations */
.mw-modal-backdrop {
  background: rgba(12, 35, 64, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s ease-in-out;
}
.mw-modal-box {
  box-shadow: 0 25px 60px rgba(12, 35, 64, 0.4), 0 0 35px rgba(200, 170, 112, 0.25);
  border: 1px solid rgba(200, 170, 112, 0.4);
}

/* Verified Badge & Crest Borders */
.mw-gold-border-card {
  border: 1px solid var(--grid-line);
  background: linear-gradient(180deg, #F7F7F5 0%, #EEEBDF 100%);
}

/* Print Optimization - Only Print Fatwa Content with Branding */
@media print {
  header, footer, nav, #mw-header, #mw-footer, .lg\:col-span-1, button, .mw-toast, #wpadminbar, .print\:hidden, .mw-modal-backdrop {
    display: none !important;
  }

  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .lg\:col-span-2 {
    grid-column: span 3 / span 3 !important;
    width: 100% !important;
  }

  #fatwa-container {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .print\:block {
    display: block !important;
  }
}



