/**
 * Ziko.co.il - Design System Variables
 * Unified color palette and design tokens
 */

:root {
    /* === Primary Brand Colors === */
    --primary: #c41e3a;
    --primary-dark: #9f1831;
    --primary-light: #fef2f4;

    /* Accent aliases (for blog compatibility) */
    --accent: #c41e3a;
    --accent-dark: #a01830;
    --accent-light: #fee2e2;
    --legal-blue: #1e3a5f;
    --text-light: #888888;
    --bg-section: #f5f5f5;

    /* === Background Colors === */
    --bg: #f8fafb;
    --bg-alt: #f1f5f9;
    --bg-dark: #0f172a;
    --white: #ffffff;

    /* === Text Colors === */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-on-dark: rgba(255, 255, 255, 0.9);
    --text-on-dark-muted: rgba(255, 255, 255, 0.6);

    /* === Semantic Colors === */
    --success: #059669;
    --success-light: #ecfdf5;
    --success-dark: #047857;

    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --danger: #dc2626;
    --danger-light: #fef2f2;

    /* === Border & Shadows === */
    --border: #e2e8f0;
    --border-light: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.03), 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.04), 0 24px 60px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 12px rgba(196, 30, 58, 0.2), 0 8px 24px rgba(196, 30, 58, 0.25);
    --shadow-success-glow: 0 4px 12px rgba(5, 150, 105, 0.2), 0 8px 24px rgba(5, 150, 105, 0.25);

    /* === Border Radius === */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --radius-full: 100px;

    /* === Typography === */
    --font-family: 'Heebo', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;

    /* === Spacing === */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 100px;

    /* === Container === */
    --container-max: 1140px;
    --container-padding: 24px;

    /* === Header === */
    --header-height: 72px;

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

    /* === Z-Index Layers === */
    --z-header: 100;
    --z-modal: 200;
    --z-tooltip: 300;
}

/* === Base Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* === Container === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* === Section Tags (Consistent Styling) === */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 20px;
}

.section-tag--primary {
    background: var(--primary-light);
    color: var(--primary);
}

.section-tag--danger {
    background: var(--danger-light);
    color: var(--danger);
}

.section-tag--warning {
    background: var(--warning-light);
    color: var(--warning);
}

.section-tag--success {
    background: var(--success-light);
    color: var(--success);
}

/* === Section Headers === */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === Buttons (Global) === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, #e94560 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.2);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn--success {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.btn--success:hover {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-success-glow);
}

.btn--full {
    width: 100%;
}

/* === Form Inputs (Global) === */
.input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    transition: all var(--transition-normal);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(196, 30, 58, 0.1);
}

.input--ltr {
    direction: ltr;
    text-align: left;
}

/* === Cards (Global) === */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(226, 232, 240, 0.5);
}

/* === Icon Boxes === */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.icon-box--sm {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.icon-box--md {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.icon-box--lg {
    width: 64px;
    height: 64px;
    font-size: 26px;
}

.icon-box--primary {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-box--success {
    background: var(--success-light);
    color: var(--success);
}

.icon-box--warning {
    background: var(--warning-light);
    color: var(--warning);
}

.icon-box--danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* === Image Placeholders === */
.img-placeholder {
    background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    gap: var(--space-sm);
}

.img-placeholder i {
    font-size: 32px;
    opacity: 0.5;
}

/* === Section Depth === */
/* Subtle noise texture via SVG data URI */
.section-textured {
    position: relative;
}

.section-textured::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 0;
}

.section-textured > * {
    position: relative;
    z-index: 1;
}

/* Inset section feel for alternating bg sections */
.section-inset {
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04), inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

/* Gradient section dividers */
.section-divider-top {
    position: relative;
}

.section-divider-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-divider-bottom {
    position: relative;
}

.section-divider-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
