/* 
 * Urdu Article Writer - Main Stylesheet (RTL Optimized)
 * Fonts: Noto Nastaliq Urdu & Noto Naskh Arabic
 * Responsive, Ultra Fast, SEO & AdSense Ready
 */

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

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --accent: #f59e0b;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.25s ease-in-out;
    --font-nastaliq: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
    --font-naskh: 'Noto Naskh Arabic', Tahoma, sans-serif;
    --font-body: var(--font-naskh);
    --font-heading: var(--font-nastaliq);
}

/* User font switch classes */
body.font-nastaliq {
    --font-body: var(--font-nastaliq);
    --font-heading: var(--font-nastaliq);
    font-size: 14.5px;
    line-height: 1.85;
}

body.font-naskh {
    --font-body: var(--font-naskh);
    --font-heading: var(--font-naskh);
    font-size: 14px;
    line-height: 1.65;
}

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

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    text-align: right;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--slate);
    background-color: #f8fafc;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.65rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p {
    margin-bottom: 1.2em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Notification / Ticker Bar */
.top-bar {
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.font-toggle-btn {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.font-toggle-btn:hover {
    background: var(--primary);
}

/* Navbar */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

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

.brand-logo-icon svg {
    height: 42px;
    width: 42px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(13, 148, 136, 0.25));
}

.brand-text .brand-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    display: block;
    letter-spacing: -0.01em;
}

.brand-text .brand-domain {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: var(--muted);
    display: block;
    font-weight: 500;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 22px;
}

.nav-item a {
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
    padding: 6px 0;
    position: relative;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--primary);
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 210px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 10px 0;
    list-style: none;
    display: none;
    z-index: 100;
    text-align: left;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 18px;
    color: var(--slate);
    font-size: 14px;
}

.dropdown-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
}

/* Header Ad Space */
.ad-header-wrapper {
    margin: 15px auto;
    text-align: center;
    overflow: hidden;
}

.ad-banner-box {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px;
    margin: 15px auto;
    text-align: center;
    position: relative;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-tag {
    font-size: 10px;
    color: #94a3b8;
    position: absolute;
    top: 2px;
    right: 6px;
    text-transform: uppercase;
}

.ad-inner {
    font-size: 13px;
    color: #64748b;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
    color: #ffffff;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: #f8fafc;
    border-radius: 50% 50% 0 0;
}

.hero-content {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    background: rgba(204, 251, 241, 0.15);
    color: #5eead4;
    border: 1px solid rgba(94, 234, 212, 0.3);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-title {
    color: #ffffff;
    font-size: 1.85rem;
    line-height: 1.45;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 22px;
}

/* Live Tool Generator Card (Hero Widget) */
.tool-generator-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    margin: -40px auto 40px;
    max-width: 950px;
    position: relative;
    z-index: 10;
}

.tool-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.tool-tab-btn {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--slate);
    white-space: nowrap;
    transition: var(--transition);
}

.tool-tab-btn.active, .tool-tab-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.tool-controls-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 18px;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 5px;
}

.control-group select, .control-group input, .control-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--dark);
    direction: rtl;
    outline: none;
    transition: var(--transition);
}

.control-group select:focus, .control-group input:focus, .control-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

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

.tool-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.btn-generate {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 17px;
    padding: 12px 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    transition: var(--transition);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.word-count-badge {
    font-size: 13px;
    color: var(--muted);
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Tool Output Box */
.tool-output-wrapper {
    margin-top: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fdfdfd;
    overflow: hidden;
    display: none;
}

.tool-output-header {
    background: #f1f5f9;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.tool-output-header span {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.output-actions {
    display: flex;
    gap: 8px;
}

.btn-tool-action {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--slate);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-tool-action:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.tool-output-content {
    padding: 18px;
    min-height: 150px;
    line-height: 1.8;
    font-size: 14.5px;
    white-space: pre-wrap;
    max-height: 420px;
    overflow-y: auto;
}

/* Tools Grid Section */
.tools-grid-section {
    padding: 45px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.section-header p {
    color: var(--muted);
    font-size: 14px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #99f6e4;
}

.tool-icon {
    width: 54px;
    height: 54px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.tool-card p {
    color: var(--muted);
    font-size: 14.5px;
    flex-grow: 1;
    margin-bottom: 18px;
}

.tool-btn-link {
    color: var(--primary-dark);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

/* Comprehensive Guide Section (2000+ words styling) */
.guide-container-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 45px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin: 40px auto;
}

.homepage-deep-guide h2 {
    font-size: 1.55rem;
    color: #0f766e;
    line-height: 1.5;
    margin-bottom: 12px;
}

.lead-text {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.guide-section {
    margin-bottom: 30px;
}

.guide-section h3 {
    font-size: 1.25rem;
    color: #134e4a;
    border-right: 4px solid var(--primary);
    padding-right: 12px;
    margin-bottom: 12px;
    margin-top: 22px;
}

.guide-section h4 {
    font-size: 1.05rem;
    color: #1e293b;
    margin-top: 15px;
    margin-bottom: 8px;
}

.guide-section ul, .guide-section ol {
    margin-right: 25px;
    margin-bottom: 20px;
}

.guide-section li {
    margin-bottom: 8px;
}

.badge-pill {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

/* Legal Pages Styling (1200+ words) */
.legal-page-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 45px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin: 40px auto;
}

.legal-content h2 {
    color: #0f766e;
    margin-top: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.legal-content h3 {
    color: #1e293b;
    margin-top: 20px;
}

.legal-content ul, .legal-content ol {
    margin-right: 25px;
    margin-bottom: 20px;
}

.legal-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #0f766e;
    direction: ltr;
    display: inline-block;
}

/* Articles Grid */
.articles-section {
    padding: 50px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.post-category-badge {
    background: #f0fdfa;
    color: #0d9488;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.post-card-title {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-excerpt {
    color: #64748b;
    font-size: 14.5px;
    margin-bottom: 18px;
    flex-grow: 1;
}

.read-more-link {
    font-weight: bold;
    color: var(--primary);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Single Article Layout */
.single-post-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 35px;
    margin: 40px auto;
}

.single-post-main {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.post-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.post-title {
    font-size: 1.65rem;
    color: var(--dark);
    line-height: 1.5;
}

.post-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--muted);
    font-size: 13px;
    margin-top: 12px;
}

.article-body {
    font-size: 14.5px;
    line-height: 1.85;
    color: #334155;
}

.article-body h2 {
    font-size: 1.35rem;
    color: #0f766e;
    margin-top: 25px;
    border-right: 4px solid #0d9488;
    padding-right: 12px;
}

.article-body h3 {
    font-size: 1.15rem;
    margin-top: 20px;
}

/* Sidebar */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.widget-title {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 18px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

.category-list-widget {
    list-style: none;
}

.category-list-widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
}

.category-list-widget li a {
    color: var(--slate);
    font-weight: 500;
}

.category-list-widget li a:hover {
    color: var(--primary);
}

.cat-count {
    background: #f1f5f9;
    color: var(--muted);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 25px;
    border-top: 4px solid var(--primary);
    margin-top: 60px;
    direction: ltr;
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14.5px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #5eead4;
    padding-left: 5px;
    padding-right: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13.5px;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: var(--radius);
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    z-index: 9999;
    display: none;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-banner-btns {
    display: flex;
    gap: 10px;
    align-self: flex-start;
}

.btn-cookie-accept {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cookie-decline {
    background: #e2e8f0;
    color: var(--slate);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .single-post-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .guide-container-section, .legal-page-card, .single-post-main {
        padding: 25px 20px;
    }
}

/* Blog (added 2026-11-20): card images, 3-col blog grid, enrichment examples */
.post-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}

.posts-grid.blog-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .posts-grid.blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .posts-grid.blog-grid {
        grid-template-columns: 1fr;
    }
    .single-post-wrapper {
        grid-template-columns: 1fr;
    }
}

.blog-home-section {
    padding: 50px 0;
}

.tool-enrichment blockquote {
    background: #f8fafc;
    border-right: 4px solid #0d9488;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 12px 0;
    font-size: 14.5px;
    line-height: 1.9;
    color: #334155;
}

.article-body blockquote {
    background: #f8fafc;
    border-right: 4px solid #0d9488;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 14.5px;
    line-height: 1.9;
    color: #334155;
}
