/* ==========================================================================
   Tabadolkar training center — site styles (Bootstrap 5 RTL + Vazirmatn)
   Palette follows the workshop poster: navy / cyan glow / amber highlight.
   ========================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("lib/vazirmatn/Vazirmatn-FD-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("lib/vazirmatn/Vazirmatn-FD-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("lib/vazirmatn/Vazirmatn-FD-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("lib/vazirmatn/Vazirmatn-FD-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-navy: #0b1d3a;
    --brand-navy-2: #12305e;
    --brand-blue: #1d4f91;
    --brand-blue-dark: #143a6c;
    --brand-cyan: #22c3ee;
    --brand-amber: #f5a524;
    --brand-muted-bg: #f4f7fb;
    --card-shadow: 0 6px 20px rgba(11, 29, 58, .08);
    --card-shadow-hover: 0 14px 30px rgba(11, 29, 58, .14);
    --bs-font-sans-serif: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-color: #1f2a37;
    --bs-primary: #1d4f91;
    --bs-primary-rgb: 29, 79, 145;
    --bs-link-color: #1d4f91;
    --bs-link-color-rgb: 29, 79, 145;
    --bs-link-hover-color: #143a6c;
    --bs-link-hover-color-rgb: 20, 58, 108;
}

body {
    line-height: 1.9;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.5;
}

h1:focus {
    outline: none;
}

/* ---------- Buttons ---------- */

.btn-primary {
    --bs-btn-bg: var(--brand-blue);
    --bs-btn-border-color: var(--brand-blue);
    --bs-btn-hover-bg: var(--brand-blue-dark);
    --bs-btn-hover-border-color: var(--brand-blue-dark);
    --bs-btn-active-bg: var(--brand-blue-dark);
    --bs-btn-active-border-color: var(--brand-blue-dark);
    --bs-btn-focus-shadow-rgb: 29, 79, 145;
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-blue);
    --bs-btn-border-color: var(--brand-blue);
    --bs-btn-hover-bg: var(--brand-blue);
    --bs-btn-hover-border-color: var(--brand-blue);
    --bs-btn-active-bg: var(--brand-blue-dark);
    --bs-btn-active-border-color: var(--brand-blue-dark);
    --bs-btn-focus-shadow-rgb: 29, 79, 145;
}

.btn-accent {
    --bs-btn-color: #1b1300;
    --bs-btn-bg: var(--brand-amber);
    --bs-btn-border-color: var(--brand-amber);
    --bs-btn-hover-color: #1b1300;
    --bs-btn-hover-bg: #ffb83d;
    --bs-btn-hover-border-color: #ffb83d;
    --bs-btn-active-color: #1b1300;
    --bs-btn-active-bg: #e09412;
    --bs-btn-active-border-color: #e09412;
    --bs-btn-focus-shadow-rgb: 245, 165, 36;
    font-weight: 700;
}

.text-accent {
    color: var(--brand-amber) !important;
}

/* ---------- Header ---------- */

.site-header {
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 6px 18px rgba(11, 29, 58, .06);
}

    .site-header .navbar {
        padding-block: .5rem;
    }

.brand-caption {
    font-weight: 800;
    color: var(--brand-navy);
    border-inline-start: 2px solid #e3e8ef;
    padding-inline-start: .6rem;
    font-size: .95rem;
}

.site-header .nav-link {
    font-weight: 500;
    color: #29384b;
    white-space: nowrap;
}

.site-header .btn {
    white-space: nowrap;
}

    .site-header .nav-link.active,
    .site-header .nav-link:hover,
    .site-header .nav-link:focus {
        color: var(--brand-blue);
    }

@media (min-width: 1200px) {
    .site-header .navbar-nav .nav-link {
        padding-inline: .55rem;
        font-size: .95rem;
    }
}

@media (min-width: 1400px) {
    .site-header .navbar-nav .nav-link {
        padding-inline: .75rem;
        font-size: 1rem;
    }
}

.dropdown-menu {
    border: 0;
    border-radius: .75rem;
    padding: .5rem;
    box-shadow: 0 12px 32px rgba(11, 29, 58, .16);
}

.dropdown-item {
    border-radius: .5rem;
    padding: .45rem .75rem;
    white-space: normal;
}

@media (min-width: 1200px) {
    .dropdown-menu {
        min-width: 22rem;
    }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    color: #fff;
    padding: 4.5rem 0;
    background:
        linear-gradient(120deg, rgba(11, 29, 58, .97), rgba(18, 48, 94, .9)),
        url("images/about/teaching-banner-1.jpg") center / cover no-repeat;
    overflow: hidden;
}

.hero-kicker {
    color: var(--brand-cyan);
    font-weight: 700;
    margin-bottom: .5rem;
}

.hero-title {
    font-size: clamp(1.8rem, 3.6vw, 2.9rem);
    line-height: 1.45;
}

.hero-lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .85);
    max-width: 40rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin: 0;
}

    .hero-stats > div {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
        padding: 1rem .5rem;
        border-radius: 1rem;
        background: rgba(255, 255, 255, .07);
        border: 1px solid rgba(34, 195, 238, .35);
    }

    .hero-stats dt {
        font-weight: 500;
        font-size: .9rem;
        color: rgba(255, 255, 255, .75);
    }

    .hero-stats dd {
        margin: 0;
        font-size: 2rem;
        font-weight: 800;
        color: var(--brand-amber);
    }

/* ---------- Featured course spotlight (home page) ---------- */

.spotlight {
    position: relative;
    color: #fff;
    padding: 4rem 0;
    background:
        radial-gradient(1000px 500px at 85% 0%, rgba(34, 195, 238, .18), transparent 60%),
        radial-gradient(800px 400px at 0% 100%, rgba(245, 165, 36, .12), transparent 60%),
        linear-gradient(160deg, #071327 0%, #0b1d3a 55%, #0e2a52 100%);
    border-block: 1px solid rgba(34, 195, 238, .45);
}

.spotlight-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .9rem;
    border-radius: 999px;
    background: var(--brand-amber);
    color: #1b1300;
    font-weight: 800;
    font-size: .9rem;
    box-shadow: 0 0 0 4px rgba(245, 165, 36, .2);
}

.spotlight-title {
    margin: 1rem 0 .5rem;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #fff;
}

.spotlight-subtitle {
    color: var(--brand-cyan);
    font-weight: 700;
    font-size: 1.15rem;
}

.spotlight-summary {
    color: rgba(255, 255, 255, .82);
}

.spotlight-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: .75rem;
    aspect-ratio: 3 / 2;
}

    .spotlight-gallery:has(> :only-child) {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

.spotlight-photo {
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(34, 195, 238, .45);
    box-shadow: 0 0 24px rgba(34, 195, 238, .18);
}

    .spotlight-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .4s ease;
    }

    .spotlight-photo:hover img {
        transform: scale(1.04);
    }

.spotlight-photo-0 {
    grid-row: 1 / span 2;
}

.spotlight-topics {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(34, 195, 238, .3);
}

    .spotlight-topics h3 {
        color: #fff;
        margin-bottom: 1rem;
    }

.spotlight .topic-list li {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(34, 195, 238, .25);
    color: #fff;
}

/* ---------- Course facts ---------- */

.course-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .75rem;
}

    .course-facts li {
        display: flex;
        gap: .75rem;
        align-items: flex-start;
    }

    .course-facts i {
        font-size: 1.25rem;
        line-height: 1.6;
        color: var(--brand-blue);
    }

.fact-label {
    display: block;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.fact-value {
    display: block;
    font-weight: 700;
}

.course-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
    .course-facts-grid {
        grid-template-columns: 1fr;
    }
}

.course-facts-dark li {
    padding: .65rem .8rem;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(34, 195, 238, .35);
}

.course-facts-dark i {
    color: var(--brand-amber);
}

.course-facts-dark .fact-label {
    color: rgba(255, 255, 255, .65);
}

.course-facts-dark .fact-value {
    color: #fff;
    font-size: .95rem;
}

/* ---------- Topic / feature list ---------- */

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: .6rem;
}

@media (min-width: 768px) {
    .topic-list-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.topic-list li {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .6rem .8rem;
    border: 1px solid #e5eaf1;
    border-radius: .75rem;
    background: #fff;
}

.topic-number {
    flex: 0 0 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: .5rem;
    background: var(--brand-amber);
    color: #1b1300;
    font-weight: 800;
    font-size: .95rem;
}

/* ---------- Sections & cards ---------- */

.section {
    padding: 4rem 0;
}

.section-muted {
    background: var(--brand-muted-bg);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

    .section-heading > a {
        white-space: nowrap;
    }

    .section-heading h2 {
        position: relative;
        margin: 0;
        padding-bottom: .5rem;
    }

        .section-heading h2::after {
            content: "";
            position: absolute;
            bottom: 0;
            inset-inline-start: 0;
            width: 3rem;
            height: 4px;
            border-radius: 2px;
            background: var(--brand-amber);
        }

.course-card,
.product-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .course-card:hover,
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--card-shadow-hover);
    }

    .course-card .card-img-top {
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    .course-card.is-featured {
        outline: 2px solid var(--brand-amber);
    }

.badge-workshop {
    background: #e2f6fc;
    color: #0b6a85;
}

.badge-course {
    background: #e8eef8;
    color: var(--brand-blue);
}

.product-image {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    padding: 1rem;
    background: var(--brand-muted-bg);
}

    .product-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.info-card,
.instructor-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.info-icon {
    display: block;
    margin-bottom: .5rem;
    font-size: 2rem;
    color: var(--brand-blue);
}

.instructor-card {
    display: flex;
    gap: 1rem;
    align-items: center;
}

    .instructor-card > i {
        font-size: 2.5rem;
        color: var(--brand-blue);
    }

.info-panel {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--brand-muted-bg);
    border-inline-start: 4px solid var(--brand-amber);
}

/* ---------- Page header ---------- */

.page-header {
    padding: 2.5rem 0 2rem;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-navy), var(--brand-navy-2));
}

    .page-header .breadcrumb {
        --bs-breadcrumb-divider-color: rgba(255, 255, 255, .5);
        --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .75);
        margin-bottom: .75rem;
        font-size: .9rem;
    }

        .page-header .breadcrumb a {
            color: var(--brand-cyan);
            text-decoration: none;
        }

    .page-header .lead {
        color: rgba(255, 255, 255, .8);
    }

.page-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

/* ---------- Detail pages ---------- */

.detail-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 8px 26px rgba(11, 29, 58, .12);
}

.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 26px rgba(11, 29, 58, .12);
}

.book-cover {
    width: 100%;
    height: auto;
    border-radius: .5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.sidebar-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 8px 26px rgba(11, 29, 58, .1);
}

@media (min-width: 992px) {
    .sidebar-card {
        position: sticky;
        top: 6rem;
    }
}

.sidebar-card dt {
    font-size: .85rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.sidebar-card dd {
    font-weight: 700;
    margin-bottom: .75rem;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: .85rem;
    box-shadow: var(--card-shadow);
}

.poster img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(11, 29, 58, .2);
}

.price {
    font-weight: 800;
    color: var(--brand-blue);
}

.article-link {
    display: flex;
    gap: .75rem;
    align-items: center;
    height: 100%;
    padding: 1rem 1.25rem;
    border-radius: .85rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(11, 29, 58, .07);
    transition: box-shadow .2s ease, color .2s ease;
}

    .article-link i {
        font-size: 1.6rem;
        color: #c62828;
    }

    .article-link:hover {
        color: var(--brand-blue);
        box-shadow: var(--card-shadow-hover);
    }

.video-card {
    margin: 0;
}

    .video-card video {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: .85rem;
        background: #000;
    }

    .video-card figcaption {
        margin-top: .5rem;
        font-weight: 700;
    }

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}

    .contact-list li {
        display: flex;
        gap: 1rem;
        align-items: flex-start;
        padding: 1rem;
        border-radius: .85rem;
        background: #fff;
        box-shadow: var(--card-shadow);
    }

    .contact-list i {
        font-size: 1.4rem;
        color: var(--brand-blue);
    }

.quote {
    padding: .75rem 1rem;
    border-radius: .5rem;
    border-inline-start: 4px solid var(--brand-cyan);
    background: var(--brand-muted-bg);
    font-weight: 500;
}

.form-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 8px 26px rgba(11, 29, 58, .1);
}

/* Honeypot field: kept off-screen for people, visible to naive bots. */
.hp-field {
    position: absolute;
    inset-inline-start: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.thanks-card {
    max-width: 36rem;
    padding: 3rem 1.5rem;
}

    .thanks-card > i {
        font-size: 4rem;
    }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--brand-navy);
    color: rgba(255, 255, 255, .75);
}

    .site-footer a {
        color: rgba(255, 255, 255, .85);
        text-decoration: none;
    }

        .site-footer a:hover {
            color: #fff;
        }

.footer-links li,
.footer-contact li {
    margin-bottom: .5rem;
}

.footer-contact li {
    display: flex;
    gap: .6rem;
}

.footer-contact i {
    color: var(--brand-cyan);
}

.footer-bottom {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .6);
}

/* ---------- Blazor forms & errors ---------- */

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    inset-inline-start: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        inset-inline-end: 0.75rem;
        top: 0.5rem;
    }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #c62828;
    font-size: .875rem;
}

.blazor-error-boundary {
    padding: 1rem;
    color: white;
    background: #b32121;
}

    .blazor-error-boundary::after {
        content: "خطایی رخ داده است.";
    }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Admin panel ---------- */

.admin-header {
    background: linear-gradient(120deg, var(--brand-navy), var(--brand-navy-2));
}

    .admin-header .nav-link.active {
        color: #fff;
        font-weight: 700;
    }

.admin-main {
    min-height: calc(100vh - 64px);
    background: var(--brand-muted-bg);
}

.admin-card {
    border: 0;
    border-radius: .85rem;
    box-shadow: var(--card-shadow);
}

.admin-narrow {
    max-width: 34rem;
}

.login-card {
    max-width: 26rem;
    padding: 2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 26px rgba(11, 29, 58, .12);
}

.stat-chip {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    padding: .35rem .9rem;
    border: 1px solid #dfe5ee;
    border-radius: 999px;
    background: #fff;
    font-size: .95rem;
}

.stat-chip-new {
    border-color: var(--brand-amber);
    background: #fff7e6;
    cursor: pointer;
}

/* QuickGrid pads the last page with empty rows; hide them. */
.admin-grid tbody tr:not([aria-rowindex]) {
    display: none;
}

.admin-grid th {
    white-space: nowrap;
    font-weight: 700;
}

.admin-grid td {
    vertical-align: middle;
}

.message-cell {
    max-width: 22rem;
    white-space: pre-wrap;
}

.status-select {
    min-width: 9.5rem;
    font-weight: 500;
}

.status-new {
    background-color: #fff3cd;
}

.status-contacted {
    background-color: #e2f0fb;
}

.status-completed {
    background-color: #e3f6e8;
}

.status-cancelled {
    background-color: #f1f1f1;
    color: #6c757d;
}
