/* Party Single Page Styles */

.party-page-wrapper {
    background-color: #f8fafc;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Hero Banner */
.party-hero {
    border-radius: 16px;
    margin-top: 10px;
    margin-bottom: 30px;
    padding: 50px;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.hero-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.party-logo-circle {
    width: 150px;
    height: 150px;
    background: #ffffff;
    border-radius: 50%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.party-logo-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.party-hero-info {
    flex: 1;
}

.party-name {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
}

.badge-party-type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.party-overview-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-bottom: 25px;
}

.party-quick-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.party-quick-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.party-quick-meta .meta-item i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.party-quick-meta .meta-item small {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.party-quick-meta .meta-item b {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.party-hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-website {
    background: #f97316;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-website:hover {
    background: #ea580c;
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s;
}

.social-links a:hover {
    background: #ffffff;
    color: #0f172a;
}

/* Stats Bar */
.party-stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.stat-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-box .icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.stat-box h3 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 5px 0;
}

.stat-box p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.stat-box a {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

/* Nav Tabs */
.party-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 10px;
    overflow-x: auto;
}

.party-nav-tabs a {
    padding: 10px 20px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.party-nav-tabs a:hover {
    background: #f1f5f9;
}

.party-nav-tabs a.active {
    background: #eff6ff;
    color: #3b82f6;
}

/* Layout */
.party-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.party-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-row {
    display: flex;
    gap: 30px;
}

.content-box.half-width {
    flex: 1;
}

.party-sidebar {
    flex: 0 0 320px;
    /* Removed sticky position so it acts as a normal column */
}

/* Common Content Box */
.content-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.box-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.view-all-link {
    font-size: 13px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.text-content {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.text-content p {
    margin-bottom: 15px;
}

/* About Text Scroll */
.about-text-container {
    position: relative;
    max-height: 360px; /* Accommodates approx 175 words */
    overflow-y: auto;
    padding-right: 10px;
    flex: 1;
}

/* Custom Scrollbar for About */
.about-text-container::-webkit-scrollbar {
    width: 6px;
}
.about-text-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.about-text-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.about-text-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Top Leaders */
.top-leaders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.leader-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.leader-item:hover {
    background: #f8fafc;
}

.leader-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.leader-info h4 {
    margin: 0 0 3px 0;
    font-size: 15px;
    color: #0f172a;
}

.leader-info p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

/* Party Sidebar Info */
.party-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.party-info-list li {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0px;
    align-items: center;
}

.party-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.party-info-list li span {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
}

.party-info-list li b {
    font-size: 14px;
    color: #0f172a;
    font-weight: 400;
}

.color-badges {
    display: flex;
    gap: 8px;
}

.color-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
}

/* State Unit */
.state-unit-stats {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.state-unit-stats li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.state-unit-stats li span {
    color: #64748b;
}

.state-unit-stats li b {
    color: #0f172a;
}

/* Latest News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item-row {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.news-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-item-row img {
    width: 120px;
    height: 65px;
    border-radius: 6px;
    object-fit: cover;
}

.news-item-row .news-info {
    flex: 1;
}

.news-item-row .news-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
}

.news-item-row .news-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 600;
}

.news-item-row .news-date {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* Photo Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    aspect-ratio: 16/9;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0.9)} 
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
