/* 
    Political Candidate Portfolio - Design System
    Colors: 
    Deep Blue: #0a2351
    Gold: #c5a02a
    Red Accent: #d90429
    White/Off-white: #f8f9fa
*/

:root {
    --primary-blue: #4a0e0e; /* Deep Maroon */
    --secondary-blue: #631212;
    --gold: #d4af37;
    --gold-hover: #b8860b;
    --red-accent: #e63946;
    --off-white: #f8f9fa;
    --text-dark: #2d3436;
    --glass: rgba(74, 14, 14, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow-x: hidden;
    background-color: #fff;
}

/* Global Content Text Justification */
p, 
.bio-content, 
.timeline-content, 
.timeline-v2-content,
.timeline-v2-content p,
.value-item p,
.card-text, 
.article-body, 
.article-body p,
.news-detail-content, 
.news-detail-content p,
.description-text {
    text-align: justify;
}

/* Ensure center alignment is respected for centered containers/elements */
.text-center p,
.text-center div,
.text-center span,
p.text-center,
div.text-center {
    text-align: center !important;
}



h1, h2, h3, h4, h5, h6, .brand-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Navbar Styling */
.main-navbar {
    background: var(--primary-blue);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 0;
}

.navbar.scrolled {
    background: var(--glass);
    backdrop-filter: blur(15px);
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.navbar-brand .brand-text {
    line-height: 1.1;
}

.navbar-brand .brand-text .first-part {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 3px;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.navbar-brand .brand-text .last-part {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(to bottom, #f1c40f, #d4af37, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    display: block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--gold);
    width: 0;
    animation: 
        typing 6s steps(20, end) infinite,
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    0%, 10% { width: 0 }
    50%, 80% { width: 100% }
    90%, 100% { width: 0 }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--gold) }
}

/* Mobile Toggler */
.navbar-toggler {
    border-color: rgba(212, 175, 55, 0.3);
    padding: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.2);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(212, 175, 55, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:hover {
    border-color: var(--gold);
    background: rgba(255,255,255,0.05);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0 12px;
    padding: 8px 0 !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold) !important;
    transform: translateY(-1px);
}

/* Auto-dropdown on hover for desktop */
@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(15px);
        border: none;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2);
        border-radius: 15px;
        padding: 12px;
        background: var(--primary-blue);
        border: 1px solid var(--glass-border);
        min-width: 220px;
    }

    .nav-item.dropdown:hover > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        padding: 10px 18px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .dropdown-item:hover {
        background: var(--gold);
        color: #fff;
        padding-left: 22px;
    }
}

.btn-donate {
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff !important;
    border: none;
    padding: 12px 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-donate:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--gold-hover), var(--gold));
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero-pattern.png') center/cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin-bottom: 30px;
}

.hero-image-wrapper {
    position: relative;
    z-index: 2;
}

.hero-image-wrapper img {
    max-width: 110%;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
}

/* Sections */
.section-padding {
    padding: 100px 0;
}

.section-title {
    position: relative;
    margin-bottom: 50px;
    font-size: 2.8rem;
    color: var(--primary-blue);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gold);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Cards */
.modern-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Statistics */
.stat-item {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.stat-label {
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.main-footer {
    background: #2a0808;
    color: #fff;
}

.footer-title {
    color: var(--gold);
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gold);
    transform: translateY(-3px);
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 99;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #eee;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-content {
    width: 45%;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.timeline-date {
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
}

/* Event Modal Styles */
.event-modal-content {
    background: transparent;
    border-radius: 20px;
}

.event-modal-banner {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.event-badge {
    background: var(--gold);
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
}

.countdown-item span {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.countdown-item small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Floating Side Button */
.floating-side-btn {
    position: fixed;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    z-index: 1000;
    border-radius: 10px 10px 0 0;
    padding: 12px 25px;
    font-weight: 600;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.floating-side-btn:hover {
    right: 0;
    padding-right: 30px;
}

/* Gallery Styles */
.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #fff;
    position: relative;
}
.gallery-item:hover {
    transform: scale(1.02);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 35, 81, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Helper Classes */
.text-gold { color: var(--gold) !important; }
.hover-gold:hover { color: var(--gold) !important; transition: color 0.3s ease; }
.hover-white:hover { color: #fff !important; transition: color 0.3s ease; }

/* Floating Volunteer Button */
.floating-volunteer-btn {
    position: fixed;
    left: 30px;
    bottom: 30px;
    background: linear-gradient(135deg, var(--gold), var(--gold-hover));
    color: #fff !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1050;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
}

.floating-volunteer-btn i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.floating-volunteer-btn span {
    display: none;
    margin-left: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.floating-volunteer-btn:hover {
    width: 220px;
    border-radius: 50px;
}

.floating-volunteer-btn:hover span {
    display: inline-block;
}

.floating-volunteer-btn:hover i {
    transform: rotate(360deg);
}

@media (max-width: 991.98px) {
    .floating-volunteer-btn {
        bottom: 90px; /* Above mobile nav */
        left: 20px;
        width: 50px;
        height: 50px;
    }
    .floating-volunteer-btn i {
        font-size: 1.2rem;
    }
    .floating-volunteer-btn:hover {
        width: 50px; /* Disable expansion on mobile to avoid UI break */
        border-radius: 50%;
    }
    .floating-volunteer-btn:hover span {
        display: none;
    }
}

/* Mobile Bottom Navigation Styles */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px; /* Space for the bottom nav */
    }
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(74, 14, 14, 0.95); /* Match maroon theme */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 10px 0;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-nav-link i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-link.active {
    color: var(--gold);
}

/* Special Donate Button in Mobile Nav */
.donate-special {
    position: relative;
    top: -30px;
}

.icon-circle {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    border: 4px solid #4a0e0e; /* Match maroon bg */
    margin-bottom: 0 !important;
    transition: transform 0.3s ease;
}

.donate-special i {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.donate-special span {
    margin-top: 8px;
    color: var(--gold);
}

.donate-special:hover .icon-circle {
    transform: scale(1.1);
}

/* Modern Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 14, 14, 0.98); /* Maroon Theme */
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease;
}

.search-close:hover {
    transform: rotate(90deg);
    color: var(--gold);
}

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.search-overlay-form .form-control {
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--gold);
    border-radius: 0;
    color: #fff;
    font-size: 2rem;
    padding: 15px 0;
    box-shadow: none !important;
}

.search-overlay-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-trigger {
    font-size: 1.2rem;
    transition: color 0.3s ease;
    padding: 8px;
}

.search-trigger:hover {
    color: var(--gold) !important;
}

@media (max-width: 767.98px) {
    .search-overlay-form .form-control {
        font-size: 1.5rem;
    }
    .search-close {
        top: 20px;
        right: 20px;
    }
}

/* Live Search Results */
.live-search-results {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}

.live-result-item {
    display: block;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-result-item:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateX(10px);
}

.live-result-item .result-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    display: block;
    margin-bottom: 2px;
}

.live-result-item .result-title {
    font-weight: 600;
    font-size: 1.1rem;
}
