/**
 * Shared Styles for foraoregon.com
 * Rabbi Fora for Oregon Governor 2026
 * 
 * Design System:
 * - Coral/Salmon background
 * - Light Blue mountains/accents
 * - White text
 * - Bold, athletic, condensed typography
 * - Grassroots, energetic, outdoorsy vibe
 */

/* ============================================
   CSS Variables - Campaign Branding
   ============================================ */
:root {
    /* Primary Colors - From Campaign Banner */
    --coral: #F28C7F;           /* Coral/Salmon (Primary Background) */
    --coral-dark: #e07a6d;      /* Darker Coral (Hover states) */
    --mountain-blue: #94BCE2;   /* Light Blue (Mountains/Accents) */
    --mountain-blue-dark: #7aa0c7; /* Darker Blue (Hover states) */
    --white: #ffffff;           /* White (Text/Content backgrounds) */
    
    /* Legacy aliases for compatibility */
    --bg-primary: var(--coral);
    --brand-blue: var(--mountain-blue);
    --brand-blue-dark: var(--mountain-blue-dark);
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;        /* Light gray for content sections */
    
    /* Text Colors */
    --text-main: #1e293b;       /* Dark Slate (Body text) */
    --text-light: #ffffff;      /* White (On coral backgrounds) */
    
    /* Topographic texture color */
    --topo-blue: rgba(148, 188, 226, 0.08);
    
    /* Container widths */
    --container-max: 1200px;
    --content-max: 900px;
}

/* ============================================
   Dark Mode Variables
   ============================================ */
.dark {
    --bg-white: #0f172a;        /* Slate 900 */
    --bg-light: #1e293b;        /* Slate 800 */
    --text-main: #e2e8f0;       /* Slate 200 */
    --coral: #F28C7F;
    --mountain-blue: #94BCE2;
}

/* Dark mode body background */
.dark body,
.dark body.bg-light {
    background-color: #0f172a !important;
}

/* ============================================
   Dark Mode Styles - Main Content Only
   ============================================ */

/* Dark mode for main content wrapper on about/platform pages */
.dark #page-content {
    background-color: #0f172a;
}

/* Target all white backgrounds in page-content */
.dark #page-content .bg-white,
.dark #page-content div.bg-white,
.dark #page-content section .bg-white,
.dark #page-content main .bg-white,
.dark #page-content aside .bg-white {
    background-color: #1e293b !important;
}

/* Target slate-50 backgrounds (nested boxes) */
.dark #page-content .bg-slate-50 {
    background-color: #334155 !important;
}

/* Target rounded content boxes specifically */
.dark #page-content .rounded-2xl,
.dark #page-content .rounded-xl {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Nested rounded boxes should be slightly lighter */
.dark #page-content .rounded-lg.bg-slate-50,
.dark #page-content .rounded-lg.border {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

.dark #page-content .text-slate-900,
.dark #page-content .text-gray-900,
.dark #page-content h2.text-slate-900,
.dark #page-content h3.text-slate-900 {
    color: #f1f5f9 !important;
}

.dark #page-content .text-slate-600,
.dark #page-content .text-slate-700,
.dark #page-content .text-slate-800,
.dark #page-content .text-gray-600,
.dark #page-content .text-gray-700,
.dark #page-content div.text-slate-700,
.dark #page-content p,
.dark #page-content li,
.dark #page-content span:not(.bg-slate-900):not(.text-white) {
    color: #cbd5e1 !important;
}

/* Ensure strong/bold text is visible */
.dark #page-content strong {
    color: #f1f5f9 !important;
}

.dark #page-content .border-slate-200,
.dark #page-content .border-slate-100 {
    border-color: #334155 !important;
}

/* Dark mode for index.html content sections */
.dark #about,
.dark #platform {
    background-color: #0f172a !important;
}

.dark #about .bg-white,
.dark #platform .bg-white,
.dark #about .bg-slate-50,
.dark #platform .bg-slate-50 {
    background-color: #1e293b !important;
}

.dark #about .text-gray-900,
.dark #about .text-slate-900,
.dark #platform .text-gray-900,
.dark #platform .text-slate-900 {
    color: #f1f5f9 !important;
}

.dark #about .text-gray-600,
.dark #about .text-gray-700,
.dark #about .text-slate-600,
.dark #platform .text-gray-600,
.dark #platform .text-gray-700,
.dark #platform .text-slate-600 {
    color: #cbd5e1 !important;
}

.dark #about .text-gray-500,
.dark #platform .text-gray-500,
.dark #page-content .text-gray-500 {
    color: #94a3b8 !important;
}

.dark #about .border-slate-100,
.dark #about .border-slate-200,
.dark #platform .border-slate-100,
.dark #platform .border-slate-200,
.dark #page-content .border-slate-100,
.dark #page-content .border-slate-200 {
    border-color: #334155 !important;
}

/* Dark mode sidebar hover - darker text on coral background */
.dark #page-content aside a:hover,
.dark .sidebar-link:hover {
    color: #1e293b !important;
}

/* Sidebar link base styling in dark mode */
.dark #page-content .sidebar-link {
    color: #94a3b8;
}

/* Dark mode prose */
.dark #page-content .prose,
.dark #about .prose,
.dark #platform .prose {
    color: #cbd5e1;
}

.dark #page-content .prose strong,
.dark #about .prose strong,
.dark #platform .prose strong {
    color: #f1f5f9;
}

/* Dark mode for privacy page specific elements */
.dark #page-content .bg-brand-blue\/10,
.dark #page-content .bg-brand-blue\/20,
.dark #page-content .bg-amber-50,
.dark #page-content .bg-yellow-50,
.dark #page-content .bg-green-50,
.dark #page-content .bg-brand-salmon\/10 {
    background-color: #334155 !important;
}

/* Dark mode issue page section headers with icon circles */
.dark #page-content .flex.items-center.gap-4 h2 {
    color: #f1f5f9 !important;
}

/* Dark mode for CTA sections in issue pages */
.dark #page-content section.bg-brand-salmon {
    /* Keep brand salmon for CTAs - it's intentional visual contrast */
}

/* Dark mode tables */
.dark #page-content table {
    border-color: #475569 !important;
}

.dark #page-content thead {
    background-color: #334155 !important;
}

.dark #page-content tbody tr {
    border-color: #475569 !important;
}

.dark #page-content tbody tr.bg-slate-50 {
    background-color: #1e293b !important;
}

.dark #page-content th,
.dark #page-content td {
    color: #cbd5e1 !important;
}

/* Dark mode list items */
.dark #page-content .prose li {
    color: #cbd5e1 !important;
}

/* Dark mode heading text */
.dark #page-content h3,
.dark #page-content h4 {
    color: #f1f5f9 !important;
}

/* Dark mode for aside sidebar panel */
.dark #page-content aside > div {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark #page-content aside h3,
.dark #page-content aside h4 {
    color: #f1f5f9 !important;
}

.dark #page-content aside ul li {
    color: #94a3b8 !important;
}

/* ============================================
   Typography - Campaign Font Style
   ============================================ */
.font-campaign {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Base Styles
   ============================================ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
}

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

/* ============================================
   Container - Constrained Width on Desktop
   ============================================ */
.site-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

/* Main content container - slightly narrower than nav */
.content-container {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Brand Color Utility Classes
   ============================================ */

/* Coral/Salmon */
.bg-brand-salmon,
.bg-coral { 
    background-color: var(--coral); 
}
.text-brand-salmon,
.text-coral { 
    color: var(--coral); 
}
.border-brand-salmon,
.border-coral { 
    border-color: var(--coral); 
}

/* Mountain Blue */
.bg-brand-blue,
.bg-mountain-blue { 
    background-color: var(--mountain-blue); 
}
.bg-brand-blue:hover,
.bg-mountain-blue:hover { 
    background-color: var(--mountain-blue-dark); 
}
.text-brand-blue,
.text-mountain-blue { 
    color: var(--mountain-blue); 
}
.border-brand-blue,
.border-mountain-blue { 
    border-color: var(--mountain-blue); 
}

/* ============================================
   Button Styles - Athletic Feel
   ============================================ */

/* Primary Button - Light Blue with White text */
.btn-primary {
    display: inline-block;
    background-color: var(--mountain-blue);
    color: var(--white);
    padding: 0.875rem 2rem;
    border-radius: 0.375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid var(--mountain-blue);
}

.btn-primary:hover {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--coral);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Secondary Button - Ghost style with blue border */
.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--mountain-blue);
    padding: 0.875rem 2rem;
    border-radius: 0.375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 3px solid var(--mountain-blue);
}

.btn-secondary:hover {
    background-color: var(--mountain-blue);
    color: var(--white);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(148, 188, 226, 0.5);
}

/* White variant for coral backgrounds */
.btn-white {
    display: inline-block;
    background-color: var(--white);
    color: var(--coral);
    padding: 0.875rem 2rem;
    border-radius: 0.375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid var(--white);
}

.btn-white:hover {
    background-color: var(--mountain-blue);
    color: var(--white);
    border-color: var(--mountain-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(148, 188, 226, 0.5);
}

/* ============================================
   Mountain Divider - Section Separator (SVG-based)
   ============================================ */

/* Container for SVG mountain dividers */
.mountain-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.mountain-divider svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Height variants */
.mountain-divider-sm svg {
    height: 60px;
}

.mountain-divider-lg svg {
    height: 120px;
}

/* Positioned absolutely at bottom of section */
.mountain-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Positioned absolutely at top of section */
.mountain-divider-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: scaleY(-1);
}

/* ============================================
   Topographic Texture Background
   ============================================ */
.bg-topo {
    background-color: var(--white);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            var(--topo-blue) 40px,
            var(--topo-blue) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            var(--topo-blue) 40px,
            var(--topo-blue) 41px
        );
}

/* Subtle curved topo lines */
.bg-topo-curves {
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q 25 30, 50 50 T 100 50' fill='none' stroke='%2394BCE2' stroke-opacity='0.1' stroke-width='1'/%3E%3Cpath d='M0 70 Q 25 50, 50 70 T 100 70' fill='none' stroke='%2394BCE2' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpath d='M0 30 Q 25 10, 50 30 T 100 30' fill='none' stroke='%2394BCE2' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E");
}

/* ============================================
   Quote Block - Candidate Quotes
   ============================================ */
.quote-block {
    position: relative;
    background-color: var(--coral);
    padding: 3rem;
    border-radius: 1rem;
}

.quote-block::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--mountain-blue);
    line-height: 1;
    opacity: 0.8;
}

.quote-block p {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.6;
    margin-left: 2rem;
}

.quote-block cite {
    display: block;
    color: var(--white);
    font-weight: 700;
    margin-top: 1rem;
    margin-left: 2rem;
    font-style: normal;
}

/* ============================================
   Issue Icons - Monoline Style
   ============================================ */
.issue-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(148, 188, 226, 0.15);
    border-radius: 0.75rem;
    color: var(--mountain-blue);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.issue-icon:hover,
.group:hover .issue-icon {
    background-color: var(--coral);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(242, 140, 127, 0.4);
}

/* ============================================
   Card Styles
   ============================================ */
.card {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.2);
    border-color: var(--mountain-blue);
}

.card-coral {
    background-color: var(--coral);
    color: var(--white);
}

.card-blue {
    background-color: var(--mountain-blue);
    color: var(--text-main);
}

/* ============================================
   FAQ / Details Components
   ============================================ */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details[open] > summary {
    border-bottom-color: var(--mountain-blue);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.5s ease-out;
}

/* ============================================
   Prose / Content Styling
   ============================================ */
.prose a {
    color: var(--coral);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--mountain-blue);
}

.prose strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--mountain-blue);
    box-shadow: 0 0 0 3px rgba(148, 188, 226, 0.3);
}

/* ============================================
   Navigation Link Hover - Refined Header
   ============================================ */
.nav-link {
    position: relative;
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--white);
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

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

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

.nav-link.active::after {
    width: 100%;
    background-color: var(--white);
}

/* ============================================
   Footer Mountain Silhouette
   ============================================ */
.footer-mountains {
    position: relative;
    height: 60px;
    background: linear-gradient(to bottom, transparent 0%, var(--coral) 100%);
}

.footer-mountains::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--mountain-blue);
    clip-path: polygon(
        0% 100%,
        5% 60%,
        15% 80%,
        25% 40%,
        35% 70%,
        45% 30%,
        55% 60%,
        65% 20%,
        75% 50%,
        85% 35%,
        95% 55%,
        100% 100%
    );
    opacity: 0.6;
}

/* ============================================
   Citation Styles
   ============================================ */

/* Superscript citation links */
sup.citation a,
sup a[href^="#ref-"] {
    color: var(--mountain-blue);
    text-decoration: none;
    font-size: 0.75em;
    font-weight: 600;
    padding: 0 0.1em;
}

sup.citation a:hover,
sup a[href^="#ref-"]:hover {
    color: var(--coral);
    text-decoration: underline;
}

/* Bibliography section */
.bibliography {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--mountain-blue);
}

.bibliography h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.bibliography ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    counter-reset: bibliography;
}

.bibliography li {
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bibliography li a {
    color: var(--mountain-blue);
    word-break: break-all;
}

.bibliography li a:hover {
    color: var(--coral);
}

/* Dark mode bibliography */
.dark .bibliography {
    border-top-color: #475569;
}

.dark .bibliography h3 {
    color: #f1f5f9;
}

.dark .bibliography li {
    color: #cbd5e1;
}

.dark .bibliography li a {
    color: var(--mountain-blue);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    site-nav,
    site-footer,
    .mountain-divider {
        display: none;
    }
    
    body {
        background: white !important;
        color: black;
    }
    
    .site-wrapper {
        box-shadow: none;
        max-width: 100%;
    }
}
