/* ==========================================================================
   PNW Single Politician Profile CSS (Phase 1)
   ========================================================================== */

/* Variables matching design */
:root {
    --pnw-primary: #2563eb;
    --pnw-text-main: #111827;
    --pnw-text-muted: #6b7280;
    --pnw-bg: #f9fafb;
    --pnw-border: #e5e7eb;
    --pnw-card-bg: #ffffff;
    --pnw-green: #10b981;
    --pnw-red: #ef4444;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f9fcfd;
}

.politician-page-wrapper {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--pnw-text-main);
}

/* Breadcrumbs */
.pnw-breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 13px;
    padding: 15px 0;
    color: var(--pnw-text-muted);
}
.pnw-breadcrumbs a {
    color: var(--pnw-text-muted);
    text-decoration: none;
    margin-right: 8px;
}
.pnw-breadcrumbs a:hover {
    color: var(--pnw-primary);
}
.pnw-breadcrumbs span {
    font-weight: 600;
    color: var(--pnw-text-main);
    margin-left: 8px;
}
.breadcrumbs-actions {
    margin-left: auto;
    display: flex;
    gap: 15px;
}

/* Hero Section */
.profile-hero {
    display: flex;
    background: var(--pnw-card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    gap: 30px;
    border: none;
    box-shadow: none;
}

.hero-left-image {
    flex: 0 0 400px;
}
.hero-left-image .image-wrapper {
    width: 400px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2ff; /* Soft blue background behind image */
}
.hero-left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-center-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.badge-current-position {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 12px;
}
.profile-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.verified-icon {
    width: 20px;
    height: 20px;
}
.profile-designation {
    font-size: 18px;
    color: var(--pnw-text-muted);
    font-weight: 500;
    margin: 0 0 20px 0;
}


.hero-relations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}
.relation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}
.relation-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.relation-item .icon {
    font-size: 18px;
}

.hero-socials {
    display: flex;
    gap: 15px;
}
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pnw-text-main);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}
.social-icon:hover {
    background: #e5e7eb;
}

/* EEAT Bar */
.eeat-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--pnw-border);
    font-size: 13px;
    color: var(--pnw-text-muted);
}
.eeat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.eeat-item .icon {
    font-size: 15px;
    color: var(--pnw-primary);
}
.eeat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}
.eeat-badge .icon {
    font-size: 11px;
}
    display: flex;
    gap: 15px;
}
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pnw-text-main);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}
.social-icon:hover {
    background: #e5e7eb;
}

.hero-right-facts {
    flex: 0 0 350px;
    border-left: 1px solid var(--pnw-border);
    padding-left: 30px;
}
.fact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.fact-list li {
    display: flex;
    font-size: 13px;
}
.fact-label {
    flex: 0 0 140px;
    color: var(--pnw-text-muted);
    font-weight: 500;
}
.fact-val {
    font-weight: 600;
    color: var(--pnw-text-main);
}

/* 3-Column Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    gap: 30px;
    margin-bottom: 50px;
}
.sidebar-left,
.sidebar-right {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    /* overflow-y: auto; */
}

/* Sidebar Left */
.profile-nav {
    background: var(--pnw-card-bg);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}
.profile-nav a {
    padding: 12px 15px;
    color: var(--pnw-text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}
.profile-nav a:hover {
    background: #f3f4f6;
}
.profile-nav a.active {
    background: var(--pnw-primary);
    color: #fff;
}

.widget {
    background: var(--pnw-card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}
.widget h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
}
.glance-list, .connect-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.glance-list li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}
.glance-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.glance-list li span {
    color: var(--pnw-text-muted);
}
.connect-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.connect-list li a {
    color: var(--pnw-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Center Content */
.content-box {
    background: var(--pnw-card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    scroll-margin-top: 30px;
}
.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.content-box h2, .box-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--pnw-text-main);
}
.box-header h2 { margin: 0; }

.view-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--pnw-primary);
    text-decoration: none;
}
.view-all:hover {
    text-decoration: underline;
}

.text-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--pnw-text-muted);
}
.text-content p {
    margin-bottom: 15px;
}

/* Timelines */
.horizontal-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 10px;
}
.horizontal-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e5e7eb;
    z-index: 1;
}
.timeline-item {
    text-align: center;
    z-index: 2;
    position: relative;
    width: 20%;
}
.timeline-item .year {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
}
.timeline-item .dot {
    width: 14px;
    height: 14px;
    background: var(--pnw-primary);
    border-radius: 50%;
    margin: 0 auto 15px auto;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--pnw-primary);
}
.timeline-item .event {
    font-size: 12px;
    color: var(--pnw-text-muted);
}

.vertical-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.vertical-timeline::before {
    content: '';
    position: absolute;
    left: 118px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #e5e7eb;
}
.vertical-timeline li {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
}
.vertical-timeline li .year {
    width: 80px;
    font-size: 13px;
    color: var(--pnw-text-muted);
    text-align: right;
}
.vertical-timeline li .icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    z-index: 2;
}
.vertical-timeline li .title {
    font-size: 14px;
    flex: 1;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 12px;
    background: #f9fafb;
    border-bottom: 1px solid var(--pnw-border);
    font-weight: 600;
}
.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--pnw-text-muted);
}
.badge-result {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}
.badge-result.won {
    background: #d1fae5;
    color: #065f46;
}

/* Assets */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.asset-card {
    border: 1px solid var(--pnw-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.asset-card small {
    display: block;
    color: var(--pnw-text-muted);
    margin-bottom: 8px;
}
.asset-card b {
    font-size: 16px;
    font-weight: 700;
}
.text-green { color: var(--pnw-green); }
.text-red { color: var(--pnw-red); }

/* Right Sidebar Cards */
.widget-card .const-header, .widget-card .party-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.const-header .icon {
    font-size: 24px;
}
.party-header img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.const-details, .party-details, .family-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 13px;
}
.const-details div, .party-details div, .family-details div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}
.const-details span, .party-details span, .family-details span {
    color: var(--pnw-text-muted);
}

/* Responsive */
@media(max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr 300px;
    }
    .sidebar-left {
        display: none;
    }
    .hero-right-facts {
        display: none;
    }
}
@media(max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-hero {
        flex-direction: column;
    }
    .asset-grid {
        grid-template-columns: 1fr 1fr;
    }
}
/* Read More Toggle */
.about-text-container {
    transition: max-height 0.4s ease;
}
.about-text-container.truncated {
    max-height: 145px;
    overflow: hidden;
    position: relative;
}
.about-text-container.truncated::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}
.about-text-container.expanded {
    max-height: 3000px;
}


/* FAQ Section */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
@media (max-width: 1024px) { .faq-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.faq-item summary {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    padding: 12px 15px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    transform: rotate(180deg);
}
.faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}
.faq-answer p { margin: 0; }

/* Share Dropdown */
.share-dropdown-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.share-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 0px;
    border: 1px solid var(--pnw-border);
}
.share-dropdown-wrapper:hover .share-dropdown {
    display: flex;
    flex-direction: column;
}
.share-dropdown a {
    color: var(--pnw-text-main);
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    margin-right: 0px;
}
.share-dropdown a:hover {
    background-color: #f3f4f6;
}
.share-dropdown a .fa-facebook-f { color: #1877F2; }
.share-dropdown a .fa-twitter { color: #1DA1F2; }
.share-dropdown a .fa-whatsapp { color: #25D366; }
