:root {
    --bg-deep: #0b1424;
    --bg-mid: #122038;
    --text: #e8eef8;
    --text-soft: rgba(232, 238, 248, 0.72);
    --muted: rgba(232, 238, 248, 0.58);
    --brand: #dce6f5;
    --accent: #8eb4e8;
    --gold: #d4b56a;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-strong: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-border-strong: rgba(255, 255, 255, 0.28);
    --radius: 22px;
    --blur: 18px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Vazirmatn", sans-serif;
    color: var(--text);
    background: var(--bg-deep);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(ellipse 90% 60% at 10% -10%, rgba(70, 120, 190, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 95% 15%, rgba(212, 181, 106, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 45% at 50% 110%, rgba(40, 80, 140, 0.28), transparent 55%),
        linear-gradient(165deg, #0b1424 0%, #122038 45%, #0e1a2e 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    margin-inline: 0;
    padding-inline: clamp(1.1rem, 3vw, 2.75rem);
}

.main-area {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* —— Navigation glass —— */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 20, 36, 0.55);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding-block: 0.7rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(212, 181, 106, 0.55);
    background:
        linear-gradient(135deg, rgba(212, 181, 106, 0.35), transparent 55%),
        rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    font-size: 1.02rem;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.74rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    gap: 0.45rem;
}

.nav-pill {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

.glass-footer {
    margin-top: 2.5rem;
    padding: 1.35rem 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(11, 20, 36, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--muted);
    font-size: 0.86rem;
}

.glass-footer p {
    margin: 0;
}

/* —— Home glass stage —— */
.glass-home {
    position: relative;
    padding: 2rem 0 2.5rem;
}

.mesh {
    position: absolute;
    inset: -2rem -4rem;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.7;
}

.orb-1 {
    width: 340px;
    height: 340px;
    top: 4%;
    right: 8%;
    background: rgba(90, 140, 210, 0.45);
}

.orb-2 {
    width: 280px;
    height: 280px;
    top: 35%;
    left: 5%;
    background: rgba(212, 181, 106, 0.28);
}

.orb-3 {
    width: 260px;
    height: 260px;
    bottom: 5%;
    right: 30%;
    background: rgba(60, 100, 170, 0.35);
}

.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    opacity: 0.7;
}

.glass-grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.glass-card {
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--blur)) saturate(165%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(165%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
    animation: riseIn 0.55s ease both;
}

.glass-card:nth-child(1) { animation-delay: 0.04s; }
.glass-card:nth-child(2) { animation-delay: 0.1s; }
.glass-card:nth-child(3) { animation-delay: 0.16s; }
.glass-card:nth-child(4) { animation-delay: 0.22s; }

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.glass-card:hover {
    transform: translateY(-4px);
    background: var(--glass-strong);
    border-color: var(--glass-border-strong);
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.glass-card-link {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.75rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    min-height: 210px;
}

.glass-card-media {
    position: relative;
    display: flex;
    justify-content: center;
}

.avatar-ring {
    width: 160px;
    height: 160px;
    border-radius: 28px;
    padding: 3px;
    background: linear-gradient(145deg, rgba(212, 181, 106, 0.85), rgba(142, 180, 232, 0.35), rgba(255, 255, 255, 0.15));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 25px;
    background: #1a2a44;
}

.glass-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--gold);
    background: rgba(212, 181, 106, 0.12);
    border: 1px solid rgba(212, 181, 106, 0.28);
}

.glass-name {
    margin: 0.35rem 0 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.45rem 0 0.2rem;
}

.stars {
    position: relative;
    display: inline-block;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    line-height: 1;
    direction: ltr;
}

.stars-empty {
    color: rgba(255, 255, 255, 0.28);
}

.stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    white-space: nowrap;
    color: #ffffff;
}

.rating-value {
    color: var(--gold);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.rating-count {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.92rem;
    opacity: 0.9;
}

.rating-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin: 0.35rem 0 0.15rem;
}

.rating-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.glass-edu {
    margin: 0;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
}

.glass-desc {
    margin: 0.55rem 0 0;
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 0.95rem;
    max-width: 48rem;
}

.glass-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.15rem;
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(212, 181, 106, 0.95), rgba(184, 149, 76, 0.9));
    color: #1a1408;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(212, 181, 106, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 500;
}

.glass-card:hover .btn-glass {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* —— Shared pages (detail / calendar) —— */
.page-intro {
    padding: 2.2rem 0 1.5rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--glass-border);
}

.page-kicker {
    margin: 0 0 0.45rem;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.page-intro h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
}

.page-intro p,
.empty-state {
    margin: 0;
    color: var(--text-soft);
    max-width: 42rem;
    line-height: 1.85;
}

.consultant-detail {
    padding: 1.75rem 0 2.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.1rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.consultant-row,
.week-section {
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.detail-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 1.4rem;
}

.consultant-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: #1a2a44;
}

.row-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.row-header h1,
.row-header h2 {
    margin: 0 0 0.3rem;
    color: #fff;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

.education {
    margin: 0;
    color: var(--accent);
    font-size: 0.95rem;
}

.divider {
    width: 48px;
    height: 2px;
    margin: 0.9rem 0;
    border: 0;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.description {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.95;
}

.week-section {
    margin-top: 1.35rem;
    padding: 1.25rem 1.35rem 1.4rem;
}

.fee-inline {
    margin-top: 1.1rem;
}

.fee-inline strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 700;
}

.fee-inline p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.95;
    font-size: 0.98rem;
}

.week-title {
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1.05rem;
    color: #fff;
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.month-title {
    margin: 0;
    color: #fff;
    font-size: 1.15rem;
}

.month-nav-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
    font-size: 0.85rem;
}

.month-nav-btn:hover {
    color: #fff;
    border-color: var(--glass-border-strong);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.45rem;
}

.month-head {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold);
    padding: 0.45rem 0.2rem;
}

.month-day {
    min-height: 120px;
    padding: 0.55rem 0.45rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.month-day.is-out {
    opacity: 0.25;
    background: transparent;
    border-color: transparent;
}

.month-day.is-past {
    opacity: 0.55;
}

.month-day.is-today {
    border-color: rgba(212, 181, 106, 0.55);
    box-shadow: inset 0 0 0 1px rgba(212, 181, 106, 0.25);
}

.month-day-date {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--glass-border);
}

.month-day-num {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.month-day-label {
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.4;
}

.slot-past {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    opacity: 0.75;
}

.slot-past .slot-status {
    color: rgba(255, 255, 255, 0.45);
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
}

.week-day {
    min-height: 140px;
    padding: 0.7rem 0.5rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.week-day-label {
    margin: 0 0 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

.slot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.slot-item {
    display: block;
    padding: 0.5rem 0.4rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.45;
}

.slot-free {
    border-color: rgba(120, 180, 130, 0.35);
    background: rgba(90, 150, 100, 0.12);
}

.slot-booked {
    border-color: rgba(212, 181, 106, 0.35);
    background: rgba(212, 181, 106, 0.1);
}

.slot-time {
    display: block;
    font-weight: 600;
    color: #fff;
}

.slot-name,
.slot-booked-for {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.slot-status {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid currentColor;
}

.slot-free .slot-status {
    color: #9fd0a8;
}

.slot-booked .slot-status {
    color: var(--gold);
}

.slot-empty {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
}

.slot-time-link {
    display: block;
    color: inherit;
}

.btn-book {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(212, 181, 106, 0.55);
    border-radius: 999px;
    background: rgba(212, 181, 106, 0.18);
    color: var(--gold);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-book:hover {
    background: rgba(212, 181, 106, 0.3);
    border-color: var(--gold);
}

.booking-modal[hidden] {
    display: none !important;
}

.booking-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.booking-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 20, 0.72);
    backdrop-filter: blur(4px);
}

.booking-modal-card {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    padding: 1.5rem 1.4rem;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: rgba(18, 32, 56, 0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.booking-modal-card h3 {
    margin: 0 0 0.9rem;
    color: #fff;
    font-size: 1.1rem;
}

.booking-modal-body {
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 0.98rem;
    margin-bottom: 1.2rem;
}

.booking-modal-close {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.calendar-page {
    margin-bottom: 2rem;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass-card,
    .glass-nav,
    .consultant-row,
    .week-section {
        background: rgba(22, 34, 56, 0.92);
    }
}

@media (prefers-reduced-motion: reduce) {
    .glass-card {
        animation: none;
    }

    .glass-card:hover {
        transform: none;
    }
}

@media (max-width: 800px) {
    .glass-card-link,
    .detail-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .glass-card-link {
        padding: 1.4rem 1.2rem 1.5rem;
    }

    .glass-actions {
        justify-content: center;
    }

    .divider {
        margin-inline: auto;
    }

    .week-grid,
    .month-grid {
        grid-template-columns: 1fr 1fr;
    }

    .month-head {
        display: none;
    }

    .header-bar {
        flex-wrap: wrap;
    }

    .site-nav {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .week-grid,
    .month-grid {
        grid-template-columns: 1fr;
    }

    .brand-title {
        font-size: 0.92rem;
    }

    .avatar-ring {
        width: 140px;
        height: 140px;
    }
}
