/* =========================================================
   SMART BAIL PETITION GENERATOR - LUXURY DARK THEME
   GitHub Pages Ready - Fully Responsive
   ========================================================= */

:root {
    --bg-dark: #0A0F1C;
    --bg-card: rgba(17, 24, 39, 0.6);
    --accent-gold: #D4AF37;
    --gold-hover: #F4D068;
    --gold-dark: #b8941f;
    --heading-white: #FFFFFF;
    --body-text: #E2E8F0;
    --text-muted: #94A3B8;
    --border-color: rgba(212, 175, 55, 0.25);
    --gold-glow: rgba(212, 175, 55, 0.15);
}

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

@font-face {
    font-family: 'Jameel-Noori';
    src: local('Jameel Noori Nastaleeq');
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--body-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Luxury Animated Background */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.08), transparent 60%);
}
.bg-glow::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.05), transparent 60%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-size: 2.2rem; margin-bottom: 10px; }
h2 { font-size: 1.8rem; margin: 30px 0 20px; }
h3 { font-size: 1.3rem; margin: 20px 0 15px; color: var(--heading-white); }

p { margin-bottom: 20px; font-size: 1rem; color: var(--body-text); }
strong { color: var(--accent-gold); }
a { color: var(--accent-gold); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--gold-hover); }

/* Urdu Typography */
.urdu-tagline, .urdu-block {
    font-family: 'Noto Nastaliq Urdu', 'Jameel-Noori', serif;
    direction: rtl;
    text-align: right;
    font-size: 1.1rem;
    line-height: 2.1;
    color: var(--body-text);
    margin-top: 10px;
}
.urdu-block {
    border-right: 4px solid var(--accent-gold);
    padding: 15px 25px;
    border-radius: 8px;
}

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.divider { width: 80px; height: 4px; background: linear-gradient(90deg, var(--accent-gold), var(--gold-hover), var(--accent-gold)); margin: 0 auto 30px; border-radius: 5px; }
.section-title { text-align: center; border-bottom: none; margin-bottom: 10px; }

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.logo h1 { font-size: 1.8rem; margin-bottom: 5px; }
.logo p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 5px; }
.stats { display: flex; gap: 30px; }
.stat { text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--accent-gold); }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

/* Back Button */
.back-to-main { margin: 10px 0; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--accent-gold);
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(212,175,55,0.4);
}
.back-btn:hover { background: var(--accent-gold); color: var(--bg-dark); }

/* Two Column Layout */
.two-columns { display: flex; gap: 30px; flex-wrap: wrap; margin: 30px 0; }
.main-content { flex: 2.5; min-width: 300px; }
.sidebar { flex: 1.2; min-width: 280px; position: sticky; top: 20px; align-self: start; height: fit-content; }

/* Featured Snippet */
.featured-snippet {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
}
.snippet-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold), var(--gold-hover));
    color: var(--bg-dark);
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}
.snippet-text { font-size: 1.05rem; color: var(--heading-white); }

/* Key Takeaways */
.key-takeaways {
    background: linear-gradient(145deg, rgba(13, 31, 58, 0.6), rgba(8, 16, 30, 0.8));
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-gold);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}
.key-takeaways h3 { color: var(--accent-gold); margin-bottom: 15px; }
.key-takeaways ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.key-takeaways li {
    padding: 6px 0 6px 25px;
    position: relative;
    color: var(--body-text);
    font-size: 0.9rem;
}
.key-takeaways li::before {
    content: "✓";
    color: var(--accent-gold);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* At a Glance Cards */
.glance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}
.glance-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.4s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.glance-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
}
.glance-icon { font-size: 2.2rem; color: var(--accent-gold); margin-bottom: 12px; }
.glance-card h4 { font-size: 1.1rem; color: var(--accent-gold); margin-bottom: 8px; }
.glance-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

/* Tabs */
.tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 25px; }
.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    transition: 0.3s;
}
.tab-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-gold), var(--gold-dark));
    color: var(--bg-dark);
    border-color: transparent;
}

/* Form Panel */
.form-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--accent-gold);
    font-size: 0.85rem;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 15, 28, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--body-text);
    font-family: 'Poppins', sans-serif;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

/* Accused Table */
.accused-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 0.85rem;
}
.accused-table th,
.accused-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
}
.accused-table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}
.accused-table input {
    width: 100%;
    padding: 6px;
    background: rgba(10, 15, 28, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--body-text);
}

.btn-add {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-add:hover { background: var(--accent-gold); color: var(--bg-dark); }

/* Grounds Grid */
.grounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}
.ground-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(10, 15, 28, 0.5);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
}
.ground-item:hover { background: rgba(212, 175, 55, 0.1); }
.ground-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-gold);
    margin-top: 2px;
}

/* Preview Panel */
.preview-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
}
.preview-panel h3 {
    font-family: 'Cinzel', serif;
    margin-bottom: 15px;
}
.preview-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 25px;
    background: white;
    border-radius: 12px;
    font-family: 'Times New Roman', Times, serif;
    color: #1a1a2e;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

/* Buttons */
.btn-generate {
    background: linear-gradient(135deg, var(--accent-gold), var(--gold-dark));
    border: none;
    color: var(--bg-dark);
    padding: 14px 25px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-family: 'Cinzel', serif;
}
.action-buttons { display: flex; gap: 15px; margin-top: 15px; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
}
.btn-outline:hover { background: var(--accent-gold); color: var(--bg-dark); }
.btn-download {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 20px;
    margin-bottom: 25px;
}
.sidebar-widget h4 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px dashed rgba(212, 175, 55, 0.3);
    color: var(--accent-gold);
}
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget li {
    padding: 10px 0 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
}
.sidebar-widget li a { color: var(--body-text); font-size: 0.9rem; }
.sidebar-widget li a:hover { color: var(--accent-gold); }

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}
.faq-item {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}
.faq-q { font-weight: 700; color: var(--accent-gold); margin-bottom: 10px; }
.faq-a { color: var(--text-muted); font-size: 0.9rem; }

/* Expert Box */
.expert-box {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    margin: 40px 0;
}
.expert-head { display: flex; align-items: center; gap: 25px; margin-bottom: 25px; flex-wrap: wrap; }
.expert-frame {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    overflow: hidden;
}
.expert-frame img { width: 100%; height: 100%; object-fit: cover; }
.expert-quote { font-style: italic; }
.expert-cta { text-align: center; margin-top: 20px; }
.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--accent-gold), var(--gold-hover));
    color: var(--bg-dark);
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(13, 31, 58, 0.6), var(--bg-dark));
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    padding: 50px 20px;
    margin-top: 40px;
    border-radius: 24px 24px 0 0;
}
.cta-title { font-size: 2rem; color: var(--heading-white); margin-bottom: 15px; }
.cta-title span { color: var(--accent-gold); }
.cta-subtitle { margin-bottom: 30px; }
.btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 35px;
    background: linear-gradient(135deg, var(--accent-gold), var(--gold-hover));
    color: var(--bg-dark);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 35px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer */
.footer-note {
    text-align: center;
    padding: 30px 0 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    .header { flex-direction: column; text-align: center; }
    .two-columns { flex-direction: column; }
    .sidebar { position: static; }
    .glance-grid { grid-template-columns: 1fr; }
    .key-takeaways ul { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .btn-group { flex-direction: column; }
    .btn-gold, .btn-whatsapp { width: 100%; }
    .expert-head { flex-direction: column; text-align: center; }
    .tabs { justify-content: center; }
    .tab-btn { padding: 10px 16px; font-size: 0.75rem; }
    .grounds-grid { grid-template-columns: 1fr; }
}