/*
 * صفحه اصلی — تم قهوه‌ای با رنگ مکمل
 * هدف: جایگزینی آبی پیشفرض بوت‌استرپ، بهبود UI/UX
 */

/* IranYekan font — sitewide */
@font-face {
    font-family: 'IranYekan';
    src: url('/fonts/IranYekan.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* پالت جدید نزدیک به lawin.co — سرمه‌ای/فیروزه‌ای مینیمال */
    --color-brown: #0b3b69;
    /* جایگزین: سرمه‌ای برند */
    --color-teal: #0ea5a5;
    /* فیروزه‌ای نرم برای تأکید */
    --color-sand: #f8fafc;
    /* پس‌زمینه‌های بسیار روشن */
    --color-ink: #0b132b;
    /* متن اصلی با کنتراست مناسب */
    --color-muted: #6c757d;
    /* متن ملایم */
    --color-success: #3BAA54;
    --color-warning: #D08A00;
    --color-danger: #C0392B;
    --brand-green: #0b3b69;
    /* سرمه‌ای برند (navy) */

    /* Override Bootstrap core palette */
    --bs-primary: var(--brand-green);
    --bs-secondary: var(--color-teal);
    --bs-info: var(--color-teal);
    --bs-link-color: var(--color-teal);
    --bs-btn-border-radius: 0.5rem;
}

html[dir="rtl"] body {
    font-family: 'IranYekan' !important;
    color: var(--color-ink);
}

/* Ensure Tailwind/utility classes don't override the site font */
.font-sans,
body,
html {
    font-family: 'IranYekan' !important;
}

/* Links */
a.link-primary,
.link-primary {
    color: var(--color-teal) !important;
}

a.link-primary:hover,
.link-primary:hover {
    color: #078a8a !important;
}

/* Tighter buttons globally */
.btn {
    padding: 0.48rem 0.9rem;
    font-weight: 600;
}

.btn-lg {
    padding: 0.62rem 1.1rem;
    font-size: 1rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0c2f25 !important;
    border-color: #0c2f25 !important;
}

.btn-outline-secondary {
    color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
}

.btn-outline-secondary:hover {
    color: #fff !important;
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
}

/* Remove Bootstrap blue tones for outlines */
.btn-outline-primary {
    color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
}

.btn-outline-primary:hover {
    color: #fff !important;
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
}

.btn-accent {
    color: #fff;
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.btn-accent:hover {
    background-color: #0c2f25;
    border-color: #0c2f25;
}

.btn-soft {
    color: var(--brand-green);
    background-color: rgba(11, 59, 105, 0.08);
    border-color: rgba(11, 59, 105, 0.12);
}

.btn-soft:hover {
    background-color: rgba(11, 59, 105, 0.14);
}

/* Text helpers */
.text-primary {
    color: var(--brand-green) !important;
}

.text-accent {
    color: var(--color-teal) !important;
}

.text-muted {
    color: var(--color-muted) !important;
}

/* Background helpers */
.bg-primary {
    background-color: var(--brand-green) !important;
}

.bg-accent {
    background-color: var(--color-teal) !important;
}

.bg-sand {
    background-color: var(--color-sand) !important;
}

.bg-soft-brown {
    background-color: rgba(11, 59, 105, 0.06) !important;
}

/* Inputs — remove default blue borders and focus ring */
.form-control,
.form-select {
    border-color: rgba(93, 64, 55, 0.25);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 0.25rem rgba(27, 154, 170, 0.25);
}

/* Navbar toggler and active nav-link */
.navbar-light .navbar-toggler {
    border-color: rgba(27, 154, 170, 0.35);
}
.nav-link{
    font-size: calc(10px + 0.3vw) !important;
}
.nav-link.active,
.nav-link:focus {
    color: var(--color-teal) !important;
}

/* Brand navbar — sitewide (navy palette) */
.site-navbar {
    background-color: var(--brand-green) !important;
    border-bottom: none !important;
}

.site-navbar.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1040;
}

.site-navbar.fixed-top {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 1050;
}

.site-navbar.fixed-top+main.container {
    padding-top: 72px;
}

@media (max-width: 576px) {
    .site-navbar.fixed-top+main.container {
        padding-top: 64px;
    }
}

.site-navbar .navbar-brand {
    color: #fff !important;
}

.site-navbar .navbar-brand .fa-solid {
    color: #fff !important;
}

.site-navbar .navbar-brand img {
    height: 36px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.site-navbar .nav-link {
    color: #e6e6e6 !important;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
    color: #fff !important;
}

.site-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Force solid white hamburger icon (reliable across devices) */
.site-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 576px) {
    .site-navbar .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.55) !important;
    }

    .site-navbar .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}

/* Hero section — مینیمال با سرمه‌ای و فیروزه‌ای لطیف */
.hero {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(11, 59, 105, 0.98), rgba(11, 59, 105, 0.92));
}

.hero .overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(1200px 600px at 100% 0%, rgba(14, 165, 165, 0.12), transparent 70%),
        radial-gradient(600px 300px at 20% 40%, rgba(14, 165, 165, 0.10), transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 1rem 2rem;
    text-align: center;
}

.hero-title {
    color: #fff;
    letter-spacing: 0.6px;
}

.hero-title {
    font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2.3rem);
}

.hero-subtitle {
    color: #e9eef5;
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-cta .btn {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

/* Section titles */
.section-title {
    font-weight: 800;
    letter-spacing: 0.4px;
}

.section-subtitle {
    color: var(--color-muted);
}

.section-divider {
    width: 80px;
    height: 4px;
    border-radius: 999px;
    background-color: var(--color-teal);
    margin: 0.5rem auto 0;
}

/* Cards */
.card.shadow-soft {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border: none;
}

.service-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(14, 165, 165, 0.12);
    color: var(--color-teal);
}

.service-card:hover {
    transform: translateY(-2px);
    transition: transform 160ms ease;
}

/* Stats */
.stat-card {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 800;
}

.stat-card .label {
    color: var(--color-muted);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0 1rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(14, 165, 165, 0.6), rgba(14, 165, 165, 0.2));
    border-radius: 8px;
}

.timeline-step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    justify-items: center;
    text-align: center;
    padding: 1rem 0;
}

.timeline-step .dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-teal);
    border: 3px solid #fff;
    box-shadow: 0 0 0 6px rgba(27, 154, 170, 0.12);
}

/* Testimonials */
.testimonial-card {
    border: none;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.testimonial-card .stars {
    color: #F59E0B;
}

/* Amber */
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-sand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
}

.faq-question {
    font-weight: 700;
}

.faq-answer {
    color: var(--color-muted);
}

/* Pricing */
.pricing-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-brown);
}

.pricing-card .features li {
    color: var(--color-ink);
}

/* CTA */
.cta {
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(11, 59, 105, 0.96), rgba(14, 165, 165, 0.85));
    color: #fff;
}

.cta .btn {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

/* Brands */
.brand-strip img {
    filter: grayscale(0.15) contrast(0.98);
    opacity: 0.9;
}

.brand-strip img:hover {
    filter: grayscale(0) contrast(1);
    opacity: 1;
}

/* Footer — global style aligned to brand navy */
.site-footer {
    background-color: var(--brand-green);
    color: #fff;
}

.site-footer a {
    color: #e6e6e6;
}

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

/* Footer height: keep compact, remove forced tall band */
.site-footer {
    --nav-h: 56px;
}

.site-footer .container {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

@media (min-width: 576px) {
    .site-footer {
        --nav-h: 64px;
    }

    .site-footer .container {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* Micro-interactions */
.hover-lift {
    transition: transform 180ms ease, box-shadow 200ms ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

/* Utility spacers for dense homepage */
.spacer-sm {
    height: 0.75rem;
}

.spacer-md {
    height: 1.25rem;
}

.spacer-lg {
    height: 2rem;
}

/* Floating chat button */
.floating-chat {
    position: fixed;
    inset-inline-end: 1rem;
    inset-block-end: 1rem;
    z-index: 1050;
}

.floating-chat .btn {
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

/* Floating chat panel */
.floating-chat-panel {
    position: fixed;
    inset-inline-end: 1rem;
    inset-block-end: 4.5rem;
    width: min(360px, 92vw);
    min-height: 300px;
    z-index: 1060;
    border-radius: 0.9rem;
}

.floating-chat-panel {
    display: flex;
    flex-direction: column;
}

.floating-chat-panel .card-body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

#fcMessages {
    min-height: 180px;
    max-height: 50vh;
    overflow: auto;
}

.floating-chat-panel .card-header {
    padding: .5rem .75rem;
    background: var(--brand-green);
    color: #fff;
    border-top-left-radius: .9rem;
    border-top-right-radius: .9rem;
}

.floating-chat-panel .card-body {
    padding: .75rem;
    background: #fff;
}

.floating-chat-panel .btn-light {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    border: none;
}

.floating-chat-panel .btn-light:hover {
    background: rgba(255, 255, 255, .35);
    color: #fff;
}

/* Floating chat typing indicator */
.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}

.typing .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #6c757d;
    opacity: .3;
    animation: blink 1s infinite;
}

.typing .dot:nth-child(2) {
    animation-delay: .2s;
}

.typing .dot:nth-child(3) {
    animation-delay: .4s;
}

@keyframes blink {
    0% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: .3;
    }
}

@media (min-width: 768px) {
    .hero-content {
        padding: 4rem 2rem 3rem;
    }
}

/* Mobile-first compact hero spacing and responsive titles */
@media (max-width: 576px) {
    .hero-content {
        padding: 1.25rem 0.75rem 1rem;
    }

    .hero {
        margin-bottom: 0.75rem;
    }

    .hero-title {
        font-size: calc(1.25rem + 1vw);
        line-height: 1.35;
    }

    .hero-subtitle {
        font-size: calc(0.95rem + 0.35vw);
        line-height: 1.6;
    }

    .section-title {
        font-size: calc(1rem + 0.7vw);
    }

    .section-subtitle {
        font-size: calc(0.85rem + 0.35vw);
    }
}

/* Tables and badges color alignment */
.table thead th {
    border-bottom-color: rgba(93, 64, 55, 0.2);
}

.badge.bg-info {
    background-color: var(--color-teal) !important;
}

.badge.bg-primary {
    background-color: var(--color-brown) !important;
}

/* --- Shared list/card UI for Requests & QnA --- */
.list-card {
    border: none;
    border-radius: 0.9rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.list-card .card-body {
    padding: 1rem 1rem;
}

.item-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.item-excerpt {
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.item-meta .meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.item-actions {
    display: flex;
    gap: 0.4rem;
}

/* Status chips */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.78rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #1f2937;
}

.status-submitted {
    background-color: #fff7ed;
    border-color: #fde68a;
    color: #92400e;
}

/* amber soft */
.status-paid {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* green soft */
.status-converted {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

/* indigo soft */
.status-pending {
    background-color: #fff7ed;
    border-color: #fde68a;
    color: #92400e;
}

.status-answered {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* Soft separators */
.soft-sep {
    height: 1px;
    background-color: rgba(93, 64, 55, 0.12);
    margin: 0.5rem 0;
}

/* Empty state */
.empty-state {
    border: 1px dashed rgba(93, 64, 55, 0.25);
    border-radius: 0.9rem;
    padding: 1rem;
    text-align: center;
    color: var(--color-muted);
}

.empty-state i {
    color: var(--color-teal);
}

/* Compact badged buttons for secondary actions */
.btn-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

a {
    text-decoration: none;
}

/* --- Filter bar and colorful chips for types/categories --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    min-width: 180px;
}

.filter-bar .btn {
    height: 38px;
}

/* Type chips */
.type-complaint {
    background-color: #ffe4e6;
    border-color: #fecdd3;
    color: #be123c;
}

.type-petition {
    background-color: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

.type-lawyer_request {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.type-declaration {
    background-color: #fff7ed;
    border-color: #fde68a;
    color: #b45309;
}

/* Category chips */
.cat-criminal {
    background-color: #ffe4e6;
    border-color: #fecdd3;
    color: #e11d48;
}

.cat-civil {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.cat-property {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.cat-family {
    background-color: #fdf2f8;
    border-color: #fbcfe8;
    color: #be185d;
}

.cat-commercial {
    background-color: #f0f9ff;
    border-color: #bae6fd;
    color: #0ea5e9;
}

.cat-labor {
    background-color: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.cat-administrative {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #b45309;
}

/* --- Lawyer Services page accents --- */
#lawyer-services .service-cat-card {
    position: relative;
    border: 1px solid rgba(13, 40, 65, .10);
    border-radius: 0.9rem;
    box-shadow: 0 10px 24px rgba(13, 40, 65, .08);
    background: #fff;
}

#lawyer-services .service-cat-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 4px;
    border-top-left-radius: 0.9rem;
    border-top-right-radius: 0.9rem;
    background: var(--accent, var(--color-teal));
}

#lawyer-services .service-cat-card .item-meta .meta i {
    color: var(--accent, var(--color-teal));
}

/* Accent per type */
#lawyer-services .service-cat-card.type-complaint {
    --accent: #e11d48;
}

#lawyer-services .service-cat-card.type-petition {
    --accent: #6d28d9;
}

#lawyer-services .service-cat-card.type-lawyer_request {
    --accent: #1d4ed8;
}

#lawyer-services .service-cat-card.type-declaration {
    --accent: #b45309;
}

/* Form compactness and visual hierarchy */
#lawyer-services .card .form-label {
    font-weight: 700;
    font-size: 0.9rem;
}

#lawyer-services .card .form-select,
#lawyer-services .card .form-control {
    border-radius: 0.6rem;
}

#lawyer-services .item-actions .btn {
    border-radius: 0.6rem;
}

/* Subject rows */
#lawyer-services .card .border {
    border-color: rgba(13, 40, 65, .12) !important;
    background: #fafcff;
}