:root {
    --primary-text: #1e293b;
    --secondary-text: #64748b;
    --green-primary: #10b981;
    --green-light: #d1fae5;
    --green-emerald: #059669;
    --card-orange: #f97316;
    --card-yellow: #eab308;
    --card-green: #22c55e;
    --card-purple: #8b5cf6;
    --card-blue: #3b82f6;
    --card-teal: #14b8a6;
    --card-red: #ef4444;
    --card-indigo: #6366f1;
    --card-slate: #475569;
    --card-amber: #f59e0b;
    --background: #ffffff;
    --light-gray: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

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

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-text);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
}

/* Content Spacing */
p {
    margin-bottom: 16px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 12px;
    margin-top: 24px;
}

h1:first-child, h2:first-child, h3:first-child {
    margin-top: 0;
}

section {
    margin-bottom: 32px;
}

section > h2:first-child,
section > h3:first-child {
    margin-top: 0;
}

/* Paragraph spacing within sections */
section p {
    margin-bottom: 16px;
}

/* Ensure proper spacing between content blocks */
.educational-intro p,
.educational-how-to p,
.seo-section p,
.internal-links-section p,
.faq-section p {
    margin-bottom: 20px;
}

/* FAQ specific spacing */
.faq-item {
    margin-bottom: 20px;
}

.faq-question {
    margin-bottom: 0;
}

.faq-answer p {
    margin-bottom: 12px;
}

/* Improve readability for long text content */
.seo-section p:last-child,
.internal-links-section p:last-child,
.faq-section p:last-child {
    margin-bottom: 0;
}

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

/* Header Styles */
.header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-text);
    text-decoration: none;
}

.logo svg {
    width: 24px;
    height: 24px;
    fill: var(--green-primary);
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--green-primary);
    background-color: rgba(56, 176, 132, 0.1);
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle::after {
    content: '↓';
    font-size: 12px;
    transition: transform 0.2s;
}

.dropdown-toggle.active::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 12px 16px;
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-link:last-child {
    border-bottom: none;
}

.dropdown-link:hover {
    color: var(--green-primary);
    background-color: rgba(56, 176, 132, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* Main Content */
.main-content {
    padding: 48px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--primary-text);
}

.hero-title .highlight {
    color: var(--green-primary);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--secondary-text);
    margin-bottom: 32px;
}

/* Primary Tools Grid */
.primary-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 48px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.primary-tool-card {
    background: var(--background);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.primary-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.tool-icon svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

/* Color themes for primary tools */
.primary-tool-card.money .tool-icon {
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
}

.primary-tool-card.gold .tool-icon {
    background: linear-gradient(135deg, var(--card-yellow), #f59e0b);
}

.primary-tool-card.fitr .tool-icon {
    background: linear-gradient(135deg, var(--card-orange), #ea580c);
}

.primary-tool-card.portfolio .tool-icon {
    background: linear-gradient(135deg, var(--card-slate), #334155);
}

.primary-tool-card.ai .tool-icon {
    background: linear-gradient(135deg, var(--card-indigo), #4f46e5);
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-text);
}

.tool-description {
    color: var(--secondary-text);
    margin-bottom: 24px;
    line-height: 1.5;
}

.tool-btn {
    background: var(--green-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: var(--green-emerald);
    transform: translateY(-1px);
}

.tool-btn svg {
    width: 16px;
    height: 16px;
}

/* Educational Content Sections */
.educational-intro {
    background: var(--background);
    border-radius: var(--radius);
    padding: 40px;
    margin: 48px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.educational-intro h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary-text);
    text-align: center;
}

.educational-intro p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--secondary-text);
    margin-bottom: 16px;
    text-align: justify;
}

.educational-how-to {
    background: var(--green-light);
    border-radius: var(--radius);
    padding: 40px;
    margin: 48px 0;
    box-shadow: var(--shadow);
}

.educational-how-to h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon {
    width: 28px;
    height: 28px;
    background: var(--green-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.step-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--green-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 16px;
}

.step-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-text);
}

.step-item p {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.usage-note {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--primary-text);
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-top: 16px;
}

/* FAQ Accordion */
.faq-section {
    margin: 48px 0;
}

.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--primary-text);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--background);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-header:hover {
    background: var(--green-light);
}

.faq-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-text);
    margin: 0;
}

.chevron {
    transition: transform 0.3s ease;
    color: var(--green-primary);
    font-weight: bold;
}

.faq-item.active .chevron {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-content {
    max-height: 200px;
}

.faq-content p {
    padding: 0 24px 20px;
    color: var(--secondary-text);
    line-height: 1.6;
}

/* Secondary Tools Drawer */
.secondary-tools {
    margin: 48px 0;
    text-align: center;
}

.secondary-tools-toggle {
    background: var(--green-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.secondary-tools-toggle:hover {
    background: var(--green-emerald);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.toggle-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    fill: currentColor;
}

.secondary-tools.expanded .toggle-arrow {
    transform: rotate(180deg);
}

.secondary-tools-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    margin-top: 0;
}

.secondary-tools.expanded .secondary-tools-drawer {
    max-height: 1000px;
    margin-top: 32px;
}

.secondary-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.secondary-tool-card {
    background: var(--background);
    padding: 24px 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.secondary-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.secondary-tool-card .tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    margin: 0 auto 16px;
    color: white;
}

.secondary-tool-card .tool-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Color themes for secondary tools */
.secondary-tool-card .tool-icon.silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.secondary-tool-card .tool-icon.stocks {
    background: linear-gradient(135deg, var(--card-blue), #2563eb);
}

.secondary-tool-card .tool-icon.business {
    background: linear-gradient(135deg, var(--card-teal), #0d9488);
}

.secondary-tool-card .tool-icon.real-estate {
    background: linear-gradient(135deg, var(--card-amber), #d97706);
}

.secondary-tool-card .tool-icon.crypto {
    background: linear-gradient(135deg, var(--card-purple), #7c3aed);
}

.secondary-tool-card .tool-icon.livestock {
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
}

.secondary-tool-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-text);
}

.secondary-tool-link {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--green-primary);
    transition: all 0.2s ease;
    display: inline-block;
}

.secondary-tool-link:hover {
    background: var(--green-primary);
    color: white;
}

/* Footer Styles */
.site-footer {
    background: var(--card-slate);
    color: white;
    padding: 48px 0 24px;
    margin-top: 80px;
}

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

.footer-column-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

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

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

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.legal-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.legal-link:hover {
    color: white;
}

.project-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

    /* Header Mobile Styles - Compact Header */
    .header {
        padding: 8px 0;
    }

    .header-content {
        padding: 0 16px;
    }

    .logo {
        gap: 8px;
        font-size: 16px;
    }

    .logo svg {
        width: 20px;
        height: 20px;
    }

    .nav-menu {
        display: none;
    }

    .primary-tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 32px 0;
    }

    .primary-tool-card {
        padding: 24px 20px;
    }

    .tool-icon {
        width: 64px;
        height: 64px;
    }

    .tool-icon svg {
        width: 32px;
        height: 32px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .tool-title {
        font-size: 1.1rem;
    }

    .tool-description {
        font-size: 0.9rem;
    }

    .educational-intro,
    .educational-how-to {
        padding: 24px 20px;
        margin: 32px 0;
    }

    .educational-intro h2,
    .educational-how-to h2 {
        font-size: 1.25rem;
    }

    .educational-intro p,
    .step-item p {
        font-size: 0.95rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step-number {
        font-size: 1rem;
    }

    .step-item h3 {
        font-size: 1rem;
    }

    .usage-note {
        font-size: 0.9rem;
    }

    .faq-section h2 {
        font-size: 1.5rem;
    }

    .faq-header h3 {
        font-size: 1rem;
    }

    .secondary-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 0 16px;
    }

    .secondary-tool-card {
        padding: 20px 12px;
    }

    .secondary-tool-card h4 {
        font-size: 0.9rem;
    }

    .secondary-tool-link {
        font-size: 0.8rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .footer-column-title {
        font-size: 1rem;
    }

    .footer-link {
        font-size: 0.85rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {

    /* Even more compact header for very small screens */
    .header {
        padding: 6px 0;
    }

    .header-content {
        padding: 0 12px;
    }

    .logo {
        gap: 6px;
        font-size: 14px;
    }

    .logo svg {
        width: 18px;
        height: 18px;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .tool-title {
        font-size: 1rem;
    }

    .tool-description {
        font-size: 0.85rem;
    }

    .educational-intro h2,
    .educational-how-to h2 {
        font-size: 1.1rem;
    }

    .educational-intro p,
    .step-item p {
        font-size: 0.9rem;
    }

    .step-number {
        font-size: 0.9rem;
    }

    .step-item h3 {
        font-size: 0.9rem;
    }

    .usage-note {
        font-size: 0.85rem;
    }

    .faq-section h2 {
        font-size: 1.25rem;
    }

    .faq-header h3 {
        font-size: 0.9rem;
    }

    .secondary-tool-card h4 {
        font-size: 0.85rem;
    }

    .secondary-tool-link {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .footer-column-title {
        font-size: 0.9rem;
    }

    .footer-link {
        font-size: 0.8rem;
    }

    .secondary-tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Calculator Form */
.calculator-form {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    direction: rtl;
}

/* Ensure proper RTL layout for calculator form */
.calculator-form * {
    direction: rtl;
}

/* Form group container for better alignment */
.calculator-form .form-group {
    width: 100%;
    align-items: stretch;
}

/* Labels alignment in calculator */
.calculator-form .form-label {
    text-align: right;
    margin-bottom: 12px;
    padding-right: 4px;
}

/* Input alignment in calculator */
.calculator-form .form-input,
.calculator-form .form-select {
    text-align: right;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure consistent height and alignment */
.calculator-form .form-input[type="text"],
.calculator-form .form-input[type="number"],
.calculator-form .form-select {
    height: auto;
    min-height: 48px;
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-text);
    text-align: right;
    font-size: 0.95rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: var(--background);
    color: var(--primary-text);
    transition: all 0.2s;
    text-align: right;
    direction: rtl;
}

/* Ensure placeholder text is also right-aligned */
.form-input::placeholder {
    text-align: right;
    direction: rtl;
}

/* Specific alignment for number inputs */
.form-input[type="number"] {
    text-align: right;
    direction: rtl;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(56, 176, 132, 0.1);
}

.form-text {
    font-size: 0.875rem;
    color: var(--secondary-text);
    margin-top: 4px;
    text-align: right;
    direction: rtl;
}

.calculate-btn {
    width: 100%;
    background: var(--green-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calculate-btn:hover {
    background: var(--green-emerald);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* RTL alignment for calculate button */
.calculator-form .calculate-btn {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calculate-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Result Section */
.result-section {
    margin-top: 32px;
    padding: 24px;
    background: var(--light-gray);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: none;
    direction: rtl;
    text-align: right;
}

/* Ensure result content is properly aligned */
.result-section .result-title {
    text-align: center;
    color: var(--green-primary);
}

.result-section .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.result-section .result-item {
    text-align: right;
}

.result-section .result-item-label {
    text-align: right;
    font-size: 0.875rem;
    color: var(--secondary-text);
    margin-bottom: 4px;
}

.result-section .result-item-value {
    text-align: right;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-text);
}

.result-section .result-amount {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--green-primary);
    margin: 16px 0;
}

.result-section .result-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.result-section.show {
    display: block;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--green-primary);
}



/* Nisab Banner */
.nisab-banner {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a202c;
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    text-align: center;
}

.nisab-banner .amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 8px 0;
}

.nisab-banner .description {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Special styling for gold price input */
.form-input[placeholder="مثال: 292"] {
    border: 2px solid var(--green-light);
    background-color: rgba(209, 250, 229, 0.1);
}

.form-input[placeholder="مثال: 292"]:focus {
    border-color: var(--green-primary);
    background-color: rgba(209, 250, 229, 0.2);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Nisab Info Section */
.nisab-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

/* SEO Sections */
.seo-section {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 32px auto;
    max-width: 800px;
    box-shadow: var(--shadow);
}

.seo-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 16px;
    border-bottom: 2px solid var(--green-primary);
    padding-bottom: 8px;
}

.seo-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--green-primary);
    margin: 24px 0 12px 0;
}

.seo-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--primary-text);
    margin-bottom: 20px;
}

/* Internal Links Section */
.internal-links-section {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 32px auto;
    max-width: 800px;
    box-shadow: var(--shadow);
}

.internal-links-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 24px;
    text-align: center;
    border-bottom: 2px solid var(--green-primary);
    padding-bottom: 8px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.link-card {
    background: linear-gradient(135deg, var(--green-light), rgba(209, 250, 229, 0.3));
    border: 1px solid var(--green-primary);
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: var(--primary-text);
    transition: all 0.3s ease;
    text-align: center;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.5), rgba(16, 185, 129, 0.1));
}

.link-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--green-primary);
    margin-bottom: 8px;
}

.link-card p {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin: 0;
}

/* FAQ Section */
.faq-section {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 32px auto;
    max-width: 800px;
    box-shadow: var(--shadow);
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 24px;
    text-align: center;
    border-bottom: 2px solid var(--green-primary);
    padding-bottom: 8px;
}

.faq-container {
    margin-top: 24px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--light-gray);
}

.faq-question {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-text);
    background: var(--background);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.faq-question:hover {
    background: var(--green-light);
    color: var(--green-primary);
}

.faq-question::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--secondary-text);
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.faq-question.active::after {
    transform: rotate(-180deg);
    color: var(--green-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--light-gray);
}

.faq-answer.show {
    max-height: 200px;
}

.faq-answer p {
    padding: 16px 20px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary-text);
    background: var(--light-gray);
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* SEO Footer Text */
.seo-footer-text {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(209, 250, 229, 0.1));
    border: 1px solid var(--green-primary);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px auto;
    max-width: 800px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--primary-text);
    box-shadow: var(--shadow);
}

.nisab-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 12px;
}

.nisab-calculation {
    font-size: 1.1rem;
    color: #075985;
    margin-bottom: 8px;
}

.nisab-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0ea5e9;
}

.nisab-note {
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 60px;
    right: 16px;
    left: 16px;
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 16px;
    z-index: 1001;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-menu {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    text-align: right;
}

.mobile-nav-link:last-child {
    margin-bottom: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--green-primary);
    background-color: rgba(56, 176, 132, 0.1);
}

.mobile-nav-link.more-link {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 8px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 8px 0;
    }

    .header-content {
        padding: 0 16px;
    }

    .logo {
        gap: 8px;
        font-size: 16px;
    }

    .logo svg {
        width: 20px;
        height: 20px;
    }

    .nav-menu {
        display: none;
    }

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

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-input,
    .form-select {
        font-size: 14px;
        padding: 10px 14px;
    }

    .calculate-btn {
        font-size: 14px;
        padding: 14px 28px;
    }

    .result-title {
        font-size: 1.1rem;
    }

    .result-amount {
        font-size: 1.5rem;
    }

    .nisab-banner .amount {
        font-size: 1.25rem;
    }

    .nisab-banner {
        font-size: 0.9rem;
        padding: 12px 20px;
    }

    .calculator-form {
        padding: 24px;
        margin: 0 16px;
        direction: rtl;
    }
    
    .calculator-form .form-label {
        text-align: right;
        font-size: 0.9rem;
    }
    
    .calculator-form .form-input,
    .calculator-form .form-select {
        text-align: right;
        direction: rtl;
        font-size: 14px;
    }

    .result-section .result-grid {
        grid-template-columns: 1fr;
    }
    
    .result-section .result-item,
    .result-section .result-item-label,
    .result-section .result-item-value {
        text-align: right;
    }
    
    .result-section .result-amount {
        text-align: center;
        font-size: 1.5rem;
    }

    .nisab-info {
        padding: 16px;
        margin: 16px 0;
    }

    .nisab-header {
        font-size: 1.1rem;
    }

    .nisab-calculation {
        font-size: 1rem;
    }

    .nisab-amount {
        font-size: 1.2rem;
    }

    .nisab-note {
        font-size: 0.85rem;
    }

    .seo-section,
    .internal-links-section,
    .faq-section,
    .seo-footer-text {
        margin: 24px 16px;
        padding: 24px;
    }

    .seo-section h2,
    .internal-links-section h2,
    .faq-section h2 {
        font-size: 1.3rem;
    }

    .seo-section h3,
    .internal-links-section h3,
    .faq-section h3 {
        font-size: 1.1rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .link-card {
        padding: 16px;
    }

    .link-card h3 {
        font-size: 1rem;
    }

    .link-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header {
        padding: 6px 0;
    }

    .header-content {
        padding: 0 12px;
    }

    .logo {
        gap: 6px;
        font-size: 14px;
    }

    .logo svg {
        width: 18px;
        height: 18px;
    }

    .main-content {
        padding: 24px 0;
    }

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

    .calculator-form {
        margin: 0;
    }

    .nisab-info {
        padding: 12px;
        margin: 12px 0;
    }

    .nisab-header {
        font-size: 1rem;
    }

    .nisab-calculation {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .nisab-amount {
        font-size: 1.1rem;
    }

    .seo-section,
    .internal-links-section,
    .faq-section,
    .seo-footer-text {
        margin: 16px;
        padding: 20px;
    }

    .seo-section h2,
    .internal-links-section h2,
    .faq-section h2 {
        font-size: 1.2rem;
    }

    .seo-section h3,
    .internal-links-section h3,
    .faq-section h3 {
        font-size: 1rem;
    }

    .seo-section p,
    .internal-links-section p,
    .faq-section p,
    .seo-footer-text {
        font-size: 0.95rem;
    }

    .faq-container {
        margin-top: 16px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .faq-answer p {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* Gold Page Dark Mode Overrides */
body.dark-mode .nisab-info {
    background: linear-gradient(135deg, #d97706, #92400e);
    border-color: #1e293b;
}

body.dark-mode .nisab-info h4 {
    color: #f1f5f9;
}

body.dark-mode .nisab-formula {
    color: #cbd5e1;
}

body.dark-mode .nisab-amount {
    color: #f1f5f9;
}

body.dark-mode .nisab-note {
    color: #94a3b8;
}

body.dark-mode .hero-subtitle {
    color: #cbd5e1;
}

body.dark-mode .form-text {
    color: #94a3b8;
}

body.dark-mode .result-item-label {
    color: #94a3b8;
}

body.dark-mode .result-item-value {
    color: #f1f5f9;
}

body.dark-mode .result-amount {
    color: #f1f5f9;
}

body.dark-mode .breadcrumb {
    background: #1e293b;
    color: #cbd5e1;
}

/* Footer Styles for Subpages */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column {
    text-align: right;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #87CEEB;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: #E0E0E0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: #87CEEB;
    transform: translateX(-3px);
}

.footer-divider {
    height: 1px;
    background-color: #4A5568;
    margin: 2rem 0 1.5rem;
    width: 100%;
}

.footer-bottom-section {
    text-align: center;
    padding-top: 0.5rem;
}

.footer-bottom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom-link {
    color: #E0E0E0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-bottom-link:hover {
    color: #87CEEB;
}

.footer-separator {
    color: #4A5568;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer-nav-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-bottom-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-nav-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Theme Overrides */
body.theme-orange {
    --green-primary: #f97316;
    --green-light: #ffedd5;
    --green-emerald: #c2410c;
    --green-dark: #9a3412;
}

body.theme-teal {
    --green-primary: #14b8a6;
    --green-light: #ccfbf1;
    --green-emerald: #0f766e;
    --green-dark: #115e59;
}

body.theme-gold {
    --green-primary: #eab308;
    --green-light: #fef9c3;
    --green-emerald: #a16207;
    --green-dark: #854d0e;
}

body.theme-blue {
    --green-primary: #3b82f6;
    --green-light: #dbeafe;
    --green-emerald: #1d4ed8;
    --green-dark: #1e40af;
}

body.theme-purple {
    --green-primary: #8b5cf6;
    --green-light: #ede9fe;
    --green-emerald: #6d28d9;
    --green-dark: #5b21b6;
}

/* Consolidated Banners */
.info-banner,
.nisab-banner {
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    text-align: center;
}

.info-banner .amount,
.nisab-banner .amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 8px 0;
}

.info-banner .description,
.nisab-banner .description {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Nisab Info Box */
.nisab-info {
    background: linear-gradient(135deg, var(--green-light), var(--background));
    border: 2px solid var(--green-primary);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.nisab-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-emerald);
    margin-bottom: 12px;
}

.nisab-formula {
    font-size: 1.1rem;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.nisab-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green-primary);
}

.nisab-note {
    font-size: 0.9rem;
    color: var(--secondary-text);
    font-style: italic;
}

/* Enhanced Styles (Consolidated) */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    /* Fallback if var not supported, but vars are used below */
    background: var(--green-light);
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid var(--green-primary);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.feature-icon {
    background: var(--green-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.feature-item span:last-child {
    font-weight: 500;
    color: var(--green-primary);
    font-size: 0.9rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--primary-text);
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--green-primary), var(--green-emerald));
    border-radius: 2px;
    display: block;
    margin: 16px auto 0;
}

.educational-content {
    padding: 80px 0;
    background: var(--background);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.content-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-primary), var(--green-emerald));
}

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

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-text);
}

.content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--secondary-text);
    line-height: 1.6;
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list li strong {
    color: var(--primary-text);
    font-weight: 600;
}

.faq-section {
    padding: 80px 0;
    background: var(--light-gray);
}

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

.faq-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-question {
    width: 100%;
    padding: 24px;
    background: none;
    border: none;
    text-align: right;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-text);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--light-gray);
}

.faq-question[aria-expanded="true"] {
    background: var(--green-light);
    color: var(--green-emerald);
}

.faq-question-text {
    flex: 1;
    text-align: right;
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    background: var(--green-emerald);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.active {
    padding: 0 24px 24px;
    max-height: 200px;
}

.faq-answer p {
    color: var(--secondary-text);
    line-height: 1.7;
    margin: 0;
}

.related-calculators {
    padding: 80px 0;
    background: var(--background);
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.calculator-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.card-header {
    margin-bottom: 16px;
}

.calculator-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.card-description {
    color: var(--secondary-text);
    margin-bottom: 20px;
    line-height: 1.5;
}

.calculate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculate-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.calculate-button:hover::before {
    animation: shimmer 3s infinite;
    opacity: 1;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button.primary {
    background: white;
    color: var(--green-primary);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: white;
    color: var(--green-primary);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .hero-features {
        gap: 16px;
    }

    .feature-item {
        padding: 10px 16px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
    }

    .calculators-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .feature-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .educational-content,
    .faq-section,
    .related-calculators,
    .cta-section {
        padding: 60px 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 24px;
    }

    .faq-question {
        padding: 20px;
        font-size: 0.95rem;
    }

    .calculators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .calculator-card {
        padding: 20px;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .calculators-grid {
        grid-template-columns: 1fr;
    }

    .calculator-card {
        padding: 20px;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-description {
        font-size: 1rem;
    }
}

/* ========================================
   BLOG SECTION STYLES
   ======================================== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-emerald) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    margin-bottom: 60px;
}

.blog-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.blog-hero-title .highlight {
    color: var(--green-light);
    position: relative;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-light);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Blog Categories Section */
.blog-categories {
    margin-bottom: 80px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.category-card {
    background: var(--background);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-emerald));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-text);
}

.category-card p {
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-count {
    font-size: 0.9rem;
    color: var(--green-primary);
    font-weight: 500;
}

/* Featured Articles Section */
.featured-articles {
    margin-bottom: 80px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-top: 40px;
}

.featured-main {
    background: var(--background);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 40px;
}

.featured-badge {
    background: linear-gradient(135deg, var(--card-orange), var(--card-yellow));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.featured-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.featured-title a {
    color: var(--primary-text);
    text-decoration: none;
    transition: color 0.2s;
}

.featured-title a:hover {
    color: var(--green-primary);
}

.featured-excerpt {
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.featured-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.featured-secondary {
    background: var(--background);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green-primary);
    transition: all 0.2s;
}

.featured-secondary:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.featured-secondary .featured-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.featured-secondary .featured-title a {
    color: var(--primary-text);
    text-decoration: none;
}

.featured-secondary .featured-title a:hover {
    color: var(--green-primary);
}

/* Latest Articles Section */
.latest-articles {
    margin-bottom: 80px;
}

.articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.articles-filters {
    display: flex;
    gap: 12px;
    background: var(--background);
    padding: 4px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--secondary-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--green-primary);
    color: white;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--background);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-category {
    background: var(--green-light);
    color: var(--green-emerald);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-date {
    color: var(--secondary-text);
    font-size: 0.85rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-title a {
    color: var(--primary-text);
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--green-primary);
}

.card-excerpt {
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.author-name {
    font-weight: 500;
}

.read-time {
    padding: 4px 8px;
    background: var(--light-gray);
    border-radius: 12px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--border);
    color: var(--secondary-text);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: var(--green-primary);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--green-emerald);
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--indigo-primary), var(--indigo-dark));
    color: white;
    padding: 60px 0;
    margin-top: 80px;
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.newsletter-container p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.newsletter-form {
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.newsletter-form button {
    background: var(--card-orange);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: #ea580c;
}

.newsletter-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Blog-specific responsive design */
@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 40px;
    }

    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-stats {
        flex-direction: column;
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .articles-header {
        flex-direction: column;
        align-items: stretch;
    }

    .articles-filters {
        justify-content: center;
        flex-wrap: wrap;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .form-group {
        flex-direction: column;
    }

    .newsletter-container h2 {
        font-size: 1.5rem;
    }
}