/* ================================================
   Beauty Ziv — Base CSS
   Reset, Typography, Utilities
   ================================================ */

/* ═══ CSS Reset (Modern) ═══ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--text-dark);
    background-color: var(--cream-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══ Typography ═══ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-dark);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Display Font — for special headings */
.font-display {
    font-family: var(--font-display);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-medium);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--gold-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
    color: var(--gold-dark);
    text-decoration-color: var(--gold-dark);
}

/* קישורי ניווט ותפריט — ללא underline (עיצובי) */
.nav-link,
.footer-links a,
.btn,
.header-logo,
.sidebar-link {
    text-decoration: none !important;
}

strong, b {
    font-weight: var(--font-semibold);
}

small {
    font-size: var(--text-sm);
}

/* ═══ Lists ═══ */
ul, ol {
    list-style: none;
}

/* ═══ Images ═══ */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    object-fit: cover;
}

/* ═══ Form Elements Reset ═══ */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    background-color: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    width: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* ═══ Container ═══ */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

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

/* ═══ Section ═══ */
.section {
    padding: var(--space-16) 0;
}

.section-sm {
    padding: var(--space-10) 0;
}

.section-lg {
    padding: var(--space-20) 0;
}

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

.text-gold { color: var(--gold-primary); }
.text-dark { color: var(--text-dark); }
.text-medium { color: var(--text-medium); }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-white { color: #ffffff; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* ═══ Background Utilities ═══ */
.bg-cream { background-color: var(--cream-light); }
.bg-cream-dark { background-color: var(--cream); }
.bg-white { background-color: #ffffff; }
.bg-gold { background-color: var(--gold-primary); }
.bg-gold-light { background-color: var(--gold-light); }

/* ═══ Border Utilities ═══ */
.border { border: 1px solid var(--border-light); }
.border-gold { border-color: var(--gold-primary); }
.border-2 { border-width: 2px; }

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

/* ═══ Shadow Utilities ═══ */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow { box-shadow: var(--shadow-medium); }
.shadow-gold { box-shadow: var(--shadow-gold); }

/* ═══ Spacing Utilities ═══ */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* ═══ Flexbox Utilities ═══ */
.flex { display: flex; }
.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-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ═══ Grid Utilities ═══ */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══ Display Utilities ═══ */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

/* ═══ Width/Height ═══ */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ═══ Overflow ═══ */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ═══ Position ═══ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ═══ Visibility ═══ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══ Animations ═══ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fadeIn { animation: fadeIn var(--transition-base); }
.animate-fadeInUp { animation: fadeInUp var(--transition-slow); }
.animate-fadeInDown { animation: fadeInDown var(--transition-slow); }
.animate-scaleIn { animation: scaleIn var(--transition-base); }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ═══ Transition ═══ */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* ═══ Selection ═══ */
::selection {
    background-color: var(--gold-primary);
    color: white;
}

/* ═══ Scrollbar (WebKit) ═══ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}


/* ═══ Skip Navigation Link (נגישות) ═══ */
.skip-link {
    position: absolute;
    top: -100px;
    right: 0;
    background: var(--gold-primary);
    color: white;
    padding: 12px 24px;
    z-index: 99999;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    text-decoration: none !important;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #1a1a2e;
    outline-offset: 2px;
}

/* ═══ Focus States (Accessibility) ═══ */
:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}

/* ═══ Print Styles ═══ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
}
