/* ========================================
   RESET AND BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #dc2626;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
}

.nav-bar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
}

.logo-text {
    font-family: 'Playfair Display', serif;
}

.mobile-menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.mobile-menu-toggle svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    margin-top: 72px;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 2rem;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--bg-white);
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.8;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--bg-white);
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.button-icon {
    width: 24px;
    height: 24px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
    padding: 6rem 0;
    background: var(--bg-white);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.section-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: left;
}

/* ========================================
   FILTER SECTION
   ======================================== */
.filter-section {
    padding: 4rem 0 2rem;
    background: var(--bg-light);
}

.filter-controls {
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.filter-icon {
    width: 18px;
    height: 18px;
}

/* ========================================
   CANDIDATES SECTION
   ======================================== */
.candidates-section {
    padding: 2rem 0 6rem;
    background: var(--bg-light);
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.candidate-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.candidate-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.candidate-image-container {
    position: relative;
    width: 100%;
    padding-top: 125%; /* 4:5 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.candidate-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.candidate-card:hover .candidate-image {
    transform: scale(1.05);
}

.candidate-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.candidate-info {
    padding: 1.5rem;
}

.candidate-header {
    margin-bottom: 1rem;
}

.candidate-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.candidate-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.candidate-office {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--accent-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.office-icon {
    width: 16px;
    height: 16px;
}

.candidate-summary {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.candidate-details {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
}

.candidate-details.expanded {
    height: auto;
}

.detail-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.detail-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.detail-list {
    list-style: none;
    margin-bottom: 1rem;
}

.detail-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.detail-list li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.candidate-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--secondary-color);
}

.action-icon {
    width: 18px;
    height: 18px;
}

.contact-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.contact-link {
    color: var(--secondary-color);
    word-break: break-all;
}

.contact-link:hover {
    text-decoration: underline;
}

/* ========================================
   NO RESULTS
   ======================================== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--border-color);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--bg-white);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--bg-white);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

/* ========================================
   SCROLL TO TOP
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #b91c1c;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .about-text {
        font-size: 1rem;
        text-align: left;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .candidates-grid {
        grid-template-columns: 1fr;
    }
    
    .candidate-actions {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.875rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .cta-button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .candidate-name {
        font-size: 1.25rem;
    }
}