/**
 * Free Village Network - Main Stylesheet
 * A Social Ecosystem for Living Sovereignty
 */

:root {
    /* Colors - Earthy, natural palette */
    --color-primary: #2d5016;
    --color-primary-dark: #1a3009;
    --color-primary-light: #4a7c2a;
    --color-secondary: #8b6914;
    --color-accent: #d4a574;
    --color-accent-light: #e8c9a0;
    
    /* Neutrals - Dark Theme (Default) */
    --color-bg: #0f0f0f;
    --color-bg-light: #1a1a1a;
    --color-bg-card: #252525;
    --color-text: #f5f5f5;
    --color-text-secondary: #b0b0b0;
    --color-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 3rem;
    --font-size-4xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
}

/* Light Theme */
[data-theme="light"] {
    /* Light Theme Colors */
    --color-bg: #fafafa;
    --color-bg-light: #f5f5f5;
    --color-bg-card: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-border: rgba(0, 0, 0, 0.1);
    
    /* Adjusted shadows for light theme */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    padding-top: 80px; /* Space for fixed navbar */
}

@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Smaller navbar on mobile */
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.nav-brand a {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-brand a:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-text);
    background: rgba(212, 165, 116, 0.1);
}

.nav-links a.active {
    color: var(--color-accent);
    font-weight: 600;
    background: rgba(212, 165, 116, 0.15);
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    margin-left: var(--spacing-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.25rem;
}

.lang-switcher a {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.lang-switcher a.active {
    background: var(--color-primary);
    color: var(--color-text);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--spacing-sm);
    padding: 0.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
}

.theme-switcher:hover {
    background: var(--color-bg-light);
    border-color: var(--color-accent);
}

.theme-switcher-icon {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.theme-switcher:hover .theme-switcher-icon {
    transform: rotate(180deg);
}

/* Color Theme Randomizer Button */
.color-theme-randomizer {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    margin-left: var(--spacing-sm);
}

.color-theme-randomizer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.2), transparent);
    transition: left 0.5s ease;
}

.color-theme-randomizer:hover {
    background: var(--color-bg-light);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.color-theme-randomizer:hover::before {
    left: 100%;
}

.color-theme-randomizer:active {
    transform: translateY(0);
}

.color-theme-randomizer .theme-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.color-theme-randomizer:hover .theme-icon {
    transform: rotate(180deg) scale(1.2);
}

.color-theme-randomizer .theme-text {
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .color-theme-randomizer .theme-text {
        display: none;
    }
    .color-theme-randomizer {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
}

.lang-switcher a {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--color-bg-card);
    font-size: var(--font-size-sm);
}

.lang-switcher a.active {
    background: var(--color-primary);
    color: var(--color-text);
}

.btn-outline {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-bg-card);
    border-color: var(--color-accent);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(45, 80, 22, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 105, 20, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-light) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: var(--spacing-lg) 0;
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
}

.hero-tagline {
    font-size: var(--font-size-lg);
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Manifesto */
.manifesto {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-light);
}

.manifesto-text {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    font-style: italic;
}

/* Dimensions */
.dimensions {
    padding: var(--spacing-xl) 0;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.dimension-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-md);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dimension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.dimension-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

.dimension-card:hover::before {
    transform: scaleX(1);
}

.dimension-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.dimension-card h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.dimension-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.dimension-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.dimension-link:hover {
    color: var(--color-accent-light);
}

/* Activity Section */
.activity {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-light);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-md);
}

.activity-section h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
}

.posts-list,
.events-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.post-card,
.event-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--spacing-sm);
    transition: all 0.3s;
}

.post-card:hover,
.event-card:hover {
    border-color: var(--color-accent);
    transform: translateX(4px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.post-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.avatar,
.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-weight: 600;
}

.village-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--color-primary);
    border-radius: 4px;
    font-size: var(--font-size-sm);
    margin-left: var(--spacing-xs);
}

.post-content {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.event-card {
    display: flex;
    gap: var(--spacing-sm);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    background: var(--color-primary);
    border-radius: 8px;
    padding: var(--spacing-xs);
}

.event-day {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.event-month {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
}

.event-info h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

.event-location {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.empty-state {
    color: var(--color-text-secondary);
    text-align: center;
    padding: var(--spacing-md);
    font-style: italic;
}

.view-all {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--color-accent-light);
}

/* Villages Preview */
.villages-preview {
    padding: var(--spacing-xl) 0;
}

.villages-preview h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
    color: var(--color-accent);
    text-align: center;
}

.villages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.village-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-md);
    transition: all 0.3s;
}

.village-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.village-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.village-card p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.village-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.village-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.village-link:hover {
    color: var(--color-accent-light);
}

/* Footer */
.footer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent);
}

.footer-section a {
    display: block;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: var(--spacing-xs);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .dimensions-grid,
    .activity-grid,
    .villages-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

