/*
 * ============================================
 * CSS Variables & Base Styles
 * ============================================
 */
:root {
    --color-primary: #a5864f;   /* Main Metallic Gold */
    --color-secondary: #001F3F; /* Dark Blue */
    --color-accent: #E0E0E0;   /* Light Gray / White */
    --color-text: #E0E0E0;     /* Light Gray / White */
    --color-background: #0A0A0A; /* Black */
    --color-border: #4d4d4d;
    --font-heebo: 'Heebo', sans-serif; /* Changed to Heebo for Hebrew */
    --font-mono: 'Roboto Mono', monospace;
    --shadow-dark: 0 8px 30px rgba(0, 0, 0, 0.7);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.4);
    --radius-xl: 16px;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --focus-ring: 3px solid rgba(255, 215, 0, 0.5); /* Enhanced focus ring */
    --interactive-glow: 0 10px 40px rgba(255, 215, 0, 0.10);
    --color-text-strong: #FFFFFF;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-heebo);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    direction: ltr;
    text-align: left;
    overflow-x: hidden;
}

/* RTL-specific adjustments for Hebrew language */
html[lang="he"] body {
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0; /* Reduced padding for a more compact look */
}

.section-head {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.section-sub {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

/*
 * ============================================
 * Accessibility Toolbar Styles
 * ============================================
 */
.accessibility-toolbar {
    position: fixed;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 1000;
}

html[lang="he"] .accessibility-toolbar {
    right: auto;
    left: 10px;
}

.accessibility-btn {
    background-color: var(--color-primary);
    color: var(--color-background);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accessibility-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.7);
}

.accessibility-options {
    position: absolute;
    top: 50%;
    right: 55px;
    transform: translateY(-50%);
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    visibility: visible;
    opacity: 1;
    transition: all 0.3s ease;
}

html[lang="he"] .accessibility-options {
    right: auto;
    left: 55px;
}

.accessibility-options.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.access-option button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 0.4rem;
    border-radius: var(--radius-md);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.access-option button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
}

.access-option button i {
    font-size: 1.1rem;
}

/* High Contrast Mode */
.high-contrast {
    --color-primary: #FFFF00; /* Yellow */
    --color-secondary: #000000;
    --color-accent: #FFFFFF;
    --color-text: #FFFFFF;
    --color-background: #000000;
    --color-border: #FFFFFF;
}

.high-contrast a, .high-contrast .btn-ghost {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.high-contrast .btn-ghost:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
}
.high-contrast .site-header {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(0);
}

/* Inverted Colors Mode */
.inverted-colors {
    filter: invert(100%) hue-rotate(180deg);
}

.inverted-colors .site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/*
 * ============================================
 * Button Styles
 * ============================================
 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem; /* Slightly smaller */
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem; /* Slightly smaller font */
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-background);
    color: var(--color-primary);
    box-shadow: var(--interactive-glow);
    transform: translateY(-2px); /* Smaller transform */
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background-color: var(--color-text);
    color: var(--color-background);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.btn-inline {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/*
 * ============================================
 * Animations & Effects
 * ============================================
 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s forwards cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }
.fade-in:nth-child(4) { animation-delay: 0.8s; }

.shine {
    background: linear-gradient(
            90deg,
            var(--color-text) 0%,
            var(--color-text) 50%,
            var(--color-primary) 70%,
            var(--color-text) 90%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.glitch-text {
    font-family: var(--font-mono);
    position: relative;
    font-size: 2.2rem; /* Reduced font size */
    font-weight: 700;
    color: var(--color-text);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-primary);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-secondary);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { transform: none; opacity: 0.8; }
    25% { transform: translate(-2px, 2px); opacity: 0.7; }
    50% { transform: translate(1px, -1px); opacity: 0.9; }
    75% { transform: translate(-1px, 1px); opacity: 0.8; }
    100% { transform: none; opacity: 0.75; }
}

@keyframes glitch-anim-2 {
    0% { transform: none; opacity: 0.8; }
    25% { transform: translate(1px, -1px); opacity: 0.9; }
    50% { transform: translate(-2px, 2px); opacity: 0.7; }
    75% { transform: translate(2px, -2px); opacity: 0.85; }
    100% { transform: none; opacity: 0.7; }
}

.tilt {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.tilt:hover {
    transform: perspective(1000px) rotateX(1deg) rotateY(-1deg) scale(1.01); /* Reduced tilt and scale */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/*
 * ============================================
 * Header & Navigation
 * ============================================
 */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    color: var(--color-text);
    font-family: var(--font-heebo);
    font-weight: 700;
    font-size: 1.15rem; /* Original font size for brand text */
}
.logo{
    width: 150px; /* שנה את הערך לרוחב הרצוי */

}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links .btn {
    margin-left: 1.25rem;
}

.nav-toggle, .nav-burger {
    display: none;
}

/* Specific styles for Hebrew language (he) */
html[lang="he"] .nav-links {
    flex-direction: row-reverse;
}

html[lang="he"] .brand-mark {
    margin-right: 0;
    margin-left: 0.4rem;
}

html[lang="he"] .nav-links .btn {
    margin-left: 0;
    margin-right: 1.25rem;
}

html[lang="he"] .hero-bullets li i,
html[lang="he"] .project-meta i {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[lang="he"] .timeline::before {
    right: 0;
    left: auto;
}

html[lang="he"] .t-item {
    padding-left: 0;
    padding-right: 2rem;
}

html[lang="he"] .step {
    left: auto;
    right: -2.5rem;
}

html[lang="he"] .faq summary {
    padding-right: 2rem;
    padding-left: 0;
}

html[lang="he"] .faq summary::after {
    left: auto;
    right: 0;
}

html[lang="he"] .contact-form .form-note i {
    margin-right: 0;
    margin-left: 0.5rem;
}

@media (max-width: 992px) {
    .nav-burger {
        display: block;
        cursor: pointer;
        z-index: 1001;
        position: relative;
        width: 30px;
        height: 20px;
    }

    .nav-burger span,
    .nav-burger::before,
    .nav-burger::after {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-text);
        transition: all 0.3s ease;
    }

    .nav-burger::before {
        position: absolute;
        top: 0;
    }

    .nav-burger::after {
        position: absolute;
        bottom: 0;
    }

    .nav-burger span {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
    }

    html[lang="he"] .nav-links {
        left: auto;
        right: -100%;
        align-items: flex-end;
        transition: right 0.3s ease;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        font-size: 1.15rem; /* Reduced font size */
        padding: 0.75rem 0;
        display: block;
    }

    #nav-toggle:checked ~ .nav-links {
        left: 0;
    }

    html[lang="he"] #nav-toggle:checked ~ .nav-links {
        right: 0;
    }

    #nav-toggle:checked ~ .nav-burger span {
        opacity: 0;
    }

    #nav-toggle:checked ~ .nav-burger::before {
        top: 50%;
        transform: rotate(45deg);
    }

    #nav-toggle:checked ~ .nav-burger::after {
        bottom: 50%;
        transform: rotate(-45deg);
    }
}

/*
 * ============================================
 * Language Switcher Styles
 * ============================================
 */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

html[lang="he"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

.dropdown-toggle {
    background-color: var(--color-background);
    color: var(--color-text);
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

html[lang="he"] .dropdown-toggle {
    flex-direction: row-reverse;
}

.dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
}

.flag-icon {
    font-size: 1.1em;
    line-height: 1;
    width: 1.1em;
    height: 1.1em;
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
    margin-right: 0.25rem;
}

html[lang="he"] .flag-icon {
    margin-right: 0;
    margin-left: 0.25rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background-color: var(--color-background);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 160px; /* Smaller min-width */
    list-style: none;
}

html[lang="he"] .dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li a {
    color: var(--color-text);
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
}

html[lang="he"] .dropdown-menu li a {
    flex-direction: row-reverse;
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
}

/*
 * ============================================
 * Hero Section
 * ============================================
 */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    background-image: url('img.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeIn 1.5s forwards;
    animation-delay: 0.5s;
}

.hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Reduced max font size */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.hero-heading-strong {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Reduced max font size */
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(244, 209, 12, 0.3), 0 0 5px rgba(255, 215, 0, 0.1);
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.1rem); /* Reduced font size */
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-weight: 300;
}

.hero-ctas {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.hero-bullets {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem; /* Reduced gap */
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

.hero-bullets li i {
    color: var(--color-primary);
    margin-right: 0.5rem;
}

.hero-visual {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) saturate(1.2);
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.25), rgba(10, 10, 10, 0.6));
    pointer-events: none;
}

.shape-divider {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px; /* Reduced height */
    background: linear-gradient(to top, var(--color-background), transparent);
    z-index: -1;
}

/*
 * ============================================
 * About Section
 * ============================================
 */
.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; /* Reduced gap */
    margin: 2rem 0;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-card {
    background-color: var(--color-secondary);
    padding: 1.5rem; /* Reduced padding */
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    text-align: center;
    box-shadow: var(--shadow-dark);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-4px); /* Smaller transform */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.about-card i {
    font-size: 2.5rem; /* Reduced icon size */
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.about-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

.about-card h3,
.about-card summary {
    font-size: 1.35rem; /* Reduced font size */
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    font-weight: bold;
    cursor: pointer;
}

.about-card p {
    color: var(--color-accent);
    font-weight: 300;
    line-height: 1.5;
    font-size: 0.95rem;
}

/*
 * ============================================
 * Stats Section
 * ============================================
 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
    background-color: var(--color-secondary);
    padding: 1.5rem; /* Reduced padding */
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-dark);
}

.stat-num {
    font-size: 2.2rem; /* Reduced font size */
    font-weight: 800;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.9rem; /* Reduced font size */
    color: var(--color-text);
}

/*
 * ============================================
 * Projects Section
 * ============================================
 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Min-width adjusted */
    gap: 1.5rem; /* Reduced gap */
}

.project {
    background-color: var(--color-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.project-media {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.project-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.8);
}

.project:hover .project-media img {
    transform: scale(1.03); /* Reduced scale */
}

.project-body {
    padding: 1.25rem; /* Reduced padding */
    text-align: left;
}

.project-body h3 {
    font-size: 1.35rem; /* Reduced font size */
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.project-meta {
    list-style: none;
    font-size: 0.85rem; /* Reduced font size */
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.project-meta li {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.project-meta i {
    color: var(--color-primary);
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/*
 * ============================================
 * Timeline Section
 * ============================================
 */
.timeline {
    list-style: none;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 1.5rem; /* Adjusted padding */
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: var(--color-border);
}

.t-item {
    position: relative;
    margin-bottom: 2.5rem; /* Reduced margin */
    padding-left: 1.5rem;
}

.step {
    position: absolute;
    top: 0;
    left: -2rem; /* Adjusted position */
    width: 35px; /* Reduced size */
    height: 35px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-background);
    font-weight: 700;
    border: 2px solid var(--color-background);
    box-shadow: var(--shadow-dark);
}

.t-card {
    background-color: var(--color-secondary);
    padding: 1.25rem; /* Reduced padding */
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-dark);
}

.t-card h3 {
    font-size: 1.15rem; /* Reduced font size */
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.t-card p {
    color: var(--color-text);
}

.t-more {
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.75rem;
}

.t-more summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--color-primary);
}

.t-more p {
    margin-top: 0.5rem;
}

/*
 * ============================================
 * FAQ Section
 * ============================================
 */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Min-width adjusted */
    gap: 1.25rem;
}

.faq {
    background-color: var(--color-secondary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-dark);
}

.faq summary {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    padding-left: 1.5rem;
    position: relative;
    outline: none;
}

.faq summary:focus-visible {
    outline: var(--focus-ring);
    border-radius: 6px;
}

.faq summary::after {
    content: '+';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.25rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq[open] summary::after {
    transform: rotate(45deg);
}

.faq p {
    margin-top: 0.75rem;
    color: var(--color-accent);
    font-weight: 300;
}

/*
 * ============================================
 * Contact Section
 * ============================================
 */
.contact-form {
    background-color: var(--color-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    max-width: 500px; /* Reduced max-width */
    margin: 0 auto;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-4px); /* Smaller transform */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.contact-form h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-align: center;
}

.contact-form p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-align: center;
}

.contact-form label {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-heebo);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--interactive-glow);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-submit {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-background);
    border: 2px solid var(--color-primary);
    padding: 0.75rem 2rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.contact-form .btn-submit:hover,
.contact-form .btn-submit:focus {
    background-color: var(--color-background);
    color: var(--color-primary);
    box-shadow: var(--interactive-glow);
    transform: translateY(-2px);
}

.contact-form .form-note {
    font-size: 0.8rem;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.contact-form .form-note i {
    color: var(--color-primary);
    margin-right: 0.5rem;
}

/*
 * ============================================
 * Footer
 * ============================================
 */
.site-footer {
    background-color: var(--color-secondary);
    padding: 1.5rem 0; /* Reduced padding */
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

html[lang="he"] .footer-inner {
    flex-direction: row-reverse;
}

.site-footer p {
    font-size: 0.8rem; /* Reduced font size */
    color: var(--color-accent);
    font-weight: 300;
}

.social {
    display: flex;
    gap: 0.75rem; /* Reduced gap */
}

.social a {
    color: var(--color-text);
    font-size: 1.1rem; /* Reduced font size */
    transition: color 0.3s ease;
}

.social a:hover {
    color: var(--color-primary);
}

/*
 * ============================================
 * Modal
 * ============================================
 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
}

.modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    color: var(--color-text);
    transition: color 0.3s ease;
}

html[lang="he"] .modal-close {
    right: auto;
    left: 1rem;
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-body {
    background-color: var(--color-secondary);
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-dark);
}

.modal-media {
    flex-shrink: 0;
    width: 100%;
    height: 250px; /* Reduced height */
    overflow: hidden;
}

.modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.modal-copy {
    padding: 1.5rem;
    text-align: left;
    overflow-y: auto;
}

.modal-copy h3 {
    font-size: 1.75rem; /* Reduced font size */
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.modal-copy p {
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.facts {
    list-style: none;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.facts li {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.facts i {
    color: var(--color-primary);
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

@media (min-width: 769px) {
    .modal-body {
        flex-direction: row;
    }

    .modal-media {
        width: 50%;
        height: auto;
    }
}

/*
 * ============================================
 * Accessibility & Utilities
 * ============================================
 */
.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: var(--color-primary);
    color: var(--color-background);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-md);
    z-index: 9999;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
}
.skip-link:focus {
    transform: translateY(0);
    outline: none;
}

.sr-only {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: var(--focus-ring);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/*
 * ============================================
 * New: Organizer Section
 * ============================================
 */
#organizer {
    padding: 6rem 0;
    text-align: center;
}

#organizer .section-head {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

#organizer .section-head h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

#organizer .section-head p {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.accordion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .accordion-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .accordion-grid {
        grid-template-columns: 1fr;
    }
}

.accordion-item {
    background: var(--color-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-dark);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.accordion-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: background 0.3s ease, color 0.3s ease;
}

.accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-strong);
}

.accordion-toggle span i {
    margin-right: 0.5rem;
    color: var(--color-primary);
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.accordion-toggle .arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--color-text);
}

.accordion-toggle:hover .arrow {
    color: var(--color-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.accordion-item.active .accordion-content {
    max-height: 500px; /* Adjust as needed */
    padding: 1.25rem;
}

.accordion-item.active .accordion-toggle .arrow {
    transform: rotate(180deg);
}

.accordion-content p {
    margin-bottom: 1rem;
}

/*
 * ============================================
 * Media Queries for Mobile (Max-width 768px)
 * ============================================
 */
@media (max-width: 992px) {
    /* Language switcher positioning for mobile */
    .navbar {
        position: relative; /* Ensure proper stacking context */
    }

    .language-switcher {
        position: absolute; /* Position relative to .navbar */
        top: 50%; /* Center vertically */
        transform: translateY(-50%);
        right: 4.5rem; /* Adjust to be next to the burger icon */
        margin-left: 0; /* Remove default margin */
    }

    html[lang="he"] .language-switcher {
        right: auto;
        left: 4.5rem; /* Adjust for RTL */
        margin-right: 0;
    }
}


@media (max-width: 768px) {
    /* Base Adjustments */
    .container {
        padding: 0 1rem; /* Reduced padding for smaller screens */
    }

    .section {
        padding: 4rem 0; /* Reduced vertical padding */
    }

    /* Hero Section */
    .hero {
        min-height: 80vh; /* Make hero section shorter */
        padding-top: 5rem;
    }

    .hero-ctas {
        flex-direction: column; /* Stack buttons vertically */
        gap: 1rem;
        width: 100%; /* Make buttons full width */
    }

    .btn-ghost {
        margin-top: 0.5rem;
    }

    .hero-bullets {
        flex-direction: column; /* Stack bullets vertically */
        gap: 0.75rem;
        text-align: right; /* Adjust for RTL */
        padding: 0 1rem;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr; /* Stack cards in a single column */
    }

    /* Stats Section */
    .stats-row {
        grid-template-columns: 1fr; /* Stack stats in a single column */
        gap: 1.5rem;
    }

    /* Projects Section */
    .project-grid {
        grid-template-columns: 1fr; /* Stack projects in a single column */
    }

    .project-body {
        padding: 1rem; /* Reduced padding */
    }

    .project-body h3 {
        font-size: 1.2rem; /* Adjusted font size */
    }

    /* Timeline Section */
    .timeline {
        padding-right: 1.5rem; /* Adjusted for RTL */
    }

    html[lang="he"] .timeline {
        padding-right: 1.5rem;
        padding-left: 0;
    }

    .t-item {
        padding-right: 1.5rem; /* Adjusted for RTL */
    }

    html[lang="he"] .t-item {
        padding-right: 1.5rem;
        padding-left: 0;
    }

    html[lang="he"] .step {
        right: auto;
        left: -2rem; /* Adjusted position for RTL */
    }

    /* FAQ Section */
    .faq summary {
        font-size: 0.95rem; /* Adjusted font size */
    }

    .faq summary::after {
        font-size: 1rem; /* Adjusted font size */
    }

    /* Contact Section */
    .contact-form {
        padding: 1rem; /* Reduced padding */
    }

    /* Footer */
    .footer-inner {
        flex-direction: column-reverse; /* Stack elements vertically */
        gap: 1rem;
    }

    .site-footer p {
        text-align: center;
    }

    /* Organizer Section */
    .accordion-grid {
        grid-template-columns: 1fr; /* Stack accordions in a single column */
    }
}
