/*
 * MinutesInASecond - Simple, Clean Design
 * Colors: White, Light Gray, Dark Gray, One Accent (Blue)
 */

:root {
    /* Simple 4-color palette */
    --white: #ffffff;
    --light: #f5f5f5;
    --dark: #222222;
    --muted: #666666;
    --accent: #2563eb;
    --border: #e0e0e0;

    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Spacing */
    --gap: 1.5rem;
    --radius: 0.5rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    font-size: 16px;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
    color: var(--muted);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

.content {
    padding: var(--gap) 0;
}

/* ====================
   ONE CARD STYLE
   Reused everywhere
   ==================== */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
    margin-bottom: var(--gap);
}

.card:hover {
    border-color: var(--accent);
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    margin-bottom: 0;
}

/* Card as link */
a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.card:hover {
    text-decoration: none;
}

/* ====================
   HEADER / NAV
   ==================== */
header {
    background: var(--dark);
    color: var(--white);
    padding: 1rem 0;
}

header h1 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

header h1 a {
    color: var(--white);
}

header h1 a:hover {
    text-decoration: none;
    opacity: 0.9;
}

header p {
    color: rgba(255,255,255,0.8);
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--white);
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

nav a:hover {
    text-decoration: underline;
}

/* ====================
   BUTTONS
   ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

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

/* Legacy support for cta-button */
.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--white) !important;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
}

.cta-button:hover {
    background: #1d4ed8;
    text-decoration: none;
}

/* ====================
   HOMEPAGE
   ==================== */

/* Hero */
.home-hero {
    text-align: center;
    padding: 4rem var(--gap);
    background: var(--light);
}

.home-hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.home-hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.home-hero-tagline {
    color: var(--dark);
}

.home-hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.home-stats-mini {
    text-align: center;
}

.home-stats-mini .stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.home-stats-mini .stat-label-small {
    font-size: 0.875rem;
    color: var(--muted);
}

.text-danger { color: #dc2626; }
.text-success { color: #16a34a; }

/* How It Works */
.how-it-works {
    padding: 3rem var(--gap);
    background: var(--white);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.process-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    text-align: center;
    padding: 1rem;
    flex: 1;
    min-width: 150px;
}

.process-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.process-step h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.process-step p {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.process-arrow {
    color: var(--border);
    font-size: 1.5rem;
}

/* Benefits */
.benefits-section {
    padding: 3rem var(--gap);
    background: var(--light);
}

.benefits-section > h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.benefits-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
    max-width: 900px;
    margin: 0 auto;
}

.time-card {
    background: var(--accent);
    color: var(--white);
    padding: var(--gap);
    border-radius: var(--radius);
}

.time-card h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.time-card-content {
    color: rgba(255,255,255,0.9);
}

.time-card-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.time-card-stats .stat-number {
    font-size: 2rem;
    font-weight: 600;
}

.time-card-stats .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.benefits-list {
    list-style: none;
}

.benefits-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.check-icon {
    color: #16a34a;
    margin-right: 0.75rem;
    font-weight: bold;
}

/* Organizations showcase */
.orgs-showcase {
    padding: 3rem var(--gap);
    background: var(--white);
}

.orgs-showcase h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.orgs-showcase-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
}

.org-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.org-badge {
    background: var(--light);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.orgs-showcase-cta {
    text-align: center;
}

/* Testimonials */
.testimonials-section {
    padding: 3rem var(--gap);
    background: var(--light);
}

.testimonials-section > h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
}

.testimonial-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.testimonial-card h3 {
    margin-bottom: 0.75rem;
}

.testimonial-quote {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 1rem;
}

.testimonial-author {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Final CTA */
.final-cta {
    padding: 4rem var(--gap);
    background: var(--dark);
    color: var(--white);
    text-align: center;
}

.final-cta h2 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.final-cta-subtitle {
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
}

.final-cta-buttons {
    margin-bottom: 1.5rem;
}

.final-cta .cta-button {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.final-cta-footer {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

/* ====================
   ORGANIZATIONS PAGE
   ==================== */
.page-header {
    text-align: center;
    padding: 2rem 0;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header .lead {
    color: var(--muted);
    font-size: 1.1rem;
}

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

.org-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.org-card:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.org-card-header {
    background: var(--light);
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.org-logo {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.org-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--muted);
}

.org-card-body {
    padding: var(--gap);
}

.org-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.org-stats {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.org-card-footer {
    padding: 0.75rem var(--gap);
    border-top: 1px solid var(--border);
    background: var(--light);
}

.view-minutes {
    font-size: 0.875rem;
    color: var(--accent);
}

/* ====================
   ORGANIZATION DETAIL
   ==================== */
.org-hero-banner {
    background: var(--dark);
    color: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
}

.org-hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.org-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius);
}

.org-logo-placeholder-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.org-hero-text h1 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.org-hero-text .lead {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}

.org-stats-banner {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ====================
   MINUTES LIST
   ==================== */
.minutes-list {
    max-width: 800px;
    margin: 0 auto;
}

.minutes-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--gap);
    overflow: hidden;
}

.minutes-item[open] {
    border-color: var(--accent);
}

.minutes-item summary {
    cursor: pointer;
    padding: var(--gap);
    list-style: none;
}

.minutes-item summary::-webkit-details-marker {
    display: none;
}

.minutes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.minutes-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.minutes-expand-icon {
    color: var(--muted);
}

.minutes-content {
    padding: var(--gap);
    border-top: 1px solid var(--border);
    background: var(--light);
}

.minutes-meta {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.minutes-source {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.minutes-summary {
    margin: 1rem 0;
}

.disclaimer {
    font-size: 0.875rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 1rem;
}

/* ====================
   SEARCH & FILTERS
   ==================== */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-button {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.filter-container {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

.date-filter-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    color: var(--muted);
}

.date-input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.filter-button {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
}

/* ====================
   PAGINATION
   ==================== */
.pagination {
    margin: 2rem auto;
    max-width: 800px;
    text-align: center;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin-bottom: 1rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--dark);
    font-size: 0.875rem;
}

.pagination-link:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.pagination-current {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--muted);
}

/* ====================
   FOOTER
   ==================== */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 2rem var(--gap);
    text-align: center;
    margin-top: 3rem;
}

footer p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

footer a {
    color: rgba(255,255,255,0.9);
}

/* ====================
   FEEDS
   ==================== */
.feed-links {
    margin-top: 1rem;
}

.feed-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ff6600;
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.feed-link:hover {
    background: #e55500;
    text-decoration: none;
}

.feed-link-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 0.875rem;
}

.feed-link-enhanced:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

/* ====================
   ERROR PAGES
   ==================== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-container {
    text-align: center;
    max-width: 500px;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--muted);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.secondary-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--light);
    color: var(--dark);
    border-radius: var(--radius);
}

/* ====================
   TOPICS
   ==================== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--gap);
}

.topic-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
    display: block;
    color: inherit;
    text-decoration: none;
}

.topic-card:hover {
    border-color: var(--accent);
    text-decoration: none;
}

.topic-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.topic-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.topic-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent);
    color: var(--white);
    border-radius: 1rem;
    font-size: 0.875rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
}

.topic-header {
    background: var(--accent);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 2rem;
}

.topic-header h1 {
    color: var(--white);
}

.topic-header .lead {
    color: rgba(255,255,255,0.9);
}

/* ====================
   TIMELINE
   ==================== */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-filters {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.org-filter-select {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.timeline-year {
    margin-bottom: 2rem;
}

.year-marker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 1rem;
}

.year-heading {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 0;
}

.year-count {
    font-size: 0.875rem;
    color: var(--muted);
    background: var(--light);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.timeline-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.timeline-card:hover {
    border-color: var(--accent);
}

.timeline-card-header {
    padding: 1rem;
    background: var(--light);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-card-body {
    padding: 1rem;
}

.meeting-org {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.meeting-meta {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

/* ====================
   MARKDOWN CONTENT
   ==================== */
.markdown-content {
    padding: var(--gap);
    background: var(--light);
    border-top: 1px solid var(--border);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
    :root {
        --gap: 1rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }

    .home-hero {
        padding: 2rem var(--gap);
    }

    .home-hero-title {
        font-size: 1.75rem;
    }

    .home-hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .process-flow {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
    }

    .benefits-row {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .org-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .org-stats-banner {
        justify-content: center;
    }

    .error-code {
        font-size: 4rem;
    }
}

/* ====================
   ACCESSIBILITY
   ==================== */
:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ====================
   PRINT
   ==================== */
@media print {
    header, footer, nav, .dark-mode-toggle {
        display: none;
    }

    body {
        background: white;
    }
}
