/*
Theme Name: Preamble Foundation
Theme URI: https://preamblefoundation.org
Author: Preamble Foundation Team
Author URI: https://preamblefoundation.org
Description: A comprehensive WordPress theme for The Preamble Foundation - promoting civic literacy and constitutional education. Features full site editing, advanced customization, donation integration, and accessibility-first design.
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: preamble-foundation
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, full-site-editing, block-patterns, block-styles, wide-blocks, editor-styles, rtl-language-support, footer-widgets, blog, e-commerce

Preamble Foundation WordPress Theme, (C) 2025 Preamble Foundation
Preamble Foundation is distributed under the terms of the GPL.
*/

/* ==========================================================================
   ROOT VARIABLES & DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Primary Color Palette */
    --pf-primary: #1A4B80;
    --pf-primary-dark: #0f2f54;
    --pf-primary-light: #2d5fa0;
    
    /* Secondary Colors */
    --pf-secondary: #B8860B;
    --pf-secondary-dark: #9e7509;
    --pf-secondary-light: #d69e1e;
    
    /* Accent Colors */
    --pf-accent: #8B0000;
    --pf-accent-dark: #660000;
    --pf-accent-light: #a50000;
    
    /* Neutral Colors */
    --pf-white: #ffffff;
    --pf-light-gray: #f8f8f8;
    --pf-gray: #666666;
    --pf-dark-gray: #333333;
    --pf-black: #1a1a1a;
    
    /* Semantic Colors */
    --pf-success: #27AE60;
    --pf-warning: #F39C12;
    --pf-error: #E74C3C;
    --pf-info: #3498DB;
    
    /* Typography */
    --pf-font-heading: 'Merriweather', serif;
    --pf-font-body: 'Lato', sans-serif;
    --pf-font-mono: 'Fira Code', monospace;
    
    /* Spacing Scale */
    --pf-xs: 0.5rem;
    --pf-sm: 1rem;
    --pf-md: 1.5rem;
    --pf-lg: 2rem;
    --pf-xl: 3rem;
    --pf-xxl: 4rem;
    
    /* Border Radius */
    --pf-radius-sm: 4px;
    --pf-radius-md: 8px;
    --pf-radius-lg: 12px;
    --pf-radius-full: 50%;
    
    /* Shadows */
    --pf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --pf-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --pf-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --pf-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --pf-transition: all 0.3s ease;
    --pf-transition-fast: all 0.15s ease;
    --pf-transition-slow: all 0.5s ease;
    
    /* Container Widths */
    --pf-container-sm: 540px;
    --pf-container-md: 720px;
    --pf-container-lg: 960px;
    --pf-container-xl: 1140px;
    --pf-container-xxl: 1320px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--pf-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--pf-dark-gray);
    background-color: var(--pf-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pf-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--pf-primary);
    margin-bottom: var(--pf-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--pf-sm);
}

a {
    color: var(--pf-primary);
    text-decoration: none;
    transition: var(--pf-transition);
}

a:hover, a:focus {
    color: var(--pf-primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   LAYOUT HELPERS
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--pf-container-xl);
    margin: 0 auto;
    padding: 0 var(--pf-sm);
}

.container-sm { max-width: var(--pf-container-sm); }
.container-md { max-width: var(--pf-container-md); }
.container-lg { max-width: var(--pf-container-lg); }
.container-xxl { max-width: var(--pf-container-xxl); }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--pf-radius-md);
    transition: var(--pf-transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--pf-primary);
    color: var(--pf-white);
    border-color: var(--pf-primary);
}

.btn-primary:hover {
    background-color: var(--pf-primary-dark);
    border-color: var(--pf-primary-dark);
    color: var(--pf-white);
}

.btn-secondary {
    background-color: var(--pf-secondary);
    color: var(--pf-white);
    border-color: var(--pf-secondary);
}

.btn-secondary:hover {
    background-color: var(--pf-secondary-dark);
    border-color: var(--pf-secondary-dark);
    color: var(--pf-white);
}

.btn-accent {
    background-color: var(--pf-accent);
    color: var(--pf-white);
    border-color: var(--pf-accent);
}

.btn-accent:hover {
    background-color: var(--pf-accent-dark);
    border-color: var(--pf-accent-dark);
    color: var(--pf-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--pf-primary);
    border-color: var(--pf-primary);
}

.btn-outline:hover {
    background-color: var(--pf-primary);
    color: var(--pf-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--pf-md);
}

.form-label {
    display: block;
    margin-bottom: var(--pf-xs);
    font-weight: 600;
    color: var(--pf-dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--pf-radius-sm);
    transition: var(--pf-transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--pf-primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 128, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.main-navigation {
    background-color: var(--pf-primary);
    padding: var(--pf-sm) 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pf-white);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: var(--pf-md);
}

.navbar-nav a {
    color: var(--pf-white);
    font-weight: 500;
    padding: var(--pf-xs) var(--pf-sm);
    border-radius: var(--pf-radius-sm);
    transition: var(--pf-transition);
}

.navbar-nav a:hover,
.navbar-nav a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--pf-white);
    text-decoration: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--pf-white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pf-lg);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--pf-md);
    color: var(--pf-white);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: var(--pf-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */

.card {
    background: var(--pf-white);
    border-radius: var(--pf-radius-md);
    box-shadow: var(--pf-shadow-md);
    overflow: hidden;
    transition: var(--pf-transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pf-shadow-lg);
}

.card-header {
    padding: var(--pf-md);
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: var(--pf-md);
}

.card-footer {
    padding: var(--pf-md);
    border-top: 1px solid #eee;
}

/* ==========================================================================
   GRID SYSTEM
   ========================================================================== */

.grid {
    display: grid;
    gap: var(--pf-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--pf-xs); }
.mt-2 { margin-top: var(--pf-sm); }
.mt-3 { margin-top: var(--pf-md); }
.mt-4 { margin-top: var(--pf-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--pf-xs); }
.mb-2 { margin-bottom: var(--pf-sm); }
.mb-3 { margin-bottom: var(--pf-md); }
.mb-4 { margin-bottom: var(--pf-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--pf-xs); }
.p-2 { padding: var(--pf-sm); }
.p-3 { padding: var(--pf-md); }
.p-4 { padding: var(--pf-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 var(--pf-xs);
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin-bottom: var(--pf-sm);
    }
}

/* ==========================================================================
   WORDPRESS SPECIFIC STYLES
   ========================================================================== */

.alignleft {
    float: left;
    margin-right: var(--pf-md);
    margin-bottom: var(--pf-sm);
}

.alignright {
    float: right;
    margin-left: var(--pf-md);
    margin-bottom: var(--pf-sm);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
    padding: var(--pf-xs);
    background: var(--pf-light-gray);
    border-radius: var(--pf-radius-sm);
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--pf-gray);
    text-align: center;
    margin-top: var(--pf-xs);
}

/* ==========================================================================
   GUTENBERG BLOCK STYLES
   ========================================================================== */

.wp-block-button .wp-block-button__link {
    border-radius: var(--pf-radius-md);
    font-weight: 600;
}

.wp-block-separator {
    border-color: var(--pf-light-gray);
    margin: var(--pf-lg) 0;
}

.wp-block-quote {
    border-left: 4px solid var(--pf-primary);
    padding-left: var(--pf-md);
    font-style: italic;
}

.wp-block-pullquote {
    border-top: 4px solid var(--pf-primary);
    border-bottom: 4px solid var(--pf-primary);
    padding: var(--pf-md) 0;
}

/* ==========================================================================
   CUSTOMIZER PREVIEW STYLES
   ========================================================================== */

.customize-partial-edit-shortcut button {
    background: var(--pf-primary);
    color: var(--pf-white);
    border: none;
    border-radius: var(--pf-radius-full);
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.customize-partial-edit-shortcut button:hover {
    background: var(--pf-primary-dark);
}
