:root {
    --irfnc-red: #b81414;
    --irfnc-red-dark: #8f0f0f;
    --irfnc-ink: #15171d;
    --irfnc-muted: #647084;
    --irfnc-soft: #f6f7f9;
    --irfnc-border: #e8ebf0;
    --irfnc-radius: 22px;
    --irfnc-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

.site-body {
    background: #fff;
    color: var(--irfnc-ink);
}

a {
    text-decoration: none;
}

.section-space {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 2.1rem;
}

.section-kicker {
    display: inline-flex;
    color: var(--irfnc-red);
    background: rgba(184, 20, 20, 0.065);
    border: 1px solid rgba(184, 20, 20, 0.13);
    border-radius: 999px;
    padding: 0.34rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 850;
    margin-bottom: 0.65rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
    font-weight: 950;
    letter-spacing: -0.025em;
}

.section-subtitle {
    margin: 0.65rem 0 0;
    color: var(--irfnc-muted);
    line-height: 1.85;
    font-size: 1rem;
}

/* HERO */
.hero-section {
    background: linear-gradient(180deg, #fff 0%, #f8f9fb 100%);
    padding-top: 1.75rem !important;
    padding-bottom: 2rem !important;
}

.hero-carousel {
    border-radius: 24px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.hero-slide {
    min-height: 0;
    aspect-ratio: 2.2 / 1;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2.1rem;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(184, 20, 20, 0.34), transparent 32%),
        linear-gradient(270deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    max-width: 520px;
    padding: 0.4rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--irfnc-red);
    padding: 0.48rem 0.86rem;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.82rem;
}

.hero-title {
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 950;
    line-height: 1.33;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.42);
}

.hero-subtitle {
    max-width: 470px;
    font-size: clamp(0.95rem, 1.15vw, 1.08rem);
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.90);
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}

.hero-btn {
    background: var(--irfnc-red);
    color: #fff;
    border: 0;
    padding: 0.72rem 1.45rem;
    border-radius: 999px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(184, 20, 20, 0.32);
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-btn:hover,
.hero-btn:focus {
    color: #fff;
    background: var(--irfnc-red-dark);
    transform: translateY(-2px);
}

.hero-control {
    width: 42px;
    height: 42px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 0.8rem;
    background: rgba(0, 0, 0, 0.38);
    border-radius: 50%;
    opacity: 1;
}

.hero-control:hover,
.hero-control:focus {
    background: rgba(184, 20, 20, 0.88);
}

.hero-indicators {
    margin-bottom: 0.85rem;
}

.hero-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background-color: #fff;
    opacity: 0.55;
}

.hero-indicators .active {
    width: 24px;
    opacity: 1;
    background-color: var(--irfnc-red);
}

/* COMMON CARDS */
.portal-card,
.feature-card,
.compact-card,
.federation-card,
.stat-card {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid var(--irfnc-border);
    border-radius: var(--irfnc-radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
    color: var(--irfnc-ink);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.portal-card:hover,
.feature-card:hover,
.compact-card:hover,
.federation-card:hover {
    color: var(--irfnc-ink);
    transform: translateY(-4px);
    border-color: rgba(184, 20, 20, 0.24);
    box-shadow: var(--irfnc-shadow);
}

/* LOGIN PORTALS */
#login-portals {
    padding-top: 4.2rem;
}

.portal-card {
    position: relative;
    text-align: right;
    padding: 1.25rem;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
}

.portal-card::after {
    content: "";
    position: absolute;
    left: -40px;
    bottom: -40px;
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(184, 20, 20, 0.09), transparent 68%);
    pointer-events: none;
}

.portal-icon-box {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    margin-bottom: 1rem;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(184, 20, 20, 0.055), rgba(15, 23, 42, 0.025));
    border: 1px solid rgba(184, 20, 20, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 25px rgba(15, 23, 42, 0.06);
}

.portal-icon {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.portal-fallback-icon {
    font-size: 2rem;
    line-height: 1;
}

.portal-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 950;
    margin-bottom: 0.45rem;
}

.portal-text {
    display: block;
    color: var(--irfnc-muted);
    line-height: 1.75;
    font-size: 0.94rem;
}

.portal-card-disabled {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.portal-icon-box-disabled {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), rgba(245, 158, 11, 0.03));
    border-color: rgba(245, 158, 11, 0.22);
}

.badge-coming {
    display: inline-flex;
    width: fit-content;
    background: #fff3cd;
    color: #946200;
    border: 1px solid #ffe08a;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 900;
    margin-bottom: 0.55rem;
}

/* STATS */
.stats-section {
    background: #f3f5f8;
    padding-top: 3.2rem;
    padding-bottom: 3.2rem;
}

.stat-card {
    padding: 1.35rem 1rem;
    min-height: 122px;
}

.stat-card strong {
    display: block;
    color: var(--irfnc-red);
    font-size: clamp(1.65rem, 2.8vw, 2.2rem);
    font-weight: 950;
    line-height: 1.1;
    margin-bottom: 0.45rem;
}

.stat-card span {
    color: var(--irfnc-muted);
    font-weight: 750;
}

/* FEATURE SECTIONS */
.feature-card,
.federation-card {
    overflow: hidden;
}

.feature-image,
.federation-image {
    min-height: 235px;
    background-image:
        linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.07)),
        var(--feature-image);
    background-size: cover;
    background-position: center;
}

.feature-card-large .feature-image {
    min-height: 285px;
}

.feature-body {
    padding: 1.25rem 1.35rem;
}

.feature-body h4,
.feature-body h5,
.compact-card h5,
.federation-body h3 {
    font-weight: 950;
}

.feature-body p,
.compact-card p,
.federation-body p {
    color: var(--irfnc-muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.compact-card {
    padding: 1.35rem;
    min-height: 104px;
}

.federation-image {
    min-height: 285px;
}

.federation-body {
    padding: 2.25rem;
}

@media (max-width: 991.98px) {
    .section-space {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-slide {
        min-height: 0;
        aspect-ratio: 2.2 / 1;  
        padding: 1.75rem;
    }

    .portal-card {
        min-height: 178px;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding-top: 0.85rem !important;
        padding-bottom: 1.1rem !important;
    }

    .hero-carousel {
        border-radius: 18px;
    }

    .hero-slide {
        min-height: 0;
        aspect-ratio: 2.2 / 1;
        padding: 1.15rem;
        background-position: center;
    }

    .hero-overlay {
        background: linear-gradient(270deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.40));
    }

    .hero-badge {
        font-size: 0.76rem;
        padding: 0.38rem 0.68rem;
    }

    .hero-title {
        font-size: 1.45rem;
        margin-bottom: 0.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.88rem;
        line-height: 1.7;
        margin-bottom: 0.8rem !important;
    }

    .hero-btn {
        padding: 0.58rem 1.05rem;
        font-size: 0.9rem;
    }

    .hero-control {
        display: none;
    }

    .section-head {
        margin-bottom: 1.45rem;
    }

    #login-portals {
        padding-top: 2.7rem;
    }

    .portal-card {
        min-height: auto;
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        gap: 0.85rem;
    }

    .portal-icon-box {
        width: 64px;
        height: 64px;
        margin-bottom: 0;
        flex: 0 0 64px;
        border-radius: 18px;
    }

    .portal-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }

    .portal-label {
        margin-bottom: 0.2rem;
        font-size: 1.05rem;
    }

    .portal-text {
        font-size: 0.86rem;
        line-height: 1.55;
    }

    .portal-card .badge-coming {
        position: absolute;
        left: 1rem;
        top: 1rem;
        margin: 0;
    }

    .feature-card-large .feature-image,
    .feature-image,
    .federation-image {
        min-height: 205px;
    }

    .federation-body {
        padding: 1.35rem;
    }
}

/* ── Body font ─────────────────────────────────────────── */
body,
.site-body {
    font-family: Vazirmatn, sans-serif;
}

/* ── federation-image: uses same CSS-var pattern as feature-image ── */
.federation-image {
    background-image:
        linear-gradient(0deg, rgba(0,0,0,.38), rgba(0,0,0,.10)),
        var(--feature-image);
    background-size: cover;
    background-position: center;
    min-height: 285px;
}

/* ── FontAwesome shop fallback icon ───────────────────── */
@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fontawesome-webfont.woff2') format('woff2'),
         url('../fonts/fontawesome-webfont.woff')  format('woff'),
         url('../fonts/fontawesome-webfont.ttf')   format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.portal-fallback-icon {
    font-family: 'FontAwesome';
    font-size: 2.2rem;
    color: #f59e0b;
    line-height: 1;
}
