/**
 * Fitrah Calculator — Original layout, template colours, animations, responsive.
 * No table; horizontal strips with animated borders and background.
 */

/* ========== Fitrana-2026 hero banner (img-based, responsive) ========== */
.breadcrumb-area.hero-section {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow: hidden;
    min-height: 280px;
    padding: 120px 0 90px;
    box-sizing: border-box;
    background: none !important;
}
.breadcrumb-area.hero-section::before {
    display: none !important;
}
.hero-section .hero-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.hero-section .hero-section-bg picture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
    margin: 0;
}
.hero-section .hero-section-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-width: 0;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
}
.hero-section .container {
    position: relative;
    z-index: 1;
}
@media (min-width: 768px) {
    .breadcrumb-area.hero-section {
        min-height: 320px;
        padding: 140px 0 100px;
    }
}
@media (min-width: 992px) {
    .breadcrumb-area.hero-section {
        min-height: 345px;
        padding: 180px 0 125px;
    }
}
/* 14" laptop (e.g. 1366×768, 1280×800): balanced height and padding */
@media (min-width: 1200px) and (max-width: 1440px) {
    .breadcrumb-area.hero-section {
        min-height: 42vh;
        padding: 140px 0 100px;
    }
}
/* Large screens (1441px+): scale with viewport so image stays responsive */
@media (min-width: 1441px) {
    .breadcrumb-area.hero-section {
        min-height: clamp(360px, 38vh, 520px);
        padding: clamp(140px, 12vw, 200px) 0 clamp(100px, 8vw, 140px);
    }
}
@media (max-width: 767px) {
    .breadcrumb-area.hero-section {
        min-height: 380px;
        padding: 140px 0 100px;
    }
}
@media (max-width: 480px) {
    .breadcrumb-area.hero-section {
        min-height: 380px;
        padding: 120px 0 90px;
    }
}

.fitrah-wrap {
    position: relative;
    min-height: 50vh;
    overflow: hidden;
}

.fitrah-container {
    position: relative;
    z-index: 1;
    /* max-width: 900px; */
    margin: 0 auto;
}

/* Currency pills */
.fitrah-region-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fitrah-region-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--thm-black);
}

.fitrah-currency-display {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--thm-base);
    background: var(--thm-color-2);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(17, 100, 102, 0.3);
}


.fitrah-region-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fitrah-pill {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--thm-gray);
    background: var(--thm-base);
    border: 2px solid rgba(38, 177, 181, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.fitrah-pill:hover {
    color: var(--thm-primary);
    border-color: rgba(38, 177, 181, 0.5);
}

.fitrah-pill.active {
    color: var(--thm-base);
    background: var(--thm-color-2);
    border-color: var(--thm-color-2);
    box-shadow: 0 4px 16px rgba(17, 100, 102, 0.3);
}

.fitrah-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 177, 181, 0.35);
}

.fitrah-hint {
    color: var(--thm-gray);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
    max-width: 520px;
}

/* About Fitrah section: explanation + hadith */
.fitrah-about-section {
    margin-bottom: 2.5rem;
    margin-left: auto;
    margin-right: auto;
}

.fitrah-about-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--thm-base);
    box-shadow:
        0 4px 12px rgba(34, 34, 34, 0.06),
        0 12px 32px rgba(17, 100, 102, 0.1),
        0 0 0 1px rgba(38, 177, 181, 0.08);
    opacity: 0;
    animation: fitrahAboutIn 0.8s cubic-bezier(0.34, 1.2, 0.64, 1) 0.15s forwards;
}

@keyframes fitrahAboutIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fitrah-about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--thm-primary), var(--thm-color-2));
    animation: fitrahAboutLine 2.5s ease-in-out infinite;
}

@keyframes fitrahAboutLine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.fitrah-about-content {
    padding: 1.75rem 1.75rem 1.25rem;
}

.fitrah-about-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fitrah-about-icon-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(38, 177, 181, 0.18) 0%, rgba(17, 100, 102, 0.12) 100%);
    color: var(--thm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.fitrah-about-card:hover .fitrah-about-icon-wrap {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 8px 24px rgba(17, 100, 102, 0.2);
}

.fitrah-about-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--thm-color-2);
    margin: 0;
    letter-spacing: 0.02em;
}

.fitrah-about-text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--thm-gray);
    margin: 0;
}

.fitrah-about-text strong {
    color: var(--thm-black);
}

.fitrah-about-divider {
    height: 1px;
    margin: 0 1.75rem;
    background: linear-gradient(90deg, transparent, rgba(38, 177, 181, 0.35), transparent);
    flex-shrink: 0;
}

.fitrah-hadith-block {
    margin: 0;
    padding: 1.25rem 1.75rem 1.75rem;
    background: linear-gradient(180deg, rgba(38, 177, 181, 0.06) 0%, rgba(17, 100, 102, 0.04) 100%);
    border-left: 4px solid var(--thm-primary);
    position: relative;
}

.fitrah-hadith-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--thm-base);
    background: var(--thm-color-2);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.fitrah-hadith-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--thm-black);
    margin: 0 0 0.75rem 0;
    font-style: italic;
}

.fitrah-hadith-text .fitrah-peace {
    font-style: normal;
}

.fitrah-hadith-source {
    display: block;
    font-size: 0.85rem;
    color: var(--thm-gray);
    font-style: normal;
}

.fitrah-hadith-source .fitrah-peace {
    font-style: normal;
}

/* List of commodity rows — horizontal strips, not table */
.fitrah-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fitrah-item {
    --i: 0;
    opacity: 0;
    animation: fitrahItemIn 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
    animation-delay: calc(var(--i) * 90ms);
}

@keyframes fitrahItemIn {
    from {
        opacity: 0;
        transform: translateX(-20px) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Animated border wrapper */
.fitrah-item-border {
    position: relative;
    border-radius: 18px;
    padding: 3px;
    overflow: hidden;
}

/* Card border: snake-style gradient — bright segment travels around the edge (no rotation) */
@property --snake-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.fitrah-item-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 3px;
    --snake-angle: 0deg;
    background: conic-gradient(
        from var(--snake-angle),
        var(--thm-color-2) 0deg 300deg,
        var(--thm-primary) 300deg 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: fitrahSnakeBorder 3s linear infinite;
}

.fitrah-item:hover .fitrah-item-border::before {
    animation-duration: 2s;
}

@keyframes fitrahSnakeBorder {
    to { --snake-angle: 360deg; }
}

/* Cards with box shadow */
.fitrah-item-inner {
    position: relative;
    z-index: 1;
    margin: 3px;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    background: var(--thm-base);
    box-shadow:
        0 2px 4px rgba(34, 34, 34, 0.04),
        0 6px 16px rgba(34, 34, 34, 0.06),
        0 0 0 1px rgba(38, 177, 181, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: box-shadow 0.3s ease;
    min-height: 80px;
}

.fitrah-item:hover .fitrah-item-inner {
    box-shadow:
        0 4px 8px rgba(34, 34, 34, 0.06),
        0 12px 28px rgba(17, 100, 102, 0.12),
        0 0 0 1px rgba(38, 177, 181, 0.12);
}

/* Left: icon + labels */
.fitrah-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.fitrah-item-icon {
    position: relative;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(38, 177, 181, 0.15) 0%, rgba(17, 100, 102, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.3s ease;
    overflow: hidden;
}

.fitrah-item-icon-img {
    display: block;
    width: 32px;
    height: 32px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.fitrah-item:hover .fitrah-item-icon {
    transform: scale(1.08) rotate(-4deg);
    background: linear-gradient(135deg, rgba(38, 177, 181, 0.22) 0%, rgba(17, 100, 102, 0.15) 100%);
}

.fitrah-item-labels {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.fitrah-item-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--thm-base);
    background: var(--thm-primary);
    border-radius: 4px;
    padding: 0.1rem 0.5rem;
    margin-bottom: 0.25rem;
    width: fit-content;
    line-height: 1.6;
}

.fitrah-item-ur {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--thm-gray);
    direction: rtl;
    unicode-bidi: embed;
    text-align: left;
    line-height: 1.3;
}

.fitrah-item-en {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--thm-color-2);
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin: 0;
}

/* Right: inputs */
.fitrah-item-right {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

.fitrah-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.fitrah-input-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--thm-gray);
    white-space: nowrap;
    text-align: center;
}

.fitrah-input {
    width: 5.5rem;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--thm-black);
    background: var(--thm-base);
    border: 2px solid rgba(38, 177, 181, 0.22);
    border-radius: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.fitrah-input:focus {
    outline: none;
    border-color: var(--thm-primary);
    box-shadow: 0 0 0 4px rgba(38, 177, 181, 0.18);
}

.fitrah-input:hover {
    border-color: rgba(38, 177, 181, 0.45);
}

.fitrah-input::placeholder {
    color: var(--thm-gray);
    opacity: 0.7;
}

.fitrah-input[readonly] {
    background: rgba(38, 177, 181, 0.05);
    color: var(--thm-color-2);
    cursor: not-allowed;
    border-color: rgba(38, 177, 181, 0.15);
}

/* Totals block */
.fitrah-totals {
    max-width: 520px;
    margin: 0 auto;
    opacity: 0;
    animation: fitrahTotalsIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) 0.35s forwards;
}

@keyframes fitrahTotalsIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fitrah-totals-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(135deg, var(--thm-color-2) 0%, #0d5254 100%);
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 10px 36px rgba(17, 100, 102, 0.28);
}

.fitrah-total-box {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
}

.fitrah-total-box:first-child {
    border-right: 1px solid rgba(255,255,255,0.2);
}

.fitrah-total-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.4rem;
}

.fitrah-total-num {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--thm-base);
    transition: transform 0.2s ease;
}

.fitrah-totals:hover .fitrah-total-num {
    transform: scale(1.03);
}

.fitrah-pay-wrap {
    width: 100%;
    margin-top: 1.25rem;
    text-align: center;
}

.fitrah-pay-btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--thm-base);
    background: var(--thm-primary);
    border: none;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(38, 177, 181, 0.35);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.fitrah-pay-btn:hover {
    background: var(--thm-color-2);
    color: var(--thm-base);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 100, 102, 0.4);
}

.fitrah-pay-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 177, 181, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .fitrah-about-section {
        margin-bottom: 2rem;
    }
    .fitrah-about-content,
    .fitrah-hadith-block {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .fitrah-about-divider {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
    .fitrah-about-heading {
        font-size: 1.2rem;
    }
    .fitrah-about-text,
    .fitrah-hadith-text {
        font-size: 0.98rem;
    }
    .fitrah-region-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .fitrah-item-inner {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
        gap: 1rem;
    }
    .fitrah-item-left {
        flex: 1 1 100%;
    }
    .fitrah-item-right {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-end;
    }
    .fitrah-totals-inner {
        flex-direction: column;
        padding: 1.25rem;
    }
    .fitrah-total-box:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding-bottom: 1rem;
    }
    .fitrah-total-num {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .fitrah-about-content,
    .fitrah-hadith-block {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .fitrah-about-divider {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    .fitrah-about-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    .fitrah-item-inner {
        padding: 0.85rem 1rem;
    }
    .fitrah-input {
        width: 4.5rem;
        padding: 0.5rem 0.6rem;
        font-size: 0.95rem;
    }
    .fitrah-item-en {
        font-size: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fitrah-about-card,
    .fitrah-about-card::before {
        animation: none;
    }
    .fitrah-about-card {
        opacity: 1;
    }
    .fitrah-about-icon-wrap {
        transition: none;
    }
    .fitrah-item-border::before {
        animation: none;
    }
    .fitrah-item {
        animation: none;
        opacity: 1;
    }
    .fitrah-totals {
        animation: none;
        opacity: 1;
    }
    .fitrah-item-inner,
    .fitrah-item-icon,
    .fitrah-total-num {
        transition: none;
    }
}
