/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
    /* Colors */
    --primary: #4B2E83;          /* Deep Purple */
    --primary-hover: #3A2366;
    --primary-light: #6A0DAD;    /* Royal Purple accent */
    --accent: #6B8E23;           /* Olive Green */
    --accent-hover: #55721C;
    --bg-body: #F9F5F0;          /* Warm Cream */
    --bg-surface: #FFF8F0;       /* Light Cream cards */
    --text-main: #1A1D23;        /* Charcoal */
    --text-muted: #3F4654;       /* Slate Gray */
    --border-color: #F0E8E0;     /* Warm Light Gray */
    
    /* Typography */
    --font-family: 'Rubik', sans-serif;
    
    /* Shadows & Borders */
    --shadow-sm: 0 2px 8px rgba(26, 29, 35, 0.04);
    --shadow-md: 0 8px 24px rgba(75, 46, 131, 0.08);
    --shadow-hover: 0 12px 32px rgba(75, 46, 131, 0.12);
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

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

/* Typography */
h1, h2, h3, h4 {
    color: #2D1B4E;
    line-height: 1.2;
    font-weight: 700;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: #2D1B4E;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(45, 27, 78, 0.2);
}

.btn-primary:hover {
    background-color: #1F1436;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 27, 78, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: #2D1B4E;
    border: 2px solid #2D1B4E;
}

.btn-outline:hover {
    background-color: rgba(45, 27, 78, 0.05);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    background-color: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2D1B4E;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: #2D1B4E;
}

.nav-actions {
    display: flex;
    gap: 16px;
}

/* Mobile Menu Toggle (Hidden on desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #2D1B4E;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 100px 400px 300px;
    position: relative;
    overflow: hidden;
    /* רקע תמונה מותאמת */
    background-image: url('../images/back.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* כיסוי (Overlay) כדי לשמור על קריאות הטקסט ומעבר חלק לצדדים */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at center, rgba(249, 245, 240, 0) 0%, rgba(249, 245, 240, 0.6) 100%),
        linear-gradient(135deg, rgba(249, 245, 240, 0.4) 0%, rgba(249, 245, 240, 0.3) 50%, rgba(249, 245, 240, 0.4) 100%);
    z-index: 0;
}

/* מעבר הדרגתי חלק מהתמונה לצבע הרקע של האתר למטה */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
    z-index: 0;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1; /* מוודא שהתוכן מופיע מעל ה-Overlay */
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin-top: 50px;
}

.logo-hero {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.logo-hero-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(45, 27, 78, 0.08);
    color: #2D1B4E;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    color: #2D1B4E;
    font-weight: 800;
    text-shadow: 
        0 1px 3px rgba(45, 27, 78, 0.2),
        0 4px 10px rgba(45, 27, 78, 0.25),
        0 8px 20px rgba(45, 27, 78, 0.15);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 90%;
    color: #3A3A3A;
    font-weight: 500;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Stylized Logo/Graphic */
.hero-logo {
    width: 100%;
    max-width: 480px;
    height: auto;
    filter: drop-shadow(0 25px 40px rgba(75, 46, 131, 0.2));
    transition: transform 0.5s ease;
}

.hero-logo:hover {
    transform: translateY(-10px);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features {
    padding: 20px 0 100px;
    position: relative;
    z-index: 10;
}

/* Pull the features slightly up over the hero area */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -60px;
}

.feature-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.feature-card:hover,
.feature-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(75, 46, 131, 0.1);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: rgba(107, 142, 35, 0.1); /* Olive Green tint */
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent);
    transition: background-color var(--transition-fast);
}

.feature-card:hover .icon-wrapper {
    background-color: var(--accent);
    color: #FFFFFF;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 16px;
}

.feature-card p {
    font-size: 1rem;
    margin-bottom: auto; /* Pushes the link to the bottom */
    padding-bottom: 24px;
}

.card-link {
    color: #2D1B4E;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}

.card-link:hover {
    color: #6A0DAD;
}

.card-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.feature-card:hover .card-link svg {
    transform: translateX(-4px); /* RTL left movement */
}

/* Card Type Specific Colors */
/* Forms - Purple */
.features-grid > .feature-card:nth-child(1) .icon-wrapper,
.features-grid > .feature-card:nth-child(4) .icon-wrapper {
    background-color: rgba(138, 43, 226, 0.15);
    color: #8A2BE2;
}

.features-grid > .feature-card:nth-child(1):hover .icon-wrapper,
.features-grid > .feature-card:nth-child(4):hover .icon-wrapper {
    background-color: #8A2BE2;
    color: #FFFFFF;
}

.feature-card.form-card .icon-wrapper {
    background-color: rgba(138, 43, 226, 0.15);
    color: #8A2BE2;
}

.feature-card.form-card:hover .icon-wrapper {
    background-color: #8A2BE2;
    color: #FFFFFF;
}

/* Sheets - Green */
.features-grid > .feature-card:nth-child(2) .icon-wrapper {
    background-color: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.features-grid > .feature-card:nth-child(2):hover .icon-wrapper {
    background-color: #4CAF50;
    color: #FFFFFF;
}

/* Investigations - Brown/Tan */
.features-grid > .feature-card:nth-child(3) .icon-wrapper {
    background-color: rgba(139, 69, 19, 0.15);
    color: #8B4513;
}

.features-grid > .feature-card:nth-child(3):hover .icon-wrapper {
    background-color: #8B4513;
    color: #FFFFFF;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 0;
    }
    
    .hero {
        background-attachment: scroll; /* שיפור ביצועים במובייל */
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn:not(.mobile-menu-btn) {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
}
