
/* =========================================
   IQRANIX — PREMIUM ZAKAT CALCULATOR
   Theme: Midnight Navy & Champagne Gold
========================================= */

:root {
    --navy: #071321;
    --navy-deep: #040c17;
    --navy-card: #101f30;
    --navy-light: #172a3e;

    --gold: #e8c987;
    --gold-light: #f5dfad;
    --gold-dark: #b99759;

    --white: #f8f7f2;
    --muted: #a5afba;
    --muted-dark: #758394;

    --border: rgba(232, 201, 135, 0.15);
    --input-bg: #0b1928;

    --success: #79cba1;
    --danger: #e58c8c;

    --font-body: 'DM Sans', sans-serif;
    --font-heading: 'Playfair Display', serif;

    --radius: 20px;
}

/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background: var(--navy-deep);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(34, 58, 77, 0.25),
            transparent 35%
        ),
        var(--navy-deep);

    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.zakat-page {
    width: 100%;
    max-width: 900px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 30px;
}


/* =========================================
   TOP NAVIGATION
========================================= */

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 16px;
    position: relative;
    z-index: 5;
    background: rgba(4, 12, 23, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.back-button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--gold);
    text-decoration: none;
    background: rgba(232, 201, 135, 0.055);
    transition: 0.25s ease;
}

.back-button:active {
    transform: scale(0.94);
    background: rgba(232, 201, 135, 0.14);
}

.back-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-name {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2.4px;
}

.brand-divider {
    height: 17px;
    width: 1px;
    background: var(--gold-dark);
    opacity: 0.6;
}

.page-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.topbar-spacer {
    flex: 1;
}


/* =========================================
   HERO IMAGE
========================================= */

.zakat-hero {
    height: 330px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 75% 30%,
            rgba(232, 201, 135, 0.2),
            transparent 35%
        ),
        linear-gradient(135deg, #182c3d, #071321 75%);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    opacity: 0.72;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(4, 12, 23, 0.97) 0%,
            rgba(4, 12, 23, 0.78) 43%,
            rgba(4, 12, 23, 0.25) 100%
        ),
        linear-gradient(
            0deg,
            rgba(4, 12, 23, 0.75),
            transparent 55%
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 38px 26px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    margin-bottom: 17px;
}

.eyebrow-line {
    width: 24px;
    height: 1px;
    background: var(--gold);
}

.hero-content h1 {
    max-width: 440px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(38px, 8vw, 57px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -1.5px;
}

.hero-content h1 em {
    color: var(--gold);
    font-weight: 500;
}

.hero-content > p {
    max-width: 390px;
    color: rgba(248, 247, 242, 0.77);
    font-size: 12px;
    line-height: 1.9;
    margin-top: 15px;
}

.hero-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
}

.hero-decoration {
    color: var(--gold);
    font-family: serif;
    font-size: 30px;
    opacity: 0.8;
}

.hero-caption {
    color: rgba(232, 201, 135, 0.8);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2.4px;
}


/* =========================================
   MAIN CONTENT
========================================= */

.calculator-container {
    padding: 30px 20px 0;
}

.intro-section {
    margin-bottom: 25px;
}

.section-kicker {
    display: block;
    color: var(--gold-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 7px;
}

.section-heading h2,
.calculate-intro h2,
.results-header h2 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.3;
}

.section-heading > p,
.calculate-intro > p {
    max-width: 470px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}


/* =========================================
   RATE CARD
========================================= */

.zakat-rate-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 21px;
    padding: 17px;
    border-radius: 17px;
    border: 1px solid rgba(232, 201, 135, 0.2);
    background:
        linear-gradient(
            110deg,
            rgba(232, 201, 135, 0.11),
            rgba(232, 201, 135, 0.025)
        );
}

.rate-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(232, 201, 135, 0.13);
    color: var(--gold);
    font-size: 23px;
}

.rate-information {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.rate-information span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.rate-information strong {
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.3;
}

.rate-note {
    margin-left: auto;
    color: var(--muted);
    font-size: 9px;
}


/* =========================================
   CALCULATOR CARDS
========================================= */

.calculator-card {
    position: relative;
    margin-bottom: 17px;
    padding: 22px 19px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: var(--radius);
    background:
        linear-gradient(
            145deg,
            rgba(20, 37, 55, 0.97),
            rgba(12, 26, 41, 0.98)
        );
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: border-color 0.25s ease;
}

.calculator-card:focus-within {
    border-color: rgba(232, 201, 135, 0.32);
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.card-heading h3 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
}

.card-icon,
.category-symbol {
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(232, 201, 135, 0.09);
    border: 1px solid rgba(232, 201, 135, 0.12);
    color: var(--gold);
    font-size: 20px;
}

.gold-symbol {
    color: var(--gold-light);
}

.silver-symbol {
    color: #c5d2dc;
}

.card-description {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
    margin-bottom: 19px;
    max-width: 530px;
}


/* =========================================
   FORM INPUTS
========================================= */

.input-group {
    margin-top: 17px;
}

.input-group label,
.field-label {
    display: block;
    margin-bottom: 8px;
    color: #dce1e5;
    font-size: 11px;
    font-weight: 600;
}

.amount-input {
    min-height: 53px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    background: var(--input-bg);
    transition: 0.2s ease;
}

.amount-input:focus-within {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(232, 201, 135, 0.07);
}

.amount-input input {
    min-width: 0;
    width: 100%;
    height: 52px;
    padding: 0 14px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.amount-input input::placeholder {
    color: #607080;
    font-weight: 400;
}

.amount-input input:focus-visible {
    outline: none;
}

.currency-symbol,
.input-suffix {
    flex-shrink: 0;
    padding: 0 13px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.currency-symbol {
    height: 52px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(232, 201, 135, 0.045);
}

.input-suffix {
    color: var(--muted);
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    height: 52px;
    display: flex;
    align-items: center;
}


/* SELECTS */

.premium-select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8c987' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    color: var(--white);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.premium-select:focus {
    border-color: var(--gold-dark);
}

.premium-select option {
    background: var(--navy-card);
    color: var(--white);
}


/* =========================================
   PRICE STATUS
========================================= */

.price-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(121, 203, 161, 0.055);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gold-dark);
    box-shadow: 0 0 9px rgba(232, 201, 135, 0.3);
}

.price-status.success .status-dot {
    background: var(--success);
    box-shadow: 0 0 9px rgba(121, 203, 161, 0.4);
}

.price-status.error .status-dot {
    background: var(--danger);
    box-shadow: 0 0 9px rgba(229, 140, 140, 0.4);
}


/* =========================================
   LIVE METAL PRICE
========================================= */

.metal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 17px;
    padding: 13px 12px;
    border: 1px solid rgba(232, 201, 135, 0.12);
    border-radius: 11px;
    background: rgba(232, 201, 135, 0.045);
}

.metal-price-row span {
    color: var(--muted);
    font-size: 10px;
}

.metal-price-row strong {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}


/* =========================================
   LIABILITIES
========================================= */

.liabilities-card {
    border-color: rgba(229, 140, 140, 0.12);
}

.liabilities-card .category-symbol {
    color: var(--danger);
    background: rgba(229, 140, 140, 0.08);
    border-color: rgba(229, 140, 140, 0.13);
}


/* =========================================
   NISAB OPTIONS
========================================= */

.nisab-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin-top: 17px;
}

.nisab-option {
    min-height: 95px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: var(--input-bg);
    cursor: pointer;
    transition: 0.2s ease;
}

.nisab-option:has(input:checked) {
    border-color: var(--gold-dark);
    background: rgba(232, 201, 135, 0.075);
}

.nisab-option input {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    accent-color: var(--gold-dark);
    flex-shrink: 0;
}

.nisab-option-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nisab-option-content strong {
    color: var(--white);
    font-size: 11px;
}

.nisab-option-content small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.nisab-check {
    display: none;
}

.nisab-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nisab-value-row span {
    color: var(--muted);
    font-size: 10px;
}

.nisab-value-row strong {
    color: var(--gold);
    font-size: 13px;
    text-align: right;
}


/* =========================================
   CALCULATE BUTTON
========================================= */

.calculate-section {
    margin-top: 28px;
    padding: 25px 20px;
    border: 1px solid rgba(232, 201, 135, 0.2);
    border-radius: 21px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(232, 201, 135, 0.11),
            transparent 45%
        ),
        linear-gradient(145deg, #14283b, #0c1928);
}

.calculate-intro h2 {
    font-size: 26px;
}

.calculate-intro > p {
    margin-bottom: 20px;
}

.calculate-button {
    width: 100%;
    min-height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 19px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(110deg, #f0d69e, #d1ad6e);
    color: #15202b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 22px rgba(190, 151, 83, 0.15);
    transition: 0.2s ease;
}

.calculate-button:active {
    transform: scale(0.985);
    box-shadow: none;
}

.button-arrow {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(7, 19, 33, 0.12);
    font-size: 18px;
}

.calculation-note {
    margin-top: 13px;
    color: var(--muted);
    font-size: 9px;
    text-align: center;
    line-height: 1.7;
}


/* =========================================
   RESULTS
========================================= */

.results-section {
    margin-top: 25px;
    padding: 22px 18px;
    border: 1px solid rgba(232, 201, 135, 0.2);
    border-radius: 21px;
    background: var(--navy-card);
    animation: resultAppear 0.45s ease both;
}

.results-section[hidden] {
    display: none;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    margin-bottom: 18px;
}

.results-header h2 {
    font-size: 27px;
}

.result-main-card {
    padding: 24px 17px;
    border: 1px solid rgba(232, 201, 135, 0.2);
    border-radius: 16px;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(232, 201, 135, 0.17),
            transparent 70%
        ),
        #0b1928;
}

.result-label {
    display: block;
    color: var(--gold-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.result-main-card > strong {
    display: block;
    margin: 12px 0 4px;
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: clamp(27px, 7vw, 38px);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.result-rate {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.result-status {
    display: inline-block;
    margin-top: 16px;
    padding: 7px 13px;
    border: 1px solid rgba(121, 203, 161, 0.18);
    border-radius: 20px;
    background: rgba(121, 203, 161, 0.08);
    color: var(--success);
    font-size: 9px;
    font-weight: 700;
}

.result-breakdown {
    margin-top: 18px;
    padding: 0 3px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row span {
    color: var(--muted);
    font-size: 10px;
}

.breakdown-row strong {
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.reset-button {
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(232, 201, 135, 0.06);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    transition: 0.2s ease;
}

.reset-button:active {
    background: rgba(232, 201, 135, 0.15);
}


/* =========================================
   DISCLAIMER
========================================= */

.disclaimer-section {
    display: flex;
    gap: 13px;
    margin-top: 25px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.disclaimer-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(232, 201, 135, 0.1);
    color: var(--gold);
    font-size: 15px;
}

.disclaimer-section h3 {
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
}

.disclaimer-section p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.9;
}


/* =========================================
   FOOTER
========================================= */

.zakat-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 35px 20px 20px;
    color: var(--muted-dark);
    font-size: 9px;
    text-align: center;
}

.footer-brand {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
}

.footer-arabic {
    margin-top: 5px;
    color: var(--gold-dark);
    font-family: serif;
    font-size: 18px;
}


/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--navy-deep);
}

::-webkit-scrollbar-thumb {
    background: #344457;
    border-radius: 10px;
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (min-width: 650px) {

    .topbar {
        padding: 0 30px;
    }

    .zakat-hero {
        height: 390px;
    }

    .hero-content {
        padding: 45px 40px 30px;
    }

    .calculator-container {
        padding: 35px 35px 0;
    }

    .calculator-card {
        padding: 26px;
    }

    .calculate-section {
        padding: 30px;
    }

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

}

@media (max-width: 380px) {

    .topbar {
        padding: 0 15px;
    }

    .zakat-hero {
        height: 310px;
    }

    .hero-content {
        padding: 25px 19px 20px;
    }

    .calculator-container {
        padding: 25px 13px 0;
    }

    .calculator-card {
        padding: 19px 15px;
        border-radius: 17px;
    }

    .nisab-options {
        gap: 7px;
    }

    .nisab-option {
        padding: 11px 8px;
    }

    .nisab-option-content strong {
        font-size: 10px;
    }

    .rate-note {
        font-size: 8px;
    }

}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}
