/*
Theme Name: ParlaJam
Theme URI: https://parlachat.net
Author: ParlaJam
Author URI: https://parlachat.net
Description: Custom theme for ParlaJam - Multi-Site Chat for WordPress. Modern glassmorphism design with full-width layouts.
Version: 1.0.0
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: parlajam
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
*/

/* ========================================
   CSS VARIABLES - ParlaJam Design System
   ======================================== */
:root {
    /* Primary Colors - Steel Blue Theme */
    --pj-hero: #4a6fa5;
    --pj-hero-rgb: 74, 111, 165;
    --pj-hero-dark: #3a5a8a;
    --pj-hero-light: #5a7fb5;

    /* Text Colors */
    --pj-text: #333333;
    --pj-text-light: #666666;
    --pj-text-muted: #888888;

    /* Background Colors */
    --pj-white: #ffffff;
    --pj-light: #f8fafc;
    --pj-gray-100: #f1f5f9;
    --pj-gray-200: #e2e8f0;
    --pj-dark: #1a1a2e;
    --pj-dark-light: #16213e;

    /* Accent Colors */
    --pj-success: #10b981;
    --pj-warning: #f59e0b;
    --pj-error: #ef4444;
    --pj-info: #3b82f6;

    /* Glassmorphism */
    --pj-glass-bg: linear-gradient(135deg,
        rgba(74, 111, 165, 0.12) 0%,
        rgba(74, 111, 165, 0.18) 25%,
        rgba(74, 111, 165, 0.12) 50%,
        rgba(74, 111, 165, 0.18) 75%,
        rgba(74, 111, 165, 0.12) 100%
    );
    --pj-glass-border: rgba(74, 111, 165, 0.4);
    --pj-glass-shadow:
        0 30px 60px rgba(74, 111, 165, 0.25),
        0 0 30px rgba(74, 111, 165, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);

    /* Shadows */
    --pj-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --pj-shadow: 0 4px 15px rgba(74, 111, 165, 0.15);
    --pj-shadow-lg: 0 15px 35px rgba(74, 111, 165, 0.2);
    --pj-shadow-xl: 0 25px 50px rgba(74, 111, 165, 0.25);

    /* Spacing */
    --pj-radius: 12px;
    --pj-radius-lg: 20px;
    --pj-radius-xl: 30px;

    /* Transitions */
    --pj-transition: all 0.3s ease;
    --pj-transition-slow: all 0.5s ease;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--pj-text);
    background: var(--pj-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--pj-text);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--pj-text-light);
}

a {
    color: var(--pj-hero);
    text-decoration: none;
    transition: var(--pj-transition);
}

a:hover {
    color: var(--pj-hero-dark);
}

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

/* ========================================
   LAYOUT
   ======================================== */
.pj-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.pj-container-wide {
    max-width: 1400px;
}

.pj-container-narrow {
    max-width: 800px;
}

/* Full Width */
.pj-full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* ========================================
   HEADER
   ======================================== */
.pj-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pj-gray-200);
    transition: var(--pj-transition);
}

.pj-header.scrolled {
    padding: 12px 0;
    box-shadow: var(--pj-shadow-sm);
}

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

/* Logo */
.pj-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pj-text);
}

.pj-logo:hover {
    color: var(--pj-hero);
}

.pj-logo svg {
    width: 40px;
    height: 40px;
}

.pj-logo-text {
    color: var(--pj-hero);
}

/* Navigation */
.pj-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.pj-nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.pj-nav-menu a {
    color: var(--pj-text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--pj-transition);
}

.pj-nav-menu a:hover {
    color: var(--pj-hero);
    border-bottom-color: var(--pj-hero);
}

.pj-nav-cta {
    display: flex;
    gap: 12px;
}

/* Mobile Menu Toggle */
.pj-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.pj-mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--pj-text);
    transition: var(--pj-transition);
}

/* ========================================
   BUTTONS
   ======================================== */
.pj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--pj-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--pj-transition);
    text-decoration: none;
    white-space: nowrap;
}

.pj-btn-primary {
    background: var(--pj-hero);
    color: var(--pj-white);
    border-color: var(--pj-hero);
}

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

.pj-btn-secondary {
    background: transparent;
    color: var(--pj-hero);
    border-color: var(--pj-hero);
}

.pj-btn-secondary:hover {
    background: var(--pj-hero);
    color: var(--pj-white);
}

.pj-btn-white {
    background: var(--pj-white);
    color: var(--pj-hero);
    border-color: var(--pj-white);
}

.pj-btn-white:hover {
    background: var(--pj-gray-100);
    color: var(--pj-hero-dark);
}

.pj-btn-large {
    padding: 16px 32px;
    font-size: 1rem;
}

.pj-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.pj-hero {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(180deg, var(--pj-light) 0%, var(--pj-white) 100%);
    overflow: hidden;
}

.pj-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(74, 111, 165, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pj-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.pj-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(74, 111, 165, 0.1);
    border: 1px solid rgba(74, 111, 165, 0.2);
    border-radius: 50px;
    color: var(--pj-hero);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.pj-hero-badge svg {
    width: 16px;
    height: 16px;
}

.pj-hero h1 {
    margin-bottom: 20px;
    color: var(--pj-text);
}

.pj-hero h1 span {
    color: var(--pj-hero);
}

.pj-hero-description {
    font-size: 1.25rem;
    color: var(--pj-text-light);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.pj-hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Stats */
.pj-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--pj-gray-200);
}

.pj-stat {
    text-align: center;
}

.pj-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pj-hero);
    margin-bottom: 4px;
}

.pj-stat-label {
    font-size: 0.875rem;
    color: var(--pj-text-muted);
}

/* ========================================
   SECTION STYLES
   ======================================== */
.pj-section {
    padding: 100px 0;
}

.pj-section-light {
    background: var(--pj-light);
}

.pj-section-dark {
    background: var(--pj-dark);
    color: var(--pj-white);
}

.pj-section-dark h2,
.pj-section-dark h3 {
    color: var(--pj-white);
}

.pj-section-dark p {
    color: rgba(255, 255, 255, 0.7);
}

.pj-section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.pj-section-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(74, 111, 165, 0.1);
    color: var(--pj-hero);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.pj-section-dark .pj-section-label {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pj-white);
}

.pj-section-title {
    margin-bottom: 16px;
}

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

/* ========================================
   FEATURES GRID
   ======================================== */
.pj-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pj-feature-card {
    padding: 32px;
    background: var(--pj-white);
    border: 1px solid var(--pj-gray-200);
    border-radius: var(--pj-radius-lg);
    transition: var(--pj-transition);
}

.pj-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pj-shadow-lg);
    border-color: transparent;
}

.pj-feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 111, 165, 0.1);
    border-radius: var(--pj-radius);
    margin-bottom: 20px;
    color: var(--pj-hero);
}

.pj-feature-icon svg {
    width: 28px;
    height: 28px;
}

.pj-feature-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.pj-feature-description {
    font-size: 0.95rem;
    color: var(--pj-text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ========================================
   STEPS / HOW IT WORKS
   ======================================== */
.pj-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.pj-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--pj-gray-200);
    z-index: 0;
}

.pj-step {
    position: relative;
    text-align: center;
    z-index: 1;
}

.pj-step-number {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pj-hero);
    color: var(--pj-white);
    font-size: 1.75rem;
    font-weight: 800;
    border-radius: 50%;
    margin: 0 auto 24px;
    box-shadow: var(--pj-shadow);
}

.pj-step-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.pj-step-description {
    font-size: 0.95rem;
    color: var(--pj-text-light);
    max-width: 280px;
    margin: 0 auto;
}

.pj-step-time {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--pj-success);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

/* ========================================
   PRICING
   ======================================== */
.pj-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.pj-pricing-card {
    position: relative;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pj-radius-lg);
    transition: var(--pj-transition);
}

.pj-pricing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.pj-pricing-card.featured {
    background: var(--pj-white);
    border-color: var(--pj-hero);
    box-shadow: var(--pj-shadow-xl);
}

.pj-pricing-card.featured .pj-pricing-name,
.pj-pricing-card.featured .pj-pricing-amount,
.pj-pricing-card.featured .pj-pricing-features li {
    color: var(--pj-text);
}

.pj-pricing-card.featured .pj-pricing-period {
    color: var(--pj-text-light);
}

.pj-pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--pj-hero);
    color: var(--pj-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.pj-pricing-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pj-pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.pj-pricing-currency {
    font-size: 1.25rem;
    font-weight: 600;
}

.pj-pricing-amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.pj-pricing-period {
    font-size: 1rem;
    opacity: 0.7;
}

.pj-pricing-savings {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--pj-success);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 24px;
}

.pj-pricing-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.pj-pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.pj-pricing-card.featured .pj-pricing-features li {
    border-color: var(--pj-gray-200);
}

.pj-pricing-features li:last-child {
    border-bottom: none;
}

.pj-pricing-features li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--pj-success);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.pj-pricing-card .pj-btn {
    width: 100%;
    margin-top: 8px;
}

/* ========================================
   CTA SECTION
   ======================================== */
.pj-cta {
    text-align: center;
    padding: 100px 0;
    background: var(--pj-light);
}

.pj-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.pj-cta-title {
    font-size: 2rem;
    margin-bottom: 16px;
}

.pj-cta-description {
    font-size: 1.1rem;
    color: var(--pj-text-light);
    margin-bottom: 32px;
}

/* ========================================
   FOOTER
   ======================================== */
.pj-footer {
    padding: 60px 0 30px;
    background: var(--pj-dark);
    color: rgba(255, 255, 255, 0.7);
}

.pj-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.pj-footer-brand {
    max-width: 280px;
}

.pj-footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pj-white);
    margin-bottom: 16px;
}

.pj-footer-logo span {
    color: var(--pj-hero-light);
}

.pj-footer-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.pj-footer-column h4 {
    color: var(--pj-white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.pj-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pj-footer-links li {
    margin-bottom: 12px;
}

.pj-footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    transition: var(--pj-transition);
}

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

.pj-footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pj-footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.pj-footer-social {
    display: flex;
    gap: 12px;
}

.pj-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--pj-transition);
}

.pj-footer-social a:hover {
    background: var(--pj-hero);
    color: var(--pj-white);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .pj-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .pj-container {
        padding: 0 20px;
    }

    .pj-mobile-toggle {
        display: flex;
    }

    .pj-nav-menu,
    .pj-nav-cta {
        display: none;
    }

    .pj-nav.active .pj-nav-menu {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--pj-white);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--pj-gray-200);
        box-shadow: var(--pj-shadow);
    }

    .pj-nav.active .pj-nav-cta {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 180px);
        left: 0;
        right: 0;
        background: var(--pj-white);
        padding: 24px;
        gap: 12px;
        border-bottom: 1px solid var(--pj-gray-200);
    }

    .pj-hero {
        padding: 120px 0 60px;
    }

    .pj-hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .pj-section {
        padding: 60px 0;
    }

    .pj-features-grid,
    .pj-steps,
    .pj-pricing-grid {
        grid-template-columns: 1fr;
    }

    .pj-steps::before {
        display: none;
    }

    .pj-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pj-footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */
.pj-glass-card {
    background: var(--pj-glass-bg);
    backdrop-filter: blur(25px) saturate(200%) contrast(1.2) brightness(1.1);
    -webkit-backdrop-filter: blur(25px) saturate(200%) contrast(1.2) brightness(1.1);
    border: 2px solid var(--pj-glass-border);
    border-radius: var(--pj-radius-lg);
    box-shadow: var(--pj-glass-shadow);
}

/* ========================================
   UTILITIES
   ======================================== */
.pj-text-center { text-align: center; }
.pj-text-left { text-align: left; }
.pj-text-right { text-align: right; }
.pj-text-hero { color: var(--pj-hero); }
.pj-mb-0 { margin-bottom: 0; }
.pj-mt-4 { margin-top: 1rem; }
.pj-mt-8 { margin-top: 2rem; }

/* ========================================
   PAGE CONTENT
   ======================================== */
.pj-page-main {
    padding: 140px 0 80px;
    min-height: 60vh;
}

.pj-page-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--pj-gray-200);
}

.pj-page-title {
    font-size: 2.25rem;
}

.pj-page-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.pj-page-content h2 {
    margin-top: 40px;
}

.pj-page-content h3 {
    margin-top: 32px;
}

.pj-page-content ul,
.pj-page-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.pj-page-content li {
    margin-bottom: 8px;
}

.pj-page-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--pj-light);
    border-left: 4px solid var(--pj-hero);
    border-radius: 0 var(--pj-radius) var(--pj-radius) 0;
}

.pj-page-content code {
    padding: 2px 8px;
    background: var(--pj-gray-100);
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
    color: var(--pj-hero-dark);
}

.pj-page-content pre {
    margin: 24px 0;
    padding: 20px;
    background: var(--pj-dark);
    border-radius: var(--pj-radius);
    overflow-x: auto;
}

.pj-page-content pre code {
    padding: 0;
    background: transparent;
    color: var(--pj-gray-100);
}

/* ========================================
   WORDPRESS BLOCK OVERRIDES
   ======================================== */
.wp-block-button__link {
    background: var(--pj-hero) !important;
    border-radius: var(--pj-radius) !important;
    padding: 12px 24px !important;
    transition: var(--pj-transition);
}

.wp-block-button__link:hover {
    background: var(--pj-hero-dark) !important;
}

.entry-content > * {
    max-width: 100%;
}
