/* Election & Candidates — Shared Styles */

/* ── Hero (shared by both pages) ── */
.election-hero,
.candidates-hero {
    padding: 2rem 0 2rem;
    background: linear-gradient(135deg, #141418 0%, #2c3e6d 100%);
    color: white;
}

.election-hero h1,
.candidates-hero h1 { color: white; }

.election-hero .lead,
.candidates-hero .lead { color: rgba(255,255,255,0.9); }

.election-hero .subtitle,
.candidates-hero .subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

/* ── Section heading (shared) ── */
.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--dark-color);
}

/* ── Info cards (election page) ── */
.info-card { border-left: 4px solid var(--primary-color); }
.info-card.warning { border-left-color: var(--warning-color); }
.info-card.success { border-left-color: var(--success-color); }

/* ── Timeline (election page) ── */
.timeline-section { background: #f8f9fa; }

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.25rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.45rem;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}
.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.82rem;
    top: 1.5rem;
    width: 2px;
    height: calc(100% + 0.25rem);
    background: #dee2e6;
}
.timeline-item:last-child::after { display: none; }

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}
.timeline-label { font-size: 0.95rem; }

.highlight-voting {
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-weight: 700;
}

/* ── Seats table (election page) ── */
.seats-table th { background-color: var(--primary-color); color: white; }
.seats-table td, .seats-table th {
    padding: 0.6rem 1rem;
    vertical-align: middle;
}

/* ── Candidate list (candidates page) ── */
.candidate-section { background: #f8f9fa; }

.candidate-list { list-style: none; padding: 0; margin: 0; }

.candidate-item {
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.candidate-item:hover { box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.08); }

.candidate-header {
    display: flex;
    align-items: stretch;
    cursor: pointer;
    user-select: none;
}

.candidate-header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.75rem 0.85rem 1rem;
    gap: 0.75rem;
}

.candidate-number {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.85rem;
    min-width: 1.75rem;
    text-align: center;
}

.candidate-name {
    flex: 1;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--dark-color);
}

.candidate-expand-icon {
    font-size: 0.85rem;
    color: var(--secondary-color);
    transition: transform 0.25s;
    flex-shrink: 0;
}
.candidate-item.open .candidate-expand-icon { transform: rotate(180deg); }

.candidate-fav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-left: 1px solid #e9ecef;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 1rem;
    color: #ccc;
    transition: color 0.15s, background-color 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.candidate-fav-btn.active { color: #f0ad4e; background: #fffbf0; }

/* Withdrawn candidate */
.candidate-item.withdrew { background: #f3f4f6; opacity: 0.75; }
.candidate-item.withdrew .candidate-name,
.candidate-item.withdrew .candidate-number { color: #6c757d; text-decoration: line-through; }
.candidate-withdrew-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #6c757d;
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Expanded content */
.candidate-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.candidate-item.open .candidate-body {
    max-height: 3000px;
}

.candidate-content {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid #eee;
}

.candidate-photo-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.candidate-photo-wrap.has-photo { cursor: pointer; }
.candidate-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.candidate-photo-wrap .no-photo {
    color: rgba(255,255,255,0.7);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Photo lightbox */
.photo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 1.5rem;
}
.photo-lightbox.visible { display: flex; }
.photo-lightbox img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.5rem;
    box-shadow: 0 0 2rem rgba(0,0,0,0.5);
    object-fit: contain;
}
.photo-lightbox-name {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    font-weight: 600;
}

.candidate-top-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding-top: 1.25rem;
}

.candidate-details { flex: 1; min-width: 0; }

.candidate-qa-block { margin-top: 1rem; }
.candidate-qa-block h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.candidate-qa-block p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #444;
    white-space: pre-line;
    margin-bottom: 0;
}

.candidate-no-response {
    color: var(--secondary-color);
    font-style: italic;
    font-size: 0.9rem;
}

/* Filter bar */
.candidate-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.candidate-filter-bar .candidate-count {
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.candidate-filter-bar .filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.candidate-filter-btn {
    background: none;
    border: 2px solid #dee2e6;
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--secondary-color);
}
.candidate-filter-btn:hover { border-color: #f0ad4e; color: #f0ad4e; }
.candidate-filter-btn.active {
    background: #f0ad4e;
    border-color: #f0ad4e;
    color: #fff;
}

/* Floating share button */
.share-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 8000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.share-fab.visible { display: flex; }
.share-fab:active { transform: scale(0.93); }
@media (hover: hover) {
    .share-fab:hover { background: #004494; box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
}
.share-fab-icon {
    width: 24px;
    height: 24px;
}
.share-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #f0ad4e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Shared favorites banner */
.share-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    background: #eef6ff;
    border: 1px solid #b8d4f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #1a5276;
}
.share-banner.visible { display: flex; }
.share-banner-dismiss {
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a5276;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.15s;
}
.share-banner-dismiss:hover { background: rgba(0,0,0,0.06); }

/* Share toast */
.share-toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: var(--dark-color);
    color: #fff;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9000;
}
.share-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Board of Directors (directors page) ── */
.directors-section { background: #f8f9fa; }

.director-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1.75rem 1rem 1.5rem;
    height: 100%;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.director-card:hover {
    box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.director-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.director-photo.has-photo { cursor: pointer; }
.director-photo img { width: 100%; height: 100%; object-fit: cover; }
.director-photo .no-photo {
    color: rgba(255,255,255,0.8);
    font-size: 2.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.director-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
}

.director-role {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    background: #eef2ff;
    border: 1px solid #dfe4ff;
    border-radius: 1rem;
    padding: 0.2rem 0.8rem;
}
.director-role.officer {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.director-term {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--secondary-color);
}

/* ── Initiatives (initiatives page) ── */
.initiative-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.04);
}
.initiative-card.warning { border-left-color: var(--warning-color); }
.initiative-card.danger  { border-left-color: var(--danger-color); }

.initiative-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.35rem;
}

.initiative-lead {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.initiative-lead-name {
    font-weight: 600;
    color: var(--primary-color);
}
.initiative-lead-role {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.initiative-body p {
    line-height: 1.65;
    color: #444;
    margin-bottom: 0.85rem;
}
.initiative-body p:last-child { margin-bottom: 0; }

.initiative-body ul {
    color: #444;
    line-height: 1.6;
    padding-left: 1.25rem;
    margin-bottom: 0.85rem;
}
.initiative-body h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.initiative-body h5:first-child { margin-top: 0; }

.initiative-callout {
    background: #fff8e1;
    border: 1px solid #ffe6a0;
    border-left: 3px solid var(--warning-color);
    border-radius: 0.35rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #5b4a14;
    font-size: 0.95rem;
}
.initiative-callout.danger {
    background: #fdeceb;
    border-color: #f5c4c0;
    border-left-color: var(--danger-color);
    color: #6a1e18;
}

.initiative-outlook {
    background: #f0f7f1;
    border: 1px solid #cfe3d2;
    border-left: 4px solid var(--success-color);
    border-radius: 0.5rem;
}
.initiative-outlook h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}
.initiative-outlook p {
    line-height: 1.65;
    color: #333;
}
.initiative-outlook ul {
    line-height: 1.7;
    color: #333;
    padding-left: 1.25rem;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .candidate-header { padding: 0.7rem 0.75rem; }
    .candidate-name { font-size: 0.95rem; }
    .candidate-top-row { flex-direction: column; align-items: center; text-align: center; }
    .candidate-photo-wrap { width: 100px; height: 100px; }
    .candidate-qa-block p { font-size: 0.88rem; }
    .candidate-content { padding: 0 0.75rem 1rem; }
    .candidates-hero { padding: 3rem 0 2rem; }
    .director-photo { width: 96px; height: 96px; }
}
