/*
Theme Name: Mufti Zubair Qasmi Theme
Theme URI: https://muftizubairqasmi.com
Author: Mufti Zubair Qasmi
Author URI: https://instagram.com/muftizubairqasmiofficial
Description: Professional, modern, mobile-first WordPress theme for Islamic Masail (Q&A), YouTube Videos, PDF Books sales, and visitor Question submission system. Clean UI with authentic Islamic guidance focus. Roman Urdu + English friendly. AdSense & SEO ready. Pure theme - no page builders required. Fully optimized, secure, accessible production version.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mufti-zubair-qasmi
Tags: islamic, masail, quran, deoband, fatwa, youtube, books, responsive, clean, fast, adsense-ready, accessible
*/

/* ============================================
   PRODUCTION-READY STYLES - NO EXTERNAL DEPENDENCIES
   All Tailwind classes converted to local CSS for performance & security
   ============================================ */

:root {
  --primary: #0F766E;
  --dark: #134E4A;
  --bg: #F8FAFC;
  --text: #1F2937;
  --accent: #14B8A6;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-200: #e5e7eb;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system_ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* ============================================
   TAILWIND COMPATIBILITY LAYER (Local CSS)
   Supports all classes used in templates without CDN
   ============================================ */

/* Container & Max Width */
.max-w-screen-xl { max-width: 1280px; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 28rem; margin-left: auto; margin-right: auto; }
.max-w-lg { max-width: 32rem; margin-left: auto; margin-right: auto; }
.max-w-xs { max-width: 20rem; margin-left: auto; margin-right: auto; }

/* Padding & Margin Utilities */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-8 { padding-top: 2rem; }
.pb-16 { padding-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-9 { margin-bottom: 2.25rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-1\.5 { margin-left: 0.375rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.-mt-6 { margin-top: -1.5rem; }
.-mx-6 { margin-left: -1.5rem; margin-right: -1.5rem; }

/* Responsive Padding */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 768px) {
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:p-10 { padding: 2.5rem; }
}
@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Flexbox & Grid */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-x-2 { column-gap: 0.5rem; }
.gap-x-3 { column-gap: 0.75rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-x-5 { column-gap: 1.25rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-4 { row-gap: 1rem; }
.gap-y-8 { row-gap: 2rem; }
.gap-y-12 { row-gap: 3rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Grid Columns & Spans */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:flex-row { flex-direction: row; }
}

/* Typography & Text */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
@media (min-width: 768px) {
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
}
@media (min-width: 1024px) {
  .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-\[1px\] { letter-spacing: 1px; }
.tracking-\[1\.5px\] { letter-spacing: 1.5px; }
.tracking-wide { letter-spacing: 0.025em; }

.leading-\[1\.05\] { line-height: 1.05; }
.leading-snug { line-height: 1.375; }
.leading-tight { line-height: 1.25; }

/* Colors using theme palette */
.bg-primary { background-color: var(--primary); }
.text-primary { color: var(--primary); }
.bg-dark { background-color: var(--dark); }
.text-dark { color: var(--dark); }
.bg-white { background-color: #ffffff; }
.text-white { color: #ffffff; }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: #374151; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.border-gray-200 { border-color: var(--gray-200); }

/* Opacity variants */
.text-white\/70 { color: rgba(255,255,255,0.7); }
.text-white\/80 { color: rgba(255,255,255,0.8); }
.text-white\/90 { color: rgba(255,255,255,0.9); }
.bg-white\/10 { background-color: rgba(255,255,255,0.1); }
.border-white\/20 { border-color: rgba(255,255,255,0.2); }

/* Borders & Radius */
.border { border-width: 1px; border-style: solid; border-color: var(--gray-200); }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-style: solid; border-color: var(--gray-200); }
.border-b { border-bottom-width: 1px; border-style: solid; border-color: var(--gray-200); }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-\[3\.5rem\] { border-radius: 3.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); }

/* Transitions & Hover */
.transition-all { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.transition-colors { transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.transition-transform { transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.duration-300 { transition-duration: 300ms; }

.group:hover .group-hover\:text-primary { color: var(--primary); }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:ml-2\.5 { margin-left: 0.625rem; }
.group:hover .group-hover\:scale-\[1\.03\] { transform: scale(1.03); }

/* Display & Visibility */
.hidden { display: none; }
.block { display: block; }

@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:inline-flex { display: inline-flex; }
  .md\:block { display: block; }
}

/* Aspect Ratio & Media */
.aspect-video { aspect-ratio: 16 / 9; width: 100%; display: block; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; width: 100%; display: block; }
.aspect-\[16\/10\] { aspect-ratio: 16 / 10; width: 100%; display: block; }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-24 { top: 6rem; }
.-bottom-3 { bottom: -0.75rem; }
.-right-3 { right: -0.75rem; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Line Clamp (for excerpts) */
.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;
}

/* Form Elements (already styled + enhanced) */
.form-input, .form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.form-textarea { min-height: 140px; resize: vertical; }

/* Buttons (enhanced) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgb(15 118 110 / 0.2);
}
.btn-primary:hover { background-color: var(--dark); transform: translateY(-1px); box-shadow: 0 10px 15px -3px rgb(15 118 110 / 0.3); }
.btn-secondary {
  background-color: white;
  color: var(--dark);
  border: 2px solid #e5e7eb;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background-color: #f8fafc; }
.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background-color: var(--primary); color: white; }

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}
.masail-card .question { font-size: 1.1rem; font-weight: 700; color: var(--dark); line-height: 1.4; }
.video-card .thumbnail { position: relative; }
.video-card .play-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; background: rgba(255,255,255,0.95);
  border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2); transition: transform 0.2s;
}
.video-card:hover .play-icon { transform: translate(-50%, -50%) scale(1.1); }

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #134E4A 0%, #0F766E 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* Section Headings */
.section-heading {
  position: relative; display: inline-block; font-size: 2rem; font-weight: 700;
  color: var(--dark); margin-bottom: 1.5rem;
}
.section-heading::after {
  content: ''; position: absolute; bottom: -8px; left: 0; width: 60px; height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent)); border-radius: 3px;
}
@media (max-width: 640px) {
  .section-heading { font-size: 1.65rem; }
}

/* Islamic Prose */
.islamic-prose { font-size: 1.05rem; line-height: 1.85; color: #374151; max-width: 100%; }
.islamic-prose p { margin-bottom: 1.25rem; }
.islamic-prose h3 { font-size: 1.35rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--primary); border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
.islamic-prose ul, .islamic-prose ol { margin: 1.25rem 0; padding-left: 1.5rem; }
.islamic-prose li { margin-bottom: 0.5rem; }
.islamic-prose strong { color: var(--dark); font-weight: 600; }

/* Header & Nav */
.site-header { background: white; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 50; }
.nav-link { position: relative; padding: 0.5rem 0.75rem; font-weight: 500; color: #4b5563; transition: color 0.2s; }
.nav-link:hover { color: var(--primary); }

/* Footer */
.site-footer { background: var(--dark); color: #d1d5db; }
.site-footer a { color: #d1d5db; transition: color 0.2s; }
.site-footer a:hover { color: white; }

/* AdSense Safe Areas */
.ad-placeholder, .ad-widget {
  min-height: 90px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #64748b;
  margin: 1.5rem 0;
  text-align: center;
}
.ad-widget { margin: 1rem 0; }

/* Accessibility Enhancements */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
button, .btn, a { cursor: pointer; }
label { font-weight: 600; color: #374151; display: block; margin-bottom: 0.5rem; }

/* Mobile Optimizations (320px - 375px base already responsive via utilities) */
@media (max-width: 375px) {
  .text-5xl { font-size: 2.5rem; }
  .btn { padding: 0.65rem 1.4rem; font-size: 0.9rem; }
  .section-heading { font-size: 1.5rem; }
}

/* Print & Performance */
@media print {
  .site-header, .site-footer, .btn, .video-card .play-icon, .ad-widget { display: none !important; }
}

/* Existing custom styles preserved and extended above */

/* =====================================================
MOBILE + TABLET + HERO FIX PACK
Add at END of style.css
===================================================== */

html,
body{
overflow-x:hidden;
}

img{
max-width:100%;
height:auto;
display:block;
}

/* Hero Safety */
.hero{
overflow:hidden;
}

.hero .max-w-screen-xl,
.hero .container{
position:relative;
z-index:2;
}

/* Hero image never covers text */
.hero img{
width:100%;
height:auto;
object-fit:cover;
}

/* Better headings */
h1{
word-break:break-word;
}

.section-heading{
line-height:1.2;
}

/* =================================
MOBILE (0 - 767px)
================================= */

@media (max-width:767px){

/* Header */
.site-header{
    position:sticky;
    top:0;
    z-index:999;
}

/* Hero layout */
.hero{
    padding-top:40px;
    padding-bottom:40px;
}

.hero h1,
.hero .text-5xl,
.hero .md\:text-6xl,
.hero .lg\:text-7xl{
    font-size:2.6rem !important;
    line-height:1.1 !important;
    text-align:center;
}

.hero p{
    text-align:center;
}

/* Force hero columns into single column */
.md\:grid-cols-12{
    grid-template-columns:1fr !important;
}

.md\:col-span-5,
.md\:col-span-7{
    grid-column:auto !important;
}

/* Hero image below text */
.hero .md\:col-span-5{
    order:2;
    margin-top:25px;
}

.hero .md\:col-span-7{
    order:1;
}

.hero img{
    width:100%;
    max-width:420px;
    margin:0 auto;
    border-radius:20px;
}

/* Buttons */
.btn{
    width:100%;
    justify-content:center;
    min-height:50px;
}

.hero .flex{
    flex-direction:column;
}

/* Cards */
.card{
    width:100%;
}

/* Better spacing */
.py-20{
    padding-top:3rem;
    padding-bottom:3rem;
}

.py-16{
    padding-top:2.5rem;
    padding-bottom:2.5rem;
}

.py-14{
    padding-top:2rem;
    padding-bottom:2rem;
}

.section-heading{
    font-size:1.9rem;
}

/* Text blocks */
.islamic-prose{
    font-size:1rem;
    line-height:1.8;
}

/* Forms */
.form-input,
.form-textarea{
    font-size:16px;
}

}

/* =================================
TABLET (768 - 1023px)
================================= */

@media (min-width:768px) and (max-width:1023px){

.hero h1,
.hero .text-5xl,
.hero .md\:text-6xl{
    font-size:3.5rem !important;
    line-height:1.05;
}

.hero img{
    max-width:100%;
    border-radius:24px;
}

.btn{
    min-height:48px;
}

}

/* =================================
LARGE DESKTOP
================================= */

@media (min-width:1400px){

.max-w-screen-xl{
    max-width:1380px;
}

.hero h1,
.hero .lg\:text-7xl{
    font-size:5.2rem;
}

}

/* Prevent text/image overlap anywhere */
.relative img{
max-width:100%;
}

/* Safe embedded videos */
iframe{
max-width:100%;
}

/* Long titles */
.card h2,
.card h3,
.card h4{
overflow-wrap:break-word;
word-wrap:break-word;
}


/* FOOTER IMPROVEMENTS */

.site-footer ul{
list-style:none;
margin:0;
padding:0;
}

.site-footer li{
margin-bottom:12px;
}

.site-footer a{
display:inline-block;
line-height:1.5;
}

@media(max-width:767px){

.site-footer{
    text-align:left;
}

.site-footer .grid{
    gap:35px;
}

.site-footer .text-xl{
    font-size:20px;
}

}

@media(min-width:768px){

.site-footer .md\:col-span-3,
.site-footer .md\:col-span-4{
    padding-left:20px;
}

}