/* Social Grant Page Styles - Pro Visual Overhaul */
.social-grant-page {
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
}

/* 🎨 Modernized Variables & Fluid Typography */
:root {
    /* Fluid Type Scale: Mobile (16px) -> Desktop (18px) base */
    --fs-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-md: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
    --fs-lg: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --fs-xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);

    /* Clean Color Palette (Less Noise) */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* Opaque for readability */
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #2c3e50;
    --accent-primary: #1e3a8a;
    --accent-secondary: #3b82f6;
    --border-secondary: #e0e0e0;
}

body.dark-theme {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --glass-bg: rgba(30, 30, 30, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #42a5f5;
    --accent-secondary: #1e88e5;
    --border-secondary: #333333;
}

.grant-hero {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    padding: clamp(40px, 5vw, 80px) 20px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

body.light-theme .grant-hero {
    background: #ffffff;
}

body.light-theme .grant-hero .hero-subtitle {
    color: #1e3a8a !important;
}

.grant-hero h1 {
    font-size: var(--fs-xl);
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 800;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body.dark-theme .grant-hero h1 {
    color: var(--text-primary);
}

.grant-hero .hero-subtitle {
    font-size: var(--fs-md);
    color: #1e3a8a;
    font-weight: 600;
    max-width: 700px;
    margin: 0 auto;
}

body.dark-theme .grant-hero .hero-subtitle {
    color: #60a5fa;
}

.grant-content-section {
    padding: clamp(30px, 4vw, 60px) 20px;
    background: var(--bg-primary);
}

.grant-content-section h2 {
    font-size: var(--fs-lg);
    color: var(--text-primary);
    border-right: 4px solid var(--accent-primary);
    padding-right: 20px;
    margin-bottom: 30px;
    line-height: 1.3;
}

.grant-content-section h3 {
    font-size: var(--fs-md);
    color: var(--text-primary);
    margin: 30px 0 15px;
}

/* 📱 Responsiveness Helpers */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 12px;
}

/* 🟢 Section Spacing Optimization */
.grant-content-section>h2,
.grant-content-section>div[class$="-section"],
.grant-content-section>div[class$="-box"],
.grant-content-section>.sms-encyclopedia,
.grant-content-section>.recovery-hub {
    margin: 60px 0;
}

@media (max-width: 480px) {

    .grant-content-section>h2,
    .grant-content-section>div[class$="-section"],
    .grant-content-section>div[class$="-box"],
    .grant-content-section>.sms-encyclopedia,
    .grant-content-section>.recovery-hub {
        margin: 40px 0;
    }

    .detailed-eligibility-section,
    .pro-text-box,
    .sms-encyclopedia,
    .community-pulse-box,
    .smart-checklist-box {
        padding: 20px;
        border-radius: 18px;
    }

    .grant-hero h1 {
        font-size: 1.8rem;
    }
}

/* Calculator Styles - Clean & Pro */
.grant-calculator-wrapper {
    background: var(--bg-secondary);
    padding: clamp(20px, 4vw, 40px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    max-width: 800px;
    margin: 40px auto;
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease;
}

.grant-calculator-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-secondary);
}

.calc-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.calc-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    width: 44px;
    /* Minimum touch target width */
    height: 44px;
    /* Minimum touch target height */
    border-radius: 12px;
    border: none;
    background: var(--accent-primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    user-select: none;
}

.control-btn:active {
    transform: scale(0.96);
    background: var(--accent-secondary);
}

.count-display {
    font-size: 1.5rem;
    font-weight: 800;
    min-width: 40px;
    text-align: center;
}

.calc-toggle {
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.calc-toggle.active {
    background: var(--accent-primary);
}

.calc-toggle::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.calc-toggle.active::after {
    transform: translateX(30px);
}

.total-usd {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.trust-signal {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 15px;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    line-height: 1.4;
}

/* Result Card Enhancement */
.calc-results {
    margin-top: 30px;
    background: linear-gradient(145deg, #001a33, #002244);
    padding: 35px;
    border-radius: 24px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.calc-results::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

body.light-theme .calc-results {
    background: linear-gradient(145deg, #0d1b3e, #1a365d);
    color: white;
    /* Force white text on dark background */
}

.calc-results .total-lyd,
.calc-results .total-usd,
.calc-results .trust-signal,
.calc-results div[style*="text-secondary"] {
    color: white !important;
}

.result-card-header {
    font-size: 0.9rem;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Breadcrumbs Accessibility Fix */
.breadcrumb-container {
    margin-top: 25px;
    margin-bottom: 10px;
}

.grant-breadcrumb {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-link {
    color: var(--accent-primary);
    text-decoration: underline !important;
    /* Visual indicator for links */
    text-underline-offset: 4px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.breadcrumb-link:hover {
    color: var(--accent-tertiary);
    text-decoration-thickness: 2px;
}

.breadcrumb-sep {
    margin: 0 12px;
    color: var(--text-primary);
    opacity: 1;
    font-weight: bold;
}

.breadcrumb-current {
    color: var(--text-primary);
    opacity: 0.95;
    font-weight: 400;
}

/* Light Theme Specific Contrast */
body.light-theme .breadcrumb-link {
    color: #003366;
    /* High contrast navy blue */
}

body.light-theme .breadcrumb-current,
body.light-theme .breadcrumb-sep {
    color: #1a1a1a;
}

/* Telegram Bridge */
/* Telegram Bridge - simplified */
.telegram-cta {
    margin-top: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* Touch target */
    background: #0088cc;
    /* Official Telegram Blue */
    color: white !important;
    padding: 0 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-base);
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
    border: none;
}

.telegram-cta:hover {
    transform: translateY(-3px) scale(1.05);
    background: #005580;
    box-shadow: 0 6px 20px rgba(0, 102, 153, 0.4);
}

.telegram-cta i {
    margin-left: 8px;
}

/* Viral Sharing Button */
.share-wa-btn {
    display: inline-block;
    background: #128C7E;
    /* Deeper WhatsApp Green for accessibility */
    color: white !important;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(18, 140, 126, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.share-wa-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: #075E54;
    box-shadow: 0 6px 20px rgba(18, 140, 126, 0.4);
}

/* Quick Navigation Section */
.quick-nav-container {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
    border: 1px solid var(--accent-primary);
    text-align: center;
}

.quick-nav-container h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.q-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 15px;
    border-radius: 12px;
    font-size: var(--fs-base);
    font-weight: 500;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    /* Touch target */
    box-shadow: var(--glass-shadow);
}

.q-link:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    color: var(--accent-primary);
}

/* Schedule Table */
.grant-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
}

.grant-table th {
    background: var(--accent-primary);
    color: #ffffff;
    padding: 15px;
    text-align: right;
    font-weight: 700;
}

.grant-table td {
    padding: 15px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-primary);
}

body.light-theme .grant-table td {
    color: #1a1a1a;
}

body.dark-theme .grant-table td {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
}

.faq-grant {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.faq-grant h4 {
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.teacher-tip {
    background: rgba(255, 215, 0, 0.1);
    border-right: 5px solid #FFD700;
    padding: 25px;
    border-radius: 15px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.teacher-tip strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

body.light-theme .teacher-tip {
    background: rgba(0, 34, 68, 0.05);
    border-right-color: var(--accent-primary);
}

/* 🗺️ Visual Journey Styles */
.visual-journey-section {
    margin: 60px 0;
}

.journey-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    gap: 20px;
    margin-top: 40px;
}

.journey-timeline::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: var(--accent-primary);
    z-index: 1;
    opacity: 0.2;
}

.timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
    border: 4px solid var(--bg-primary);
    transition: transform 0.3s ease;
}

.timeline-step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
}

.step-content h4 {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* 📖 SMS Encyclopedia Styles */
.sms-encyclopedia {
    background: var(--glass-bg);
    padding: 35px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    margin: 60px 0;
}

.encyclopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.encyclopedia-item {
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-code {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.code-success {
    background: #1b5e20;
    color: #fff;
}

.code-waiting {
    background: #e65100;
    color: #fff;
}

.code-error {
    background: #b71c1c;
    color: #fff;
}

.code-info {
    background: #01579b;
    color: #fff;
}

/* 🛡️ Recovery Hub Styles */
.recovery-hub {
    margin: 60px 0;
}

.recovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.recovery-card {
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recovery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
}

.recovery-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 215, 0, 0.05);
}

.recovery-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .journey-timeline {
        flex-direction: column;
    }

    .journey-timeline::after {
        display: none;
    }

    .timeline-step {
        text-align: right;
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }

    .step-icon {
        margin: 0;
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 📊 Community Pulse Styles */
.community-pulse-box {
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.pulse-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.pulse-live-indicator {
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse-red 2s infinite;
}

.community-pulse-box h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.pulse-actions {
    display: flex;
    gap: 15px;
}

.pulse-btn {
    flex: 1;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.pulse-yes {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.pulse-no {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.pulse-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pulse-yes:hover {
    background: #4CAF50;
    color: #fff;
}

.pulse-no:hover {
    background: #FF9800;
    color: #fff;
}

.poll-results-display {
    text-align: center;
}

.poll-bar-wrapper {
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.poll-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 1s ease-out;
}

/* ✅ Smart Checklist Styles */
.smart-checklist-box {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 24px;
    border: 2px dashed var(--accent-primary);
    margin-bottom: 40px;
}

.smart-checklist-box h3 {
    color: var(--text-primary);
    font-weight: 700;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-secondary);
}

.check-text {
    color: var(--text-primary);
    font-weight: 500;
}

.check-item:hover {
    border-color: var(--accent-primary);
}

.check-item input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.check-item.checked {
    background: rgba(76, 175, 80, 0.05);
    border-color: #4CAF50;
}

.check-item.checked .check-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.checklist-status-msg {
    margin-top: 20px;
    color: #4CAF50;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .pulse-actions {
        flex-direction: column;
    }
}

/* 🏆 Detailed Eligibility Styles */
.detailed-eligibility-section {
    margin: 60px 0;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-secondary);
}

.eligibility-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.e-card-pro {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 18px;
    border-right: 4px solid var(--accent-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.e-card-pro h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

.e-card-pro ul {
    padding-right: 20px;
    margin: 0;
}

.e-card-pro li {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* 📄 Documentation & Technical Styles */
.docs-technical-section {
    margin: 60px 0;
}

.pro-text-box {
    background: var(--bg-primary);
    padding: 35px;
    border-radius: 24px;
    border: 1px dashed var(--accent-primary);
}

.pro-text-box ul {
    margin-top: 20px;
}

.pro-text-box li {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* 🏦 Bank Distribution Styles */
.bank-distribution-section {
    margin: 60px 0;
}

.bank-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.bank-item {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.bank-item h5 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.bank-item p {
    color: var(--text-secondary);
}

@media (max-width: 768px) {

    .detailed-eligibility-section,
    .pro-text-box {
        padding: 25px;
    }
}


/* تحسينات إضافية للتباين */
.total-lyd {
    font-size: 2rem;
    font-weight: 800;
    color: #FFD700 !important;
    margin-bottom: 10px;
}

.total-usd {
    font-size: 1.3rem;
    color: #ffffff !important;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content h5 {
    color: var(--accent-primary);
    font-weight: 700;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-grant {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-secondary);
}

.faq-grant p, .faq-grant ul, .faq-grant li {
    color: var(--text-secondary);
}

.grant-content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.encyclopedia-item p {
    color: var(--text-secondary);
}

.recovery-card h4 {
    color: var(--text-primary);
    font-weight: 700;
}

.recovery-card p {
    color: var(--text-secondary);
}

.pro-text-box p, .pro-text-box li {
    color: var(--text-secondary);
}


/* حاويات النصوص لإبرازها */
.grant-content-section > p {
    background: var(--bg-secondary);
    padding: 20px 25px;
    border-radius: 12px;
    border-right: 4px solid var(--accent-primary);
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

body.dark-theme .grant-content-section > p {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
