/* ============================
   Khural.mn — Sub-page styles
   ============================ */

/* ---------- Page header / breadcrumb ---------- */
.page-header {
    position: relative;
    padding: 60px 0 50px;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-light) 100%);
    color: white;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L40 80 M0 40 L80 40' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    pointer-events: none;
}
.page-header::after {
    content: '';
    position: absolute;
    top: -40%; right: -8%;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(201,162,39,.22), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.page-header .container { position: relative; z-index: 2; }
.page-header .eyebrow { color: var(--accent-warm); margin-bottom: 10px; }
.page-header h1 {
    color: white;
    font-family: 'Playfair Display', serif;
    margin-bottom: 14px;
    max-width: 820px;
}
.page-header p {
    color: rgba(255,255,255,.9);
    max-width: 720px;
    font-size: 1.02rem;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.75); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent-warm); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: white; font-weight: 500; }

/* ---------- Page body ---------- */
.page-body { padding: 60px 0 80px; }
.page-body.soft { background: var(--bg-soft); }

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: flex-start;
}
.content-grid.wide-sidebar { grid-template-columns: 1fr 340px; }

/* ---------- Sidebar ---------- */
.sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sidebar-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
    font-size: 1rem;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.sidebar-card h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: -1px;
    width: 40px; height: 2px;
    background: var(--accent);
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.sidebar-menu li a:hover { background: var(--bg-soft); color: var(--brand); }
.sidebar-menu li a.active { background: rgba(11,61,145,.08); color: var(--brand); font-weight: 600; }
.sidebar-menu li a i { font-size: 0.75rem; opacity: .6; }
.sidebar-menu li a .count {
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ---------- Article (prose) ---------- */
.article-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
}
.prose { font-size: 1rem; line-height: 1.8; color: #2d3340; }
.prose h2 {
    font-family: 'Playfair Display', serif;
    margin: 28px 0 14px;
    font-size: 1.6rem;
}
.prose h3 { margin: 24px 0 10px; font-size: 1.2rem; color: var(--brand); }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 10px 0 18px 20px; }
.prose ul li, .prose ol li { margin-bottom: 8px; padding-left: 6px; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose blockquote {
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    padding: 18px 22px;
    border-radius: 0 10px 10px 0;
    margin: 18px 0;
    font-style: italic;
    color: var(--text);
}
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img, .prose .figure {
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid var(--line);
}

/* ---------- Filter bar ---------- */
.filter-bar {
    display: flex;
    gap: 14px;
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.filter-bar .search-input {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-soft);
    border-radius: 8px;
    padding: 10px 14px;
}
.filter-bar .search-input input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    width: 100%;
    font-size: 0.92rem;
}
.filter-bar .search-input i { color: var(--muted); }
.filter-bar select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    cursor: pointer;
    min-width: 160px;
}
.filter-bar select:focus { border-color: var(--brand); }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: white; border-color: var(--brand); }
.pagination .disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Representative cards ---------- */
.rep-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.rep-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.rep-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(11,61,145,.2); }
.rep-photo {
    height: 240px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: 5rem;
    position: relative;
}
.rep-party {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(255,255,255,.95);
    color: var(--brand);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}
.rep-info { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.rep-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.rep-info .rep-role {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.rep-meta {
    display: flex;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.rep-meta span i { color: var(--brand); margin-right: 4px; }

/* ---------- Session list (page) ---------- */
.session-page-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.session-page-list .session-row {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    gap: 20px;
    align-items: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.session-page-list .session-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(11,61,145,.2); }
.session-page-list .session-date {
    padding: 14px;
    min-width: 0;
}
.session-page-list .session-date .day { font-size: 1.8rem; }
.session-page-list .session-info h4 { font-size: 1.1rem; margin-bottom: 6px; }
.session-page-list .session-info p { font-size: 0.88rem; color: var(--muted); }
.session-page-list .session-info p i { color: var(--brand); margin-right: 4px; }
.session-link {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: var(--bg-soft);
    color: var(--brand);
    border-radius: 10px;
    transition: all var(--transition);
}
.session-link:hover { background: var(--brand); color: white; }

/* ---------- Forms ---------- */
.form-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
}
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.form-field label .req { color: #c0392b; margin-left: 2px; }
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    background: var(--bg-soft);
    color: var(--text);
    transition: all var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--brand);
    background: white;
    box-shadow: 0 0 0 3px rgba(11,61,145,.08);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field .hint { font-size: 0.78rem; color: var(--muted); }
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}
.form-actions .btn-primary { background: var(--brand); color: white; }
.form-actions .btn-primary:hover { background: var(--brand-dark); box-shadow: 0 8px 22px rgba(11,61,145,.25); }

/* ---------- Info blocks (contact) ---------- */
.info-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}
.info-block {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.info-block:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.info-block .info-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(11,61,145,.1), rgba(26,95,180,.15));
    color: var(--brand);
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 14px;
}
.info-block h4 { font-size: 1rem; margin-bottom: 6px; }
.info-block p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

.map-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    height: 420px;
    position: relative;
    background: linear-gradient(135deg, #e8edf5, #f4f6fb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}
.map-wrap i { font-size: 3rem; color: var(--brand); opacity: .35; }

/* ---------- Profile hero (representative detail) ---------- */
.profile-hero {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}
.profile-photo {
    width: 220px; height: 260px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: 0 10px 30px rgba(11,61,145,.2);
}
.profile-meta { display: flex; flex-direction: column; gap: 10px; }
.profile-meta h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 4px;
}
.profile-role { color: var(--muted); font-size: 1rem; margin-bottom: 14px; }
.profile-stats {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.profile-stats .stat-item { display: flex; flex-direction: column; }
.profile-stats .stat-item .label {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.profile-stats .stat-item .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand);
}
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tabs block ---------- */
.tab-block {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.tab-head {
    display: flex;
    border-bottom: 1px solid var(--line);
    padding: 0 10px;
    overflow-x: auto;
}
.tab-head button {
    padding: 16px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all var(--transition);
}
.tab-head button:hover { color: var(--brand); }
.tab-head button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-content { padding: 30px 32px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Article detail ---------- */
.article-hero {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.article-hero-img {
    height: 420px;
    background-size: cover;
    background-position: center;
}
.article-hero-body { padding: 30px 40px 20px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.article-tags .tag { font-size: 0.72rem; }
.article-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    margin-bottom: 14px;
    line-height: 1.25;
}
.article-meta-row {
    display: flex;
    gap: 22px;
    color: var(--muted);
    font-size: 0.88rem;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.article-meta-row .author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}
.article-meta-row .author .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: white;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.article-meta-row i { color: var(--brand); margin-right: 5px; }

.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    padding: 18px 24px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}
.share-row span { font-weight: 600; margin-right: 8px; }
.share-row a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--brand);
    display: inline-flex;
    align-items: center; justify-content: center;
    border: 1px solid var(--line);
    transition: all var(--transition);
}
.share-row a:hover { background: var(--brand); color: white; transform: translateY(-2px); }

/* ---------- Document list (decisions page) ---------- */
.doc-filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.doc-filter-group button {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    transition: all var(--transition);
}
.doc-filter-group button:hover { color: var(--brand); border-color: var(--brand); }
.doc-filter-group button.active { background: var(--brand); color: white; border-color: var(--brand); }

/* ---------- Committees grid ---------- */
.committee-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.committee-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    display: flex;
    gap: 20px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.committee-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.committee-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: white;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.committee-info h3 { font-size: 1.1rem; margin-bottom: 6px; }
.committee-info p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.committee-info .lead {
    font-size: 0.85rem;
    color: var(--brand);
    font-weight: 600;
}

/* ---------- News list (page) ---------- */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .content-grid, .content-grid.wide-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .rep-grid { grid-template-columns: repeat(2, 1fr); }
    .news-list { grid-template-columns: repeat(2, 1fr); }
    .info-blocks { grid-template-columns: 1fr; }
    .committee-grid { grid-template-columns: 1fr; }
    .profile-hero { grid-template-columns: 1fr; text-align: center; }
    .profile-photo { margin: 0 auto; }
    .profile-stats { justify-content: center; }
    .profile-actions { justify-content: center; }
    .session-page-list .session-row { grid-template-columns: 80px 1fr auto; }
    .session-page-list .session-row .session-link { display: none; }
}

@media (max-width: 640px) {
    .page-header { padding: 40px 0 36px; }
    .page-body { padding: 40px 0 60px; }
    .article-card, .form-card, .profile-hero { padding: 22px 20px; }
    .article-hero-body { padding: 22px 20px 16px; }
    .article-hero-img { height: 240px; }
    .rep-grid, .news-list { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
    .filter-bar { padding: 12px; }
    .filter-bar select { width: 100%; }
    .tab-content { padding: 22px 20px; }
    .session-page-list .session-row {
        grid-template-columns: 70px 1fr;
        gap: 14px;
        padding: 16px 18px;
    }
    .session-page-list .session-row .session-status { grid-column: 2; justify-self: start; }
}
