/*
Theme Name: HEM Theme
Theme URI: https://eventin.live
Description: Custom theme for the Hybrid Event Manager platform — modern, responsive event management interface.
Version: 1.0.0
Author: Halfmind
Author URI: https://halfmind.ee
Text Domain: hem-theme
Domain Path: /languages
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
*/

/* ========================================
   Design System — CSS Custom Properties
   ======================================== */
:root {
    /* Colors */
    --hem-primary: #2563eb;
    --hem-primary-light: #3b82f6;
    --hem-primary-dark: #1d4ed8;
    --hem-secondary: #7c3aed;
    --hem-secondary-light: #8b5cf6;
    --hem-accent: #06b6d4;
    --hem-success: #10b981;
    --hem-warning: #f59e0b;
    --hem-danger: #ef4444;

    /* Neutrals */
    --hem-white: #ffffff;
    --hem-gray-50: #f9fafb;
    --hem-gray-100: #f3f4f6;
    --hem-gray-200: #e5e7eb;
    --hem-gray-300: #d1d5db;
    --hem-gray-400: #9ca3af;
    --hem-gray-500: #6b7280;
    --hem-gray-600: #4b5563;
    --hem-gray-700: #374151;
    --hem-gray-800: #1f2937;
    --hem-gray-900: #111827;

    /* Typography */
    --hem-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hem-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --hem-text-xs: 0.75rem;
    --hem-text-sm: 0.875rem;
    --hem-text-base: 1rem;
    --hem-text-lg: 1.125rem;
    --hem-text-xl: 1.25rem;
    --hem-text-2xl: 1.5rem;
    --hem-text-3xl: 1.875rem;
    --hem-text-4xl: 2.25rem;

    /* Spacing */
    --hem-space-1: 0.25rem;
    --hem-space-2: 0.5rem;
    --hem-space-3: 0.75rem;
    --hem-space-4: 1rem;
    --hem-space-5: 1.25rem;
    --hem-space-6: 1.5rem;
    --hem-space-8: 2rem;
    --hem-space-10: 2.5rem;
    --hem-space-12: 3rem;
    --hem-space-16: 4rem;

    /* Layout */
    --hem-container-max: 1280px;
    --hem-sidebar-width: 320px;
    --hem-header-height: 64px;

    /* Shadows */
    --hem-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --hem-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --hem-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --hem-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    /* Borders */
    --hem-radius-sm: 4px;
    --hem-radius: 6px;
    --hem-radius-md: 8px;
    --hem-radius-lg: 12px;
    --hem-radius-xl: 16px;
    --hem-radius-full: 9999px;

    /* Transitions */
    --hem-transition: 150ms ease;
    --hem-transition-slow: 300ms ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--hem-font-sans);
    font-size: var(--hem-text-base);
    line-height: 1.6;
    color: var(--hem-gray-800);
    background: var(--hem-gray-50);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--hem-primary);
    text-decoration: none;
    transition: color var(--hem-transition);
}
a:hover {
    color: var(--hem-primary-dark);
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--hem-gray-900);
    line-height: 1.3;
    margin-top: 0;
}

/* ========================================
   Layout
   ======================================== */
.hem-container {
    max-width: var(--hem-container-max);
    margin: 0 auto;
    padding: 0 var(--hem-space-6);
}

.hem-main-content {
    min-height: calc(100vh - var(--hem-header-height) - 200px);
    padding: var(--hem-space-8) 0;
}

/* ========================================
   Header
   ======================================== */
.hem-header {
    background: var(--hem-white);
    border-bottom: 1px solid var(--hem-gray-200);
    height: var(--hem-header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hem-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.hem-header__brand {
    display: flex;
    align-items: center;
    gap: var(--hem-space-3);
    font-size: var(--hem-text-xl);
    font-weight: 700;
    color: var(--hem-gray-900);
}
.hem-header__brand a {
    color: inherit;
    text-decoration: none;
}
.hem-header__brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    height: var(--hem-header-height);
}
img.custom-logo {
    height: 28px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 28px !important;
}

.hem-header__nav {
    display: flex;
    align-items: center;
    gap: var(--hem-space-6);
    list-style: none;
    padding: 0;
    margin: 0;
}

.hem-header__nav li {
    list-style: none;
    display: flex;
    align-items: center;
}

.hem-header__nav a {
    color: var(--hem-gray-600);
    font-weight: 500;
    font-size: var(--hem-text-sm);
    padding: var(--hem-space-2) 0;
    border-bottom: 2px solid transparent;
    transition: all var(--hem-transition);
}
.hem-header__nav a:hover,
.hem-header__nav a.current,
.hem-header__nav .current-menu-item a {
    color: var(--hem-primary);
    border-bottom-color: var(--hem-primary);
}

.hem-header__actions {
    display: flex;
    align-items: center;
    gap: var(--hem-space-4);
}

/* Language Switcher */
.hem-lang-switcher {
    display: flex;
    gap: var(--hem-space-1);
    border: 1px solid var(--hem-gray-200);
    border-radius: var(--hem-radius);
    overflow: hidden;
}
.hem-lang-switcher a,
.hem-lang-switcher span {
    padding: var(--hem-space-1) var(--hem-space-2);
    font-size: var(--hem-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--hem-gray-500);
    transition: all var(--hem-transition);
}
.hem-lang-switcher .current-lang {
    background: var(--hem-primary);
    color: var(--hem-white);
}
.hem-lang-switcher a:hover {
    background: var(--hem-gray-100);
}

/* Mobile hamburger */
.hem-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--hem-space-2);
    cursor: pointer;
}
.hem-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--hem-gray-700);
    margin: 5px 0;
    transition: var(--hem-transition);
}

/* ========================================
   Footer
   ======================================== */
.hem-footer {
    background: var(--hem-gray-900);
    color: var(--hem-gray-400);
    padding: var(--hem-space-12) 0 var(--hem-space-8);
}

.hem-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--hem-space-8);
    margin-bottom: var(--hem-space-8);
}

.hem-footer__brand {
    color: var(--hem-white);
    font-size: var(--hem-text-xl);
    font-weight: 700;
    margin-bottom: var(--hem-space-4);
}

.hem-footer h4 {
    color: var(--hem-white);
    font-size: var(--hem-text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--hem-space-4);
}

.hem-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hem-footer li {
    margin-bottom: var(--hem-space-2);
}
.hem-footer a {
    color: var(--hem-gray-400);
    font-size: var(--hem-text-sm);
}
.hem-footer a:hover {
    color: var(--hem-white);
}

.hem-footer__bottom {
    border-top: 1px solid var(--hem-gray-700);
    padding-top: var(--hem-space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--hem-text-sm);
}

/* ========================================
   Buttons
   ======================================== */
.hem-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--hem-space-2);
    padding: var(--hem-space-2) var(--hem-space-5);
    border: 1px solid transparent;
    border-radius: var(--hem-radius);
    font-family: var(--hem-font-sans);
    font-size: var(--hem-text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--hem-transition);
    text-decoration: none;
    line-height: 1.5;
}
.hem-btn--primary {
    background: var(--hem-primary);
    color: var(--hem-white);
}
.hem-btn--primary:hover {
    background: var(--hem-primary-dark);
    color: var(--hem-white);
}
.hem-btn--secondary {
    background: var(--hem-white);
    color: var(--hem-gray-700);
    border-color: var(--hem-gray-300);
}
.hem-btn--secondary:hover {
    background: var(--hem-gray-50);
    border-color: var(--hem-gray-400);
}
.hem-btn--large {
    padding: var(--hem-space-3) var(--hem-space-8);
    font-size: var(--hem-text-base);
}
.hem-btn--small {
    padding: var(--hem-space-1) var(--hem-space-3);
    font-size: var(--hem-text-xs);
    white-space: nowrap;
}

/* ========================================
   Cards
   ======================================== */
.hem-card {
    background: var(--hem-white);
    border: 1px solid var(--hem-gray-200);
    border-radius: var(--hem-radius-md);
    overflow: hidden;
    transition: box-shadow var(--hem-transition);
}
.hem-card:hover {
    box-shadow: var(--hem-shadow-md);
}
.hem-card__body {
    padding: var(--hem-space-5);
}

/* ========================================
   Hero Sections
   ======================================== */
.hem-hero {
    background: linear-gradient(135deg, var(--hem-primary) 0%, var(--hem-secondary) 100%);
    color: var(--hem-white);
    padding: var(--hem-space-16) 0;
    text-align: center;
}
.hem-hero h1 {
    color: var(--hem-white);
    font-size: var(--hem-text-4xl);
    margin-bottom: var(--hem-space-4);
}
.hem-hero p {
    font-size: var(--hem-text-lg);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--hem-space-8);
}

/* ========================================
   WordPress Required
   ======================================== */
.wp-caption {
    max-width: 100%;
}
.wp-caption-text {
    font-size: var(--hem-text-sm);
    color: var(--hem-gray-500);
}
.alignleft { float: left; margin-right: var(--hem-space-4); margin-bottom: var(--hem-space-4); }
.alignright { float: right; margin-left: var(--hem-space-4); margin-bottom: var(--hem-space-4); }
.aligncenter { display: block; margin: 0 auto var(--hem-space-4); }

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hem-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --hem-header-height: 56px;
    }

    .hem-header__nav {
        display: none;
        position: absolute;
        top: var(--hem-header-height);
        left: 0;
        right: 0;
        background: var(--hem-white);
        flex-direction: column;
        padding: var(--hem-space-4);
        border-bottom: 1px solid var(--hem-gray-200);
        box-shadow: var(--hem-shadow-lg);
    }
    .hem-header__nav.is-open {
        display: flex;
    }
    .hem-menu-toggle {
        display: block;
    }

    .hem-footer__grid {
        grid-template-columns: 1fr;
    }
    .hem-footer__bottom {
        flex-direction: column;
        gap: var(--hem-space-4);
        text-align: center;
    }

    .hem-hero h1 {
        font-size: var(--hem-text-3xl);
    }
}

/* Admin bar offset */
.admin-bar .hem-header {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .hem-header {
        top: 46px;
    }
}
