:root {
    --brand-primary: #4e61d3;
    --brand-secondary: #1f2a5a;
    --brand-accent: #f4c430;
    --surface: #ffffff;
    --surface-muted: #f7f9ff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --shadow-soft: 0 18px 36px -20px rgba(31, 41, 55, 0.35);
}

html,
body {
    font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(180deg, #fafdff 0%, #fff9ed 100%);
    color: var(--text-primary);
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

a {
    color: var(--brand-primary);
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--brand-secondary);
}

.navbar {
    background: rgba(235, 238, 245, 0.95);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(78, 97, 211, 0.18);
    box-shadow: 0 12px 34px -26px rgba(78, 97, 211, 0.7);
    position: relative;
    z-index: 3000; /* ensure dropdowns overlay sticky sidebars/filters */
}

.navbar-brand {
    font-weight: 700;
    color: var(--brand-secondary) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.navbar-brand span {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.75rem 1rem;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    bottom: 0.35rem;
    right: 1rem;
    transition: width 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--brand-secondary);
}

.navbar-nav .nav-link.active {
    color: var(--brand-primary);
}

.navbar-nav .nav-link.active::after {
    width: calc(100% - 2rem);
}

.dropdown-menu {
    border-radius: 0.75rem;
    border: 1px solid rgba(78, 97, 211, 0.12);
    box-shadow: 0 22px 45px -28px rgba(31, 41, 55, 0.4);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(78, 97, 211, 0.08);
}

main.app-content {
    flex: 1;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-heading {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--brand-secondary);
}

.section-heading::before {
    content: '';
    display: inline-block;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.lead-text {
    color: var(--text-secondary);
    max-width: 720px;
    line-height: 1.7;
}

@media (max-width: 991.98px) {
    .lead-text {
        max-width: 100%;
    }
}

.card {
    border: none;
    border-radius: 1rem;
    background-color: var(--surface);
    box-shadow: var(--shadow-soft);
}

.blog-post-card {
    background: #d9dee5;
}

.card-header {
    border-bottom: none;
    background-color: rgba(78, 97, 211, 0.05);
    border-radius: 1rem 1rem 0 0 !important;
    padding: 1.5rem 1.75rem;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)) !important;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-body {
    padding: 1.75rem;
}

.list-group-item {
    background-color: #d9dee5;
}

.bg-light {
    background-color: #d9dee5 !important;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    color: var(--brand-secondary);
    border-bottom-width: 1px;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 97, 211, 0.04);
}

.table-responsive {
    border-radius: 0 0 1rem 1rem;
    overflow: hidden;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff !important;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 2.25rem;
    font-weight: 600;
    box-shadow: 0 16px 32px -16px rgba(78, 97, 211, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-brand:hover,
.btn-brand:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px -20px rgba(31, 41, 55, 0.55);
}

.btn-outline-brand {
    border-radius: 999px;
    padding: 0.65rem 1.9rem;
    font-weight: 600;
    color: var(--brand-primary);
    border: 2px solid rgba(78, 97, 211, 0.45);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    background: rgba(78, 97, 211, 0.08);
    border-color: var(--brand-primary);
    color: var(--brand-secondary);
}

.hero-carousel {
    box-shadow: 0 32px 60px -35px rgba(31, 41, 55, 0.4);
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-carousel .carousel-item {
    height: 430px;
}

.hero-carousel .carousel-item img {
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(31, 39, 89, 0.75) 0%, rgba(31, 39, 89, 0.35) 55%, rgba(31, 39, 89, 0) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: clamp(1.5rem, 4vw, 4rem);
}

.carousel-caption-custom {
    max-width: 520px;
    text-align: center;
}

.carousel-caption-custom h2 {
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1rem;
}

.carousel-caption-custom p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 1.1rem;
    background-size: 60%;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
}

.carousel-indicators .active {
    background-color: #fff;
    width: 28px;
}

/* Section Spacing and Organization */
.hero-section {
    margin-bottom: 4rem;
}

.section-wrapper {
    background-color: var(--surface);
    border-radius: 1.5rem;
    padding: clamp(2rem, 5vw, 3rem);
    box-shadow: var(--shadow-soft);
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 2rem;
}

.services-section {
    padding: 2rem 0;
}

.staff-section,
.staff-actions-section {
    padding: 1.5rem 0;
}

.staff-actions-section .btn {
    border-radius: 0.75rem;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
}

.staff-actions-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.staff-actions-section .btn-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.staff-actions-section .btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.staff-actions-section .btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

.staff-actions-section .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.stat-card {
    background: linear-gradient(135deg, rgba(78, 97, 211, 0.12), rgba(78, 97, 211, 0.0));
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: 0 18px 32px -28px rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(78, 97, 211, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 40px -24px rgba(31, 41, 55, 0.6);
}

.stat-card--featured {
    background: linear-gradient(135deg, rgba(78, 97, 211, 0.18), rgba(78, 97, 211, 0.06));
    border: 1px solid rgba(78, 97, 211, 0.2);
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 40px -24px rgba(78, 97, 211, 0.4);
}

.stat-card--featured:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 48px -20px rgba(78, 97, 211, 0.5);
}

.stat-card .stat-value {
    font-size: clamp(2.2rem, 5vw, 2.9rem);
    font-weight: 800;
    color: var(--brand-primary);
    display: block;
    margin-bottom: 0.35rem;
}

.stat-card--featured .stat-value {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-card--featured .stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-box {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    min-height: 360px;
    background: var(--surface);
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0.5rem;
}

.service-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 56px -34px rgba(31, 41, 55, 0.55);
}

.service-box-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(120%);
    transform: scale(1.04);
}

.service-box-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 27, 67, 0.15) 0%, rgba(19, 27, 67, 0.75) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.service-box-content {
    margin-bottom: 1.5rem;
}

.service-box-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service-box-content p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0;
}

.service-box-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.service-box-footer a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.service-box-footer a.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.service-box-footer a.disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.2);
}

.alert {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-soft);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
}

.alert.rounded-3 {
    border-radius: 1rem !important;
}

.alert.alert-dismissible {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-inline-start: 1.5rem;
    padding-inline-end: 1.5rem;
}

.alert-dismissible .btn-close {
    position: static;
    float: none;
    margin: 0;
    padding: 0.25rem;
    flex-shrink: 0;
}

.alert-dismissible .alert-message {
    flex: 1;
}

.alert-light {
    background: rgba(255, 255, 255, 0.75);
}

.jalali-date {
    cursor: pointer;
}

.jalali-date:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.persian-digits,
.number,
.price,
.count,
.duration {
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

footer.site-footer {
    background: linear-gradient(135deg, #1f1c3a 0%, #4e61d3 55%, #6f83ff 100%);
    color: rgba(255, 255, 255, 0.92);
    margin-top: 4rem;
    padding: 3rem 0 2.25rem;
}

footer.site-footer .footer-heading {
    font-weight: 700;
    margin-bottom: 1rem;
}

footer.site-footer p,
footer.site-footer a {
    color: rgba(255, 255, 255, 0.82);
}

footer.site-footer a:hover {
    color: #fff;
}

footer.site-footer .social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
}

footer.site-footer .footer-divider {
    border-color: rgba(255, 255, 255, 0.22);
    opacity: 1;
}

@media (max-width: 991.98px) {
    .hero-section {
        margin-bottom: 3rem;
    }

    .section-wrapper {
        margin-bottom: 2rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .navbar-nav .nav-link {
        padding-inline: 0.75rem;
    }

    .carousel-overlay {
        justify-content: center;
        text-align: center;
        padding-inline: 1.5rem;
    }

    .carousel-caption-custom {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        margin-bottom: 2.5rem;
    }

    .hero-carousel .carousel-item {
        height: 360px;
    }

    .section-wrapper {
        padding: 1.75rem;
    }

    .section-header {
        margin-bottom: 1.25rem;
    }

    .services-section {
        padding: 1.5rem 0;
    }

    .service-box {
        min-height: 300px;
        margin-bottom: 1rem;
    }

    .staff-section,
    .staff-actions-section {
        padding: 1rem 0;
    }

    footer.site-footer {
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        margin-bottom: 2rem;
    }

    .hero-carousel .carousel-item {
        height: 290px;
    }

    .carousel-caption-custom h2 {
        font-size: 1.7rem;
    }

    .carousel-caption-custom p {
        font-size: 1rem;
    }

    .section-wrapper {
        padding: 1.5rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

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

    .service-box {
        min-height: 280px;
    }
}

