/*
Theme Name: Masail World
Theme URI: https://masailworld.com
Author: Masail World Team
Author URI: https://masailworld.com
Description: Premium Online Islamic Jurisprudence & Darul Ifta WordPress Theme for Fatwas, Masail, Fiqh Hanafi rulings, and Scholars.
Version: 1.0.0
Text Domain: masailworld
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   MASAIL WORLD - ULTRA PREMIUM WHITE-CREAM DESIGN SYSTEM
   - 10% Compact Spacing & Typography
   - All Pill-Shape Buttons (border-radius: 50px)
   - Default Font: Noto Naskh Arabic / Outfit / Inter
   - Hero Background: images/3.jpg / 1.jpg
   ========================================================================== */

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

:root {
    /* Color Palette - White Cream Luxury */
    --bg-main: #FDFBF7;
    --bg-secondary: #F7F2E7;
    --bg-surface: #FFFFFF;
    --bg-card-hover: #F9F5EC;
    
    --border-color: #E8E2D4;
    --border-gold: #E2D4B7;
    --border-accent: rgba(197, 160, 89, 0.35);

    --text-primary: #1C2421;
    --text-secondary: #56615C;
    --text-muted: #828E87;
    
    --emerald-primary: #0F3D2E;
    --emerald-hover: #08291E;
    --emerald-light: rgba(15, 61, 46, 0.07);
    --emerald-glow: rgba(15, 61, 46, 0.15);

    --gold-primary: #C5A059;
    --gold-hover: #B8860B;
    --gold-light: rgba(197, 160, 89, 0.12);
    --gold-gradient: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B8860B 100%);

    /* Pill-Shape Radii */
    --radius-pill: 50px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-sm: 0 2px 8px rgba(15, 61, 46, 0.04);
    --shadow-md: 0 6px 20px -3px rgba(15, 61, 46, 0.07);
    --shadow-lg: 0 12px 30px -5px rgba(15, 61, 46, 0.12);
    --shadow-gold: 0 6px 20px rgba(197, 160, 89, 0.28);

    --font-custom: 'Noto Naskh Arabic', serif;
    --font-ui: 'Outfit', 'Inter', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-ui), var(--font-custom);
    direction: ltr;
    text-align: left;
    line-height: 1.55;
    font-size: 0.935rem; /* ~10% Compact */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography & Headings (Compact Scaled) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-ui), var(--font-custom);
    font-weight: 700;
    color: var(--emerald-primary);
    line-height: 1.3;
}

.original-data-urdu {
    font-family: var(--font-custom);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

a {
    color: var(--emerald-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--gold-hover);
}

/* Top Notification Banner (Compact) */
.top-notice-bar {
    background: var(--emerald-primary);
    color: #FDFBF7;
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 500;
}

.notice-badge {
    background: var(--gold-gradient);
    color: #0F3D2E;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.12rem 0.55rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Header & Navigation (10% Compact) */
header {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--emerald-primary), #165642);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--emerald-primary);
    letter-spacing: -0.02em;
    font-family: var(--font-ui);
}

.brand-text span {
    font-size: 0.7rem;
    color: var(--gold-hover);
    font-weight: 600;
    font-family: var(--font-ui);
    display: block;
    margin-top: -0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    list-style: none;
}

.nav-menu a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    position: relative;
    font-family: var(--font-ui);
    transition: all 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active, .nav-menu .current-menu-item a {
    color: var(--emerald-primary);
    background: var(--gold-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* ==========================================================================
   PILL-SHAPED BUTTON SYSTEM (border-radius: 50px)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-pill) !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-hover));
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(15, 61, 46, 0.22);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(15, 61, 46, 0.32);
    color: #FFFFFF;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #0F3D2E;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(197, 160, 89, 0.35);
    color: #0F3D2E;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--emerald-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   ULTRA PREMIUM HERO SECTION
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, rgba(15, 61, 46, 0.90) 0%, rgba(8, 41, 30, 0.95) 100%), 
                url('assets/images/3.jpg') center/cover no-repeat;
    padding: 3.75rem 1.25rem 3.25rem 1.25rem;
    position: relative;
    border-bottom: 3px solid var(--gold-primary);
    overflow: hidden;
    color: #FFFFFF;
    box-shadow: inset 0 -20px 30px rgba(0, 0, 0, 0.4);
}

.hero-overlay-glow {
    position: absolute;
    top: -20%; left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.5);
    padding: 0.35rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: #F8F5EE;
    font-weight: 700;
    margin-bottom: 1.15rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 0.85rem;
    line-height: 1.25;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-title .gold-gradient-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #E2E8F0;
    max-width: 720px;
    margin: 0 auto 1.85rem auto;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Search Card */
.main-search-card {
    background: rgba(253, 251, 247, 0.96);
    backdrop-filter: blur(16px);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.5rem 0.4rem 1.1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    max-width: 760px;
    margin: 0 auto 1.65rem auto;
    transition: all 0.3s ease;
}

.main-search-card:focus-within {
    border-color: #FFFFFF;
    box-shadow: 0 16px 40px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
}

.search-input-wrapper input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 0.975rem;
    color: var(--text-primary);
}

.search-input-wrapper input::placeholder {
    color: #64748B;
}

.search-icon-btn {
    width: 44px;
    height: 44px;
    background: var(--gold-gradient);
    color: #0F3D2E;
    border: none;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.4);
}

.search-icon-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 18px rgba(212, 175, 55, 0.6);
}

/* Quick Search Tags */
.quick-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #CBD5E1;
}

.tag-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-pill);
    color: #FFFFFF;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tag-btn:hover {
    border-color: var(--gold-primary);
    color: #0F3D2E;
    background: var(--gold-gradient);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Sections */
.section {
    padding: 2.85rem 1.25rem;
}

.section-alt {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title-group h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.section-title-group p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
}

.topic-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.topic-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.topic-icon {
    width: 48px;
    height: 48px;
    background: var(--emerald-light);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--emerald-primary);
}

.topic-info h3 {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
    font-family: var(--font-custom), var(--font-ui);
}

.topic-info span {
    font-size: 0.775rem;
    color: var(--gold-hover);
    font-weight: 600;
}

/* Fatwas Grid */
.fatwas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.25rem;
}

.fatwa-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.fatwa-card:hover {
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.fatwa-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge-topic {
    background: var(--emerald-light);
    color: var(--emerald-primary);
    font-size: 0.725rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(15, 61, 46, 0.12);
}

.badge-id {
    font-size: 0.725rem;
    font-family: var(--font-ui);
    color: var(--text-muted);
}

.fatwa-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--emerald-primary);
    margin-bottom: 0.65rem;
    line-height: 1.4;
    font-family: var(--font-custom), var(--font-ui);
}

.fatwa-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-custom), var(--font-ui);
}

.fatwa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.writer-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--emerald-primary);
    font-weight: 600;
}

/* Scholars / Writers Section */
.writers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.writer-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.65rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.writer-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.writer-avatar {
    width: 68px;
    height: 68px;
    background: var(--bg-secondary);
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-sm);
    color: var(--emerald-primary);
}

.writer-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--emerald-primary);
    margin-bottom: 0.2rem;
    font-family: var(--font-custom), var(--font-ui);
}

.writer-role {
    font-size: 0.8rem;
    color: var(--gold-hover);
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.writer-inst {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
}

/* Ask Fatwa Banner */
.ask-banner-card {
    background: linear-gradient(135deg, var(--emerald-primary), #0a2e22), url('assets/images/1.jpg') center/cover no-repeat;
    background-blend-mode: overlay;
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-xl);
    padding: 2.85rem 1.5rem;
    color: #FFFFFF;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ask-banner-card h2 {
    color: #FFFFFF;
    font-size: 1.95rem;
    margin-bottom: 0.65rem;
}

.ask-banner-card p {
    color: #E2E8F0;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: #0A291E;
    color: #E2E8F0;
    border-top: 3px solid var(--gold-primary);
    padding: 3rem 1.25rem 1.5rem 1.25rem;
    margin-top: auto;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2.25rem;
}

.footer-brand h2 {
    color: #FFFFFF;
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #94A3B8;
    line-height: 1.7;
}

.footer-column h3 {
    color: var(--gold-primary);
    font-size: 1rem;
    margin-bottom: 0.85rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #CBD5E1;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--gold-primary);
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #94A3B8;
}

/* Detail Card */
.detail-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.75rem;
}

.question-box {
    background: var(--emerald-light);
    border-left: 4px solid var(--emerald-primary);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
}

.question-box h3 {
    color: var(--emerald-primary);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.answer-box {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.answer-box h2, .answer-box h3 {
    margin-top: 1.35rem;
    margin-bottom: 0.65rem;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.1rem;
    margin-top: 1.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    color: var(--emerald-primary);
}

.form-control {
    width: 100%;
    padding: 0.6rem 1.1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border 0.2s;
}

.form-control:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 3px var(--emerald-light);
}

textarea.form-control {
    border-radius: var(--radius-lg);
    min-height: 130px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 2.1rem; }
    .nav-menu { display: none; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 1.65rem; }
    .fatwas-grid { grid-template-columns: 1fr; }
    .nav-container { padding: 0.6rem 1rem; }
    .detail-card { padding: 1.25rem; }
}
