/*
* איצאב מתכות - קובץ CSS ראשי
* גרסה: 2.0 - bronze/dark design system
*/

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&family=Frank+Ruhl+Libre:wght@400;500;700&display=swap');

/* === ריסט והגדרות בסיסיות === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f8f9fa;
    --text-color: #343a40;
    --primary-color: #c09f80;
    --dark-color: #212529;
    --light-gray: #e9ecef;
    --font-body: 'Assistant', sans-serif;
    --font-display: 'Frank Ruhl Libre', serif;

    /* Legacy aliases for page-specific CSS */
    --secondary-color: var(--primary-color);
    --accent-color: #a07f60;
    --light-bg: var(--bg-color);
    --dark-bg: var(--dark-color);
    --light-text: #fff;
    --border-color: var(--light-gray);
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --dark-max: #000;
    --header-height: 70px;

    /* Typography scale */
    --text-xs: clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 0.9375rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 1.875rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 2vw, 2.625rem);
    --leading-tight: 1.25;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    --prose-max: 65ch;
    --text-muted: #5a6268;
}

html {
    font-size: clamp(15px, 1vw + 14px, 18px);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-color);
    background-color: var(--bg-color);
}

main {
    padding-top: var(--header-height);
}

body.rtl {
    direction: rtl;
    text-align: right;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--dark-color);
    line-height: var(--leading-tight);
    margin-bottom: 1.5rem;
}

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

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: 1.5rem;
}

.prose {
    max-width: var(--prose-max);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}

.prose p {
    color: var(--text-muted);
}

.text-lead {
    max-width: var(--prose-max);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-muted);
}

section {
    padding: 6rem 0;
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    html.scroll-reveal-enabled section:not(.page-container):not(.map-section):not(.visible) {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
}

section.visible,
section.map-section,
.hero {
    opacity: 1;
    transform: translateY(0);
}

/* === נגישות === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--dark-color);
    padding: 0.8rem 1.5rem;
    border-radius: 0 0 5px 5px;
    z-index: 10002;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--dark-color);
}

.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;
}

/* === לחצנים === */
.cta-button,
.cta-button-secondary,
.submit-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    letter-spacing: 1.3px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--text-base);
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-radius: 5px;
}

.cta-button:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.submit-button {
    background-color: var(--primary-color);
    color: var(--dark-color);
    width: 100%;
    font-weight: 600;
}

.submit-button:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
}

/* === תפריט ניווט === */
.main-nav,
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    background-color: rgba(33, 37, 41, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    transition: top 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header .logo,
.logo a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--bg-color);
    text-decoration: none;
}

.app-header .logo img,
.logo a img {
    width: 5rem;
    height: auto;
}

.footer-logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--bg-color);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin: 0 0.5rem;
}

.rtl .nav-links li {
    margin: 0 0.5rem;
}

.ltr .nav-links li {
    margin: 0 0.5rem;
}

.nav-links a {
    font-size: var(--text-sm);
    font-weight: 300;
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    display: none;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switcher,
.language-switch {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-switcher button,
.language-switch button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-size: var(--text-xs);
    font-family: var(--font-body);
    border-radius: 3px;
}

.lang-switcher button:hover,
.lang-switcher button.active,
.language-switch button:hover,
.language-switch button.active {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.hamburger-button,
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.hamburger-button .line {
    width: 24px;
    height: 2px;
    background-color: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

.hamburger-button.is-active .line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-button.is-active .line:nth-child(2) {
    opacity: 0;
}

.hamburger-button.is-active .line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(33, 37, 41, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: opacity 0.3s ease-in-out, visibility 0s 0.3s linear, transform 0.3s ease-in-out;
}

.mobile-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease-in-out, visibility 0s 0s linear, transform 0.3s ease-in-out;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.mobile-nav-links a {
    color: var(--bg-color);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 400;
    transition: color 0.3s;
}

.mobile-nav-links a:hover {
    color: var(--primary-color);
}

/* === כותרות מקטעים === */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    color: var(--dark-color);
    font-family: var(--font-display);
    font-size: var(--text-2xl);
}

.section-subtitle {
    text-align: center;
    color: var(--dark-bg);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin-bottom: 5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin-bottom: .5rem;
}

/* === דף כותרת === */
.page-header {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 12rem 0 6rem;
    text-align: center;
    margin-bottom: 5rem;
}

.page-header h1 {
    margin-bottom: 1rem;
}

/* === פוטר === */
.footer,
.app-footer {
    background-color: var(--dark-color);
    color: var(--light-gray);
    font-size: var(--text-sm);
    padding: 3rem 0 2rem;
}

.footer-content,
.app-footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h4,
.footer-links h3,
.footer-contact h3 {
    color: var(--primary-color);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: var(--text-base);
}

.footer-logo h2,
.footer-logo .footer-brand {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--bg-color);
    margin-bottom: 0.5rem;
}

.footer-logo p,
.footer-column p {
    color: var(--light-gray);
    max-width: 25ch;
    margin-bottom: 0.5rem;
    font-size: var(--text-sm);
}

.footer-sitemap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-sitemap a,
.footer-links ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-sitemap a:hover,
.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--light-gray);
}

.footer-contact i {
    margin-left: 1rem;
    color: var(--primary-color);
}

.ltr .footer-contact i {
    margin-left: 0;
    margin-right: 1rem;
}

.footer-contact a {
    color: var(--light-gray);
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-top: 1rem;
}

.footer-socials a {
    color: var(--light-gray);
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-socials svg,
.footer-socials i {
    width: 22px;
    height: 22px;
    font-size: 2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
}

@media screen and (max-width: 820px) {
    :root {
        --header-height: 60px;
    }

    .nav-links {
        display: none;
    }

    .hamburger-button,
    .mobile-menu-toggle {
        display: flex;
    }

    .footer-content,
    .app-footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .footer-socials,
    .social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .logo a span {
        display: none;
    }
}

/* שיפור מראה לפוטר במובייל */
@media screen and (max-width: 768px) {
    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* הוספת flexbox לחלק התחתון של הפוטר */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* סגנון וידג'ט וואטסאפ */
.whatsapp-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes float-whatsapp {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1px);
    }
}

.whatsapp-button {
    display: flex;
    gap: 1rem;
    align-items: center;
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    will-change: transform;
    transition: transform 0.3s ease;
    animation:
        pulse-whatsapp 2s infinite,
        float-whatsapp 2s ease-in-out infinite;
}

.whatsapp-button:hover {
    transform: scale(1.05);
    background-color: #128C7E;
    animation: none;
}

.whatsapp-button i {
    font-size: 24px;
    margin-left: 10px;
}

.whatsapp-text {
    font-weight: 600;
    margin-right: 10px;
}

.rtl .whatsapp-button i {
    margin-left: 0;
    margin-right: 10px;
}

.rtl .whatsapp-text {
    margin-right: 0;
    margin-left: 10px;
}

/* הסתרת הטקסט במסכים קטנים */
@media screen and (max-width: 576px) {
    .whatsapp-button {
        padding: 0;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        justify-content: center;
    }

    .whatsapp-text {
        display: none;
    }

    .whatsapp-button i {
        margin: 0 !important;
    }
}

/* קישורים לרשתות חברתיות */
.social-links {
    display: flex;
    margin-top: 2rem;
    gap: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    color: var(--light-gray);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.social-links i {
    font-size: 2rem;
}

/* עיצוב של הצהרת נגישות */
.accessibility-statement {
    margin-top: 1rem;
}

.accessibility-statement a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.accessibility-statement a:hover {
    color: var(--light-text);
}

/* שיפור מראה לכפתור חזרה למעלה */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--dark-color);
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.ltr .back-to-top {
    right: auto;
    left: 20px;
}

/* שיפור מראה לפוטר במובייל */
@media screen and (max-width: 768px) {
    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* הוספת flexbox לחלק התחתון של הפוטר */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spacode-credit {
    text-align: center;
    padding-top: 1rem;
    margin-top: 1rem;
    width: 100%;
}

.spacode-credit a {
    color: var(--light-text);
    opacity: 0.7;
    font-size: var(--text-sm);
    transition: var(--transition);
}

.spacode-credit a:hover {
    opacity: 1;
    color: var(--secondary-color);
}