/*
    Peace Alliance - Core Styles (Photographic Overhaul)
    Brand Palette:
    - Midnight Blue: #051c33 (Highest contrast for brand blue)
    - Action Blue: #1059b8 (Used for buttons/accents)
    - Emergency Red: #a81111 (Highest contrast brand red)
    - Action Yellow: #ffda4a (Contrast for dark backgrounds)
    - Black: #111111 (Pure professional text)
    - Off-White: #f8fafd
*/

:root {
    --color-primary: #051c33;
    --color-action-blue: #1059b8;
    --color-accent: #a81111;
    --color-yellow: #ffda4a;
    --color-text: #111111;
    --color-text-muted: #3d4349;
    --color-bg: #ffffff;
    --color-bg-alt: #f0f4f8;
    --color-border: #d0d7de;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    --header-height: 70px;
    --utility-height: 40px;
    --container-padding: 20px;
}

/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

a {
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

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

.img-responsive {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Layout Components */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-padding {
    padding: 60px 0;
}

@media (min-width: 768px) {
    .section-padding { padding: 100px 0; }
}

.bg-light { background-color: var(--color-bg-alt); }

.grid-12, .grid-3, .grid-2 {
    display: grid;
    gap: 30px;
}

.grid-3, .grid-2 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-12 { grid-template-columns: repeat(12, 1fr); }
}

/* Utility Bar */
.utility-bar {
    background-color: var(--color-primary);
    color: white;
    height: auto;
    min-height: var(--utility-height);
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 0;
}

.utility-content {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .utility-content { justify-content: flex-end; }
}

.utility-link {
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.utility-link:hover { color: var(--color-yellow); }

.vote-top-btn {
    background-color: var(--color-yellow);
    color: var(--color-primary);
    padding: 2px 12px;
    text-transform: uppercase;
    font-weight: 900;
    border-radius: 2px;
}

/* Header & Nav */
.global-header {
    background-color: white;
    height: auto; /* Changed from fixed height to auto */
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 9999; /* Increased to stay above all content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    height: var(--header-height); /* Maintain consistent nav height */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.3rem;
}

.brand-icon {
    color: var(--color-accent);
    margin-right: 8px;
    width: 28px;
}

.brand-text { color: var(--color-primary); }

/* Mobile Menu Toggle */
.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    position: relative;
    transition: background 0.3s;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.mobile-nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg) translate(5px, 6px); }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg) translate(5px, -6px); }

/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    padding: 100px 30px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
}

.main-nav.active { transform: translateX(0); }

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.nav-list a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

@media (min-width: 992px) {
    .mobile-nav-toggle { display: none; }
    
    .logo a { font-size: 1.6rem; }
    .brand-icon { width: 34px; }

    .main-nav {
        position: static;
        width: auto;
        max-width: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
        transform: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 35px;
    }

    .nav-list a { font-size: 0.9rem; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-large {
    width: 100%;
}

@media (min-width: 576px) {
    .btn-large { width: auto; padding: 18px 36px; }
}

.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover { background: #8c0d0d; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(168, 17, 17, 0.3); }

.btn-secondary { background: var(--color-primary); color: white; }
.btn-secondary:hover { background: #000; transform: translateY(-2px); }

.btn-vote { background: var(--color-yellow); color: var(--color-primary); }
.btn-vote:hover { background: #ffd11a; transform: translateY(-2px); }

/* Hero Section */
.hero-section { padding: 40px 0; }

.hero-grid { grid-template-columns: 1fr; text-align: center; }

@media (min-width: 992px) {
    .hero-section { padding: 80px 0; }
    .hero-grid { grid-template-columns: repeat(12, 1fr); text-align: left; align-items: center; }
}

.hero-content { grid-column: 1 / -1; }

@media (min-width: 992px) { .hero-content { grid-column: span 6; } }

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

@media (min-width: 768px) { h1 { font-size: 3.5rem; } }
@media (min-width: 1200px) { .hero-content h1 { font-size: 4.5rem; } }

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

@media (min-width: 768px) { .hero-content p { font-size: 1.25rem; } }

.hero-image-wrapper { grid-column: 1 / -1; margin-top: 40px; }

.hero-actions { display: flex; flex-direction: column; gap: 15px; }
@media (min-width: 576px) { .hero-actions { flex-direction: row; } }

@media (min-width: 992px) { .hero-image-wrapper { grid-column: span 6; margin-top: 0; } }

.hero-illustration {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

@media (min-width: 1200px) { .hero-illustration { height: 500px; } }

/* Priority Issues */
.section-header h2 { font-size: 2.2rem; text-align: center; }
.section-header p { text-align: center; color: var(--color-text-muted); max-width: 700px; margin: 0 auto 40px; }

@media (min-width: 768px) { .section-header h2 { font-size: 3rem; } }

.priority-issues-grid { margin-top: 60px; }

.issue-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.issue-card:hover { transform: translateY(-10px); }

.card-img-wrapper { height: 240px; }

.card-img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }

.card-content h3 { font-size: 1.4rem; }

.card-content p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }

.card-link { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; color: var(--color-primary); }
.card-link:hover { color: var(--color-accent); padding-left: 5px; }

/* Advocacy Section */
.advocacy-image img {
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.advocacy-text { padding: 0 20px; }

@media (max-width: 991px) {
    .advocacy-text { text-align: center; margin-top: 40px; }
}

/* Action Center */
.action-card { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

@media (min-width: 768px) { .action-card { padding: 40px; } }

.pledge-card { background: var(--color-primary); color: white; display: flex; flex-direction: column; justify-content: center; }
.pledge-card h3 { color: white; }

.action-label {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 4px;
}

.pledge-card .action-label { background: var(--color-yellow); color: var(--color-primary); }

.action-card p { margin-bottom: 25px; }
.pledge-card p { opacity: 0.9; font-size: 1.1rem; }

.action-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* News Feed */
.news-grid { margin-top: 60px; }

.news-card { background: white; border-bottom: 4px solid var(--color-border); transition: all 0.3s; border-radius: 8px 8px 0 0; }
.news-card:hover { border-color: var(--color-accent); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.news-img-placeholder { height: 200px; overflow: hidden; border-radius: 8px 8px 0 0; }
.news-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-img { transform: scale(1.05); }

.news-body { padding: 25px; }
.news-tag { color: var(--color-accent); font-weight: 800; text-transform: uppercase; font-size: 0.75rem; display: block; margin-bottom: 8px; }
.news-card h3 { font-size: 1.25rem; }

/* Footer */
.site-footer { background: var(--color-primary); color: white; padding: 80px 0 40px; }

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 60px; }

@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr; } }

.footer-logo { color: white; font-family: var(--font-heading); font-weight: 900; font-size: 2rem; margin-bottom: 20px; display: inline-flex; align-items: center; }
.footer-brand-text { color: var(--color-accent); margin-left: 5px; }

.footer-column p { opacity: 0.7; max-width: 450px; font-size: 1.1rem; line-height: 1.7; }

.footer-column h4 { color: white; font-size: 1.2rem; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-column h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--color-accent); }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 1rem; }
.footer-links a:hover { color: white; padding-left: 5px; }

/* Notifications */
.peace-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    color: var(--color-primary);
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 2000;
    border-left: 6px solid #4CAF50;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

@media (min-width: 576px) {
    .peace-notification { width: auto; max-width: 400px; left: auto; bottom: 40px; right: 40px; transform: translateX(120%); text-align: left; }
}

.peace-notification.show { transform: translateY(0); }
@media (min-width: 576px) { .peace-notification.show { transform: translateX(0); } }
