/*
================================================================================
File: ubec-common.css
Location: ubec_platform/static/css/ubec-common.css
================================================================================

UBEC Platform - Common Stylesheet

A unified CSS framework consolidating both design systems:
  1. Landing/Public Pages - Earth/Nature tones (--earth-*, --green-*)
  2. Dashboard/Admin Pages - Pastel palette (--pastel-*, --ubec-*)

USAGE:
  <link rel="stylesheet" href="/static/css/ubec-common.css">

Design System Selection:
  - Add class "theme-landing" to <body> for landing page aesthetics
  - Add class "theme-dashboard" to <body> for admin/dashboard aesthetics
  - Default inherits both systems via CSS variables

Copyright (C) 2024-2025 UBEC DAO

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

================================================================================

This project uses the services of Claude and Anthropic PBC to inform our
decisions and recommendations. This project was made possible with the
assistance of Claude and Anthropic PBC.

================================================================================
*/

/* ============================================================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================================================ */

:root {
    /* -------------------------------------------------------------------------
       UBEC Brand Colors (Primary)
       ------------------------------------------------------------------------- */
    --ubec-green: #4A7C23;
    --ubec-green-light: #6B9B3A;
    --ubec-green-dark: #2d5016;
    --ubec-green-darker: #1e3a0f;
    --ubec-green-soft: #E8F5E0;
    --ubec-gold: #D4A853;
    --ubec-gold-soft: #FDF6E3;

    /* -------------------------------------------------------------------------
       Earth/Nature Palette (Landing Pages)
       ------------------------------------------------------------------------- */
    --earth-dark: #5D4E37;
    --earth-medium: #8B7355;
    --earth-light: #C4A77D;
    --green-dark: #2D5016;
    --green-medium: #4A7C23;
    --green-light: #7CB342;
    --sky-light: #E8F4F8;

    /* -------------------------------------------------------------------------
       Pastel Palette (Dashboard/Admin)
       ------------------------------------------------------------------------- */
    --pastel-mint: #E0F2E9;
    --pastel-sky: #E3F2FD;
    --pastel-lavender: #F3E5F5;
    --pastel-peach: #FFF3E0;
    --pastel-rose: #FCE4EC;
    --pastel-lemon: #FFFDE7;

    /* -------------------------------------------------------------------------
       Background Colors
       ------------------------------------------------------------------------- */
    --bg-primary: #FAFBFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F4F8;
    --bg-light: #f8faf5;
    --bg-gradient-start: #f0f4e8;
    --bg-gradient-end: #e8f0e0;
    --white: #FFFFFF;

    /* -------------------------------------------------------------------------
       Text Colors
       ------------------------------------------------------------------------- */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-light: #A0AEC0;
    --text-dark: #333333;
    --text-color: #333333;

    /* -------------------------------------------------------------------------
       Border Colors
       ------------------------------------------------------------------------- */
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;
    --border: #e0e0e0;

    /* -------------------------------------------------------------------------
       Status Colors
       ------------------------------------------------------------------------- */
    --success: #48BB78;
    --success-bg: #E6FFED;
    --success-border: #9AE6B4;
    --success-color: #16a34a;

    --warning: #ED8936;
    --warning-bg: #FFFAF0;
    --warning-border: #FBD38D;
    --warning-color: #d97706;

    --error: #F56565;
    --error-bg: #FFF5F5;
    --error-border: #FEB2B2;
    --error-color: #dc2626;

    --info: #4299E1;
    --info-bg: #EBF8FF;
    --info-border: #90CDF4;

    /* -------------------------------------------------------------------------
       Shadows
       ------------------------------------------------------------------------- */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);

    /* -------------------------------------------------------------------------
       Border Radius
       ------------------------------------------------------------------------- */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --radius: 8px;

    /* -------------------------------------------------------------------------
       Transitions
       ------------------------------------------------------------------------- */
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.3s ease;

    /* -------------------------------------------------------------------------
       Typography
       ------------------------------------------------------------------------- */
    --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* -------------------------------------------------------------------------
       Spacing Scale
       ------------------------------------------------------------------------- */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* -------------------------------------------------------------------------
       Container Widths
       ------------------------------------------------------------------------- */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
}


/* ============================================================================
   CSS RESET & BASE STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Theme-specific body backgrounds */
body.theme-landing {
    font-family: var(--font-body);
    background: var(--white);
}

body.theme-dashboard {
    background: linear-gradient(135deg, var(--pastel-mint) 0%, var(--bg-primary) 50%, var(--pastel-sky) 100%);
    background-attachment: fixed;
}

body.theme-auth {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

/* Serif headings for landing pages */
body.theme-landing h1,
body.theme-landing h2,
body.theme-landing h3 {
    font-family: var(--font-serif);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}


/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }
.container-2xl { max-width: var(--container-2xl); }

.main-container {
    max-width: var(--container-2xl);
    margin: 0 auto;
    padding: var(--space-xl);
}


/* ============================================================================
   HEADER COMPONENTS
   ============================================================================ */

/* Standard Header (Dashboard/Admin style) */
.header {
    background: var(--bg-secondary);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
}

.header.header-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header.header-gradient {
    background: linear-gradient(135deg, var(--ubec-green) 0%, var(--ubec-green-darker) 100%);
    color: var(--white);
    border-bottom: none;
}

.header.header-primary {
    background: var(--ubec-green-dark);
    color: var(--white);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.header-brand:hover {
    opacity: 0.9;
}

.header-logo {
    font-size: 2rem;
    background: var(--pastel-mint);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
}

.header-gradient .header-logo,
.header-primary .header-logo {
    background: rgba(255,255,255,0.2);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ubec-green);
    letter-spacing: -0.5px;
}

.header-gradient .header-title,
.header-primary .header-title {
    color: var(--white);
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-gradient .header-subtitle,
.header-primary .header-subtitle {
    color: rgba(255,255,255,0.9);
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--ubec-green);
    background: var(--pastel-mint);
}

.nav-link.active {
    color: var(--ubec-green);
    background: var(--ubec-green-soft);
}

.header-gradient .nav-link,
.header-primary .nav-link {
    color: rgba(255,255,255,0.9);
}

.header-gradient .nav-link:hover,
.header-primary .nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.2);
}


/* ============================================================================
   LANGUAGE SWITCHER
   ============================================================================ */

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: var(--radius-full);
}

.lang-btn {
    padding: 0.4rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--bg-secondary);
    color: var(--ubec-green);
    box-shadow: var(--shadow-sm);
}

/* Light variant for gradient headers */
.header-gradient .lang-switcher,
.header-primary .lang-switcher {
    background: rgba(255,255,255,0.15);
}

.header-gradient .lang-btn,
.header-primary .lang-btn {
    color: rgba(255,255,255,0.8);
    border: 1px solid transparent;
}

.header-gradient .lang-btn:hover,
.header-primary .lang-btn:hover,
.header-gradient .lang-btn.active,
.header-primary .lang-btn.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}


/* ============================================================================
   PAGE HEADERS & TITLES
   ============================================================================ */

.page-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.page-header.page-header-left {
    text-align: left;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-icon {
    font-size: 2.5rem;
    background: var(--pastel-lavender);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: var(--space-sm);
    font-size: 1.05rem;
    font-weight: 500;
}

/* Section Titles (Landing pages) */
.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--earth-dark);
    margin-bottom: var(--space-sm);
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}


/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card.card-interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}

.card-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stat card color variants */
.stat-card.stat-sky {
    background: linear-gradient(135deg, var(--pastel-sky) 0%, var(--bg-card) 100%);
}
.stat-card.stat-mint {
    background: linear-gradient(135deg, var(--pastel-mint) 0%, var(--bg-card) 100%);
}
.stat-card.stat-lavender {
    background: linear-gradient(135deg, var(--pastel-lavender) 0%, var(--bg-card) 100%);
}
.stat-card.stat-peach {
    background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--bg-card) 100%);
}

/* Goal Cards (Landing pages) */
.goal-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform var(--transition-slow);
}

.goal-card:hover {
    transform: translateY(-5px);
}

.goal-card .icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.goal-card h3 {
    color: var(--earth-dark);
    margin-bottom: var(--space-sm);
}

.goal-card .metric {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-medium);
}


/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary button */
.btn-primary {
    background: var(--ubec-green);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--ubec-green-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary button */
.btn-secondary {
    background: transparent;
    color: var(--ubec-green);
    border: 2px solid var(--ubec-green);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--ubec-green);
    color: var(--white);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Danger button */
.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background: #e53e3e;
}

/* Success button */
.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
}

/* Light button (for dark backgrounds) */
.btn-light {
    background: var(--white);
    color: var(--earth-dark);
}

.btn-light:hover:not(:disabled) {
    background: var(--white);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Pill shaped buttons */
.btn-pill {
    border-radius: var(--radius-full);
}


/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ubec-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 35, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--error-color);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: var(--space-xs);
}


/* ============================================================================
   ALERTS & MESSAGES
   ============================================================================ */

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.alert-success {
    background: var(--success-bg);
    color: #166534;
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid var(--error-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid var(--warning-border);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border: 1px solid var(--info-border);
}


/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--ubec-green-soft);
    color: var(--ubec-green);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

/* Light badge (for dark backgrounds) */
.badge-light {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    backdrop-filter: blur(10px);
}


/* ============================================================================
   TABLES
   ============================================================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-tertiary);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}


/* ============================================================================
   GRIDS
   ============================================================================ */

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

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


/* ============================================================================
   HERO SECTION (Landing Pages)
   ============================================================================ */

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--earth-dark) 0%, var(--earth-medium) 50%, var(--green-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-icon {
    font-size: 5rem;
    margin-bottom: var(--space-md);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: var(--space-sm);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: 1.8rem;
    color: var(--earth-light);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.hero .tagline {
    font-size: 1.2rem;
    color: var(--white);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto var(--space-xl);
}

.hero-badges {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}


/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: var(--ubec-green-dark);
    color: var(--white);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
}

.footer.footer-earth {
    background: var(--earth-dark);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--earth-light);
    text-decoration: none;
    transition: color var(--transition-slow);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-info {
    color: var(--earth-light);
    font-size: 0.9rem;
}


/* ============================================================================
   AUTH PAGES (Login/Register)
   ============================================================================ */

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: var(--space-2xl);
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ubec-green);
    margin-bottom: var(--space-sm);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}


/* ============================================================================
   DOCUMENT CONTENT (Markdown rendering)
   ============================================================================ */

.document-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.document-content h2 {
    font-size: 1.5rem;
    color: var(--ubec-green-dark);
    margin-top: var(--space-lg);
    margin-bottom: 0.75rem;
}

.document-content h3 {
    font-size: 1.25rem;
    color: var(--ubec-green);
    margin-top: 1.25rem;
    margin-bottom: var(--space-sm);
}

.document-content p {
    margin-bottom: var(--space-md);
}

.document-content ul,
.document-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.document-content li {
    margin-bottom: var(--space-sm);
}

.document-content blockquote {
    border-left: 4px solid var(--ubec-green);
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.document-content a {
    color: var(--ubec-green);
    text-decoration: underline;
}

.document-content a:hover {
    color: var(--ubec-green-light);
}

.document-content code {
    background: #f4f4f4;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.document-content pre {
    background: #f4f4f4;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: var(--space-md) 0;
}

.document-content pre code {
    background: none;
    padding: 0;
}

.document-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
}

.document-content th,
.document-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.document-content th {
    background: var(--bg-light);
    font-weight: 600;
}


/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* Background colors */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-success { background-color: var(--success-bg); }
.bg-error { background-color: var(--error-bg); }
.bg-warning { background-color: var(--warning-bg); }

/* Spacing (margin) */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Spacing (padding) */
.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Font weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Font sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }

/* Border radius */
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Transitions */
.transition { transition: var(--transition); }


/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-container {
        padding: var(--space-md);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }

    .btn {
        width: 100%;
    }

    .auth-card {
        padding: var(--space-lg);
    }
}


/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .header,
    .footer,
    .nav-link,
    .btn,
    .lang-switcher {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
