/* ==========================================
   Snapir Technologies - Main Stylesheet (CONSOLIDATED)
   ========================================== */

/* ------------------------------------------
   1. Root Variables (Consolidated)
   ------------------------------------------ */
:root {
    --color-primary: #000;
    --color-secondary: #4054b2; /* Blue */
    --color-accent: #ffd700; /* Yellow/Gold for highlights (from snapir-modern.css) */
    --color-bg: #ffffff;
    --font-main: Georgia, 'Arial Hebrew', Arial, sans-serif;
    --font-heading: Arial, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    color: #333;
    direction: rtl; /* Set default text direction to Right-to-Left */
}

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

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

/* ------------------------------------------
   2. Global Utilities (Consolidated from both files)
   ------------------------------------------ */
/* Standard container to match existing site width (from snapir-modern.css) */
.container, .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2.2em;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 40px;
}

/* The wrapper applied to the main content area */
.modern-body-wrapper {
    padding: 40px 0;
}

.content-section {
    padding: 40px 20px;
    margin-bottom: 40px;
}

.content-section h1 {
    font-family: var(--font-heading);
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.content-section h2 {
    font-family: var(--font-heading);
    font-size: 2em;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 1.5em;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin: 20px 0 20px 40px;
}

.content-section li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* ==========================================
   Header Styles
   ========================================== */

.main-header {
    background: linear-gradient(135deg, #4054b2 0%, #2d3e8f 100%);
    padding: 0; /* FIX 1: Removed vertical padding to eliminate the gap */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px; /* FIX 2: Added vertical padding here to keep spacing */
}

.logo img {
    max-width: 250px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.header-phone:hover {
    color: var(--color-accent); /* Used new accent color */
}


/* ==========================================
   IMPROVED Navigation Menu - All Levels Active States
   ========================================== */

/* Base Navigation Styles */
nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav li {
    position: relative;
}

nav a {
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 15px;
    display: block;
    color: white;
}

/* ==========================================
   PRIMARY MENU (Top Level) - Active/Current Page Styling
   ========================================== */
nav > ul > li.active > a, 
nav > ul > li.current-menu-item > a,
nav > ul > li.current-page-ancestor > a {
    color: var(--color-accent);
    border-bottom: 3px solid var(--color-accent); 
    padding-bottom: 7px; 
    background: transparent;
}

nav > ul > li > a:hover {
    color: var(--color-accent);
    background: transparent; 
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: 7px;
}

/* ==========================================
   DROPDOWN MENUS (All Levels)
   ========================================== */
nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, #4054b2 0%, #2d3e8f 100%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    min-width: 250px;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
}

/* Third level submenus */
nav ul ul ul {
    top: 0;
    right: 100%;
}

/* Show submenus on hover */
nav li:hover > ul {
    display: flex;
}

/* ==========================================
   SUBMENU ITEMS - Active/Current Page Styling
   ========================================== */

/* Second level menu items (direct children of dropdown) */
nav ul ul > li.active > a,
nav ul ul > li.current-menu-item > a,
nav ul ul > li.current-page-ancestor > a {
    background: rgba(255, 215, 0, 0.2); /* Light yellow background */
    color: var(--color-accent);
    border-right: 4px solid var(--color-accent); /* Yellow right border for RTL */
    padding-right: 16px; /* Compensate for border */
}

/* Third level menu items */
nav ul ul ul > li.active > a,
nav ul ul ul > li.current-menu-item > a,
nav ul ul ul > li.current-page-ancestor > a {
    background: rgba(255, 215, 0, 0.25); /* Slightly more yellow for third level */
    color: var(--color-accent);
    border-right: 4px solid var(--color-accent);
    padding-right: 16px;
}

/* ==========================================
   SUBMENU ITEMS - Default and Hover States
   ========================================== */

/* All submenu links default styling */
nav ul ul a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

/* Remove border from last item in each submenu */
nav ul ul > li:last-child > a {
    border-bottom: none;
}

/* Hover state for all submenu items */
nav ul ul a:hover {
    background: rgba(255,255,255,0.15);
    color: var(--color-accent);
}

/* Special styling when hovering over active items */
nav ul ul > li.active > a:hover,
nav ul ul > li.current-menu-item > a:hover,
nav ul ul > li.current-page-ancestor > a:hover {
    background: rgba(255, 215, 0, 0.3); /* Brighter on hover */
}

/* ==========================================
   MENU ARROW INDICATORS
   ========================================== */

/* Arrow for items with submenus - primary level */
nav > ul > li.has-submenu > a::after {
    content: '▼';
    font-size: 0.7em;
    margin-right: 5px;
}

/* Arrow for submenu items with sub-submenus */
nav ul ul li.has-submenu > a::after {
    content: '◄';
    font-size: 0.7em;
    margin-right: 5px;
}

/* ==========================================
   MOBILE RESPONSIVE (from header.php)
   These rules are already in header.php <style> tag
   but included here for completeness if needed
   ========================================== */

@media (max-width: 768px) {
    /* Mobile menu becomes vertical overlay */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: linear-gradient(135deg, #4054b2 0%, #2d3e8f 100%);
        transition: right 0.4s ease;
        z-index: 1000;
        overflow-y: auto;
        padding: 80px 0 40px 0;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        display: flex !important;
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }
    
    nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav a {
        display: block;
        padding: 16px 20px;
    }
    
    /* Mobile: Active states use background instead of underline */
    nav > ul > li.active > a,
    nav > ul > li.current-menu-item > a,
    nav > ul > li.current-page-ancestor > a {
        border-bottom: none !important;
        border-right: none !important;
        padding-bottom: 16px;
        padding-right: 20px;
        background: rgba(255,255,255,0.1);
        color: var(--color-accent);
    }
    
    /* Mobile: Submenu active states */
    nav ul ul > li.active > a,
    nav ul ul > li.current-menu-item > a,
    nav ul ul > li.current-page-ancestor > a {
        background: rgba(255, 215, 0, 0.2);
        color: var(--color-accent);
        border-right: none;
        padding-right: 40px;
    }
    
    /* Mobile submenus styling */
    nav ul ul {
        position: static !important;
        display: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    
    nav ul ul.open {
        display: block;
        max-height: 1000px;
    }
    
    nav ul ul a {
        padding: 14px 20px 14px 40px !important;
    }
    
    nav ul ul ul {
        background: rgba(0, 0, 0, 0.3);
    }
    
    nav ul ul ul a {
        padding: 12px 20px 12px 60px !important;
    }
    
    /* Mobile: Arrows for submenus */
    nav li.has-submenu > a::after {
        content: '▼';
        position: absolute;
        left: 20px;
        font-size: 0.8em;
        transition: transform 0.3s ease;
    }
    
    nav li.has-submenu.open > a::after {
        transform: rotate(180deg);
    }
    
    /* Prevent hover display on mobile */
    nav li:hover > ul {
        display: none;
    }
    
    nav li.has-submenu.open > ul {
        display: block !important;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus states for keyboard navigation */
nav a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Ensure sufficient contrast for active items */
nav li.active > a,
nav li.current-menu-item > a,
nav li.current-page-ancestor > a {
    font-weight: 600; /* Slightly bolder for emphasis */
}
/* ==========================================
   GLOBAL: Page Title Banner (SHORTER VERSION)
   ========================================== */
.page-title-banner {
    position: relative;
    height: 180px; /* צמצום הגובה מ-300px ל-220px */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    margin-bottom: 10px; /* צמצום המרווח למטה */
    padding: 10px; /* צמצום הפדינג */
}

.page-title-banner .banner-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* שינוי: object-fit: cover יבטיח שהתמונה תכסה את כל השטח */
    /* אם התמונה אינה רחבה מספיק, היא תימתח על ידי הגדרה זו */
    object-fit: cover; 
    z-index: 0;
}

/* Overlay for text legibility (Improved Gradient Overlay for Depth) */
.page-title-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* שמירה על האוברליי המדורג לשיפור הקריאות */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.7) 100%); 
    z-index: 1;
}

.page-title-banner h1 {
    color: white;
    font-family: var(--font-heading);
    z-index: 2;
    position: relative;
    font-size: 3em; /* הקטנת הכותרת הראשית מ-3em ל-2.5em */
    margin: 0;
    padding: 0 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Style for the subtitle element */
.page-title-banner p.banner-subtitle {
    color: white;
    z-index: 2;
    position: relative;
    font-size: 1.4em; /* הקטנת כותרת המשנה מ-1.4em ל-1.2em */
    font-weight: 300;
    margin-top: 10px; /* צמצום מרווח עליון */
    max-width: 80%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ------------------------------------------
   Responsive Design for Banner (Mobile)
   ------------------------------------------ */
@media (max-width: 768px) {
    /* עדכון: גובה מותאם יותר למובייל */
    .page-title-banner {
        height: 180px; 
    }
    .page-title-banner h1 {
        font-size: 1.8em; /* הקטנה נוספת במובייל */
    }
    .page-title-banner p.banner-subtitle {
        font-size: 1em;
        margin-top: 5px;
    }
}

/* ------------------------------------------
   Breadcrumbs Control (New Section)
   ------------------------------------------ */
/* ברירת מחדל: הצגה במסכים רחבים */
.breadcrumbs-desktop-only {
    display: block; 
}

/* ------------------------------------------
   Mobile View (Max Width 768px)
   ------------------------------------------ */
@media (max-width: 768px) {
    
      
    /* הוספת החוק המסתיר את שרשרת הניווט בנייד */
    .breadcrumbs-desktop-only {
        display: none !important; 
    }
    
   
}





/* ==========================================
   HOMEPAGE Hero Section (PRESERVED USER STYLES)
   ========================================== */

.hero {
    /* CHANGE HERE: Removed linear-gradient, added no-repeat */
    background: url('/images/hero-bg.jpg') center/100% 100% no-repeat;
    
    color: rgb(235, 234, 238);
    text-align: center;
    padding: 100px 20px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 0 !important;
}

.hero h1 {
   font-family: 'Tahoma', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
    animation: fadeInUp 2s ease;

    /* --- NEW STYLES --- */
    /* 1. The 0.75pt Black Outline */
    -webkit-text-stroke: 2pt black;
    
    /* 2. Ensures the outline doesn't eat into the text thickness */
    paint-order: stroke fill;

    /* 3. The "Grey Background" (Heavy shadow to mimic background around letters) */
    text-shadow: 0 0 12px rgb(8, 12, 236); 
}

.hero p {
    /* 1. Match H1 Font & Weight */
    font-family: 'Tahoma', sans-serif;
    font-weight: bold; /* Added to match the look of the <strong> tag in your H1 */
    
    /* 2. Smaller Font Size */
    font-size: 1.2em; 

    /* 3. Match H1 Outline & Shadow effects */
    -webkit-text-stroke: 2pt black;
    paint-order: stroke fill;
    text-shadow: 0 0 10px grey;

    /* 4. Layout & Animation (Kept specific to P) */
    max-width: 1000px;
    margin: 0 auto 15px;
    animation: fadeInUp 4s ease;
}

.bauer-highlight {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 20px 20px;
    margin-top: 30px;
    max-width: 1200px;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15);
    animation: fadeInImpact 2s ease-out;
}

@keyframes fadeInImpact {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.brand-logos {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-logos img {
    /* 1. Reset/Layout properties */
    display: block;
    max-width: 100%;
    height: auto;
    
    /* 2. Mimic the Grey Glow/Shadow (from text-shadow: 0 0 10px grey;) */
    filter: drop-shadow(0 0 8px grey); 

    /* 3. Mimic the Black Outline */
    box-shadow: 0 0 0 2px black; 
    
    /* Optional: Add spacing between the logos */
    margin: 10px;
    padding: 5px; 
    transition: transform 0.3s ease; 

    /* 4. ADDED ANIMATION (2s duration, 4.5s delay) */
    animation: fadeInUp 4s ease;
}

/* Optional: Make logos slightly interactive */
.brand-logos a:hover img {
    transform: scale(1.05); 
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0); /* Starts 40px below final position */
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0); /* Ends at final position */
    }
}

/* -------------------- Solutions Section -------------------- */
.solutions {
    background: #f5f5f5;
    padding: 50px 20px;
    text-align: center;
}

.solutions h2 {
    font-size: 2.7em;
    margin-bottom: 40px;
    color: var(--color-primary);
}

/* Grid layout: 5 columns by default */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Solution item link */
.solution-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.solution-item {
    cursor: pointer;
}

/* Circular frame with gradient & inner shadow for 3D look */
.circle-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 30px;
    background: linear-gradient(145deg, #ffffff, #e0f7ff);
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.05), 0 6px 15px rgba(0,0,0,0.1);
    border: 2px solid var(--color-primary);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
}

/* Hover effects: scale + shadow + rotation */
.circle-frame:hover {
    transform: scale(1.08) rotateZ(-1deg);
    box-shadow: inset 0 6px 12px rgba(0,0,0,0.05), 0 15px 30px rgba(0,0,0,0.15);
}

/* Icon styling with subtle glow */
.circle-frame img {
    max-width: 60px;
    margin-bottom: 15px;
    transition: transform 0.35s, filter 0.35s;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.circle-frame:hover img {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

/* Text styling */
.circle-frame h3 {
    font-size: 1.2em;
    text-align: center;
    color: var(--color-primary);
    margin: 0;
    transition: color 0.3s;
}

.circle-frame:hover h3 {
    color: var(--color-secondary);
}

/* -------------------- Entry Animations -------------------- */
.circle-frame img,
.circle-frame h3 {
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: both;
}

/* Staggered fade-in per item */
.solution-item:nth-child(1) .circle-frame img,
.solution-item:nth-child(1) .circle-frame h3 { animation: fadeInUp 0.6s ease-out 0.1s forwards; }
.solution-item:nth-child(2) .circle-frame img,
.solution-item:nth-child(2) .circle-frame h3 { animation: fadeInUp 0.6s ease-out 0.2s forwards; }
.solution-item:nth-child(3) .circle-frame img,
.solution-item:nth-child(3) .circle-frame h3 { animation: fadeInUp 0.6s ease-out 0.3s forwards; }
.solution-item:nth-child(4) .circle-frame img,
.solution-item:nth-child(4) .circle-frame h3 { animation: fadeInUp 0.6s ease-out 0.4s forwards; }
.solution-item:nth-child(5) .circle-frame img,
.solution-item:nth-child(5) .circle-frame h3 { animation: fadeInUp 0.6s ease-out 0.5s forwards; }

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

/* -------------------- Responsive Adjustments -------------------- */
@media (max-width: 992px) {
    /* Keep 5 columns, reduce spacing */
    .solutions-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }

    .circle-frame {
        padding: 22px;
    }

    .circle-frame img {
        max-width: 50px;
        margin-bottom: 12px;
    }

    .circle-frame h3 {
        font-size: 1em;
    }
}

@media (max-width: 600px) {
    /* Mobile: 3 columns */
    .solutions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .circle-frame {
        padding: 18px;
    }

    .circle-frame img {
        max-width: 45px;
        margin-bottom: 10px;
    }

    .circle-frame h3 {
        font-size: 0.95em;
    }
}


/* ==========================================
   HOMEPAGE Products Section (PRESERVED USER STYLES)
   ========================================== */

.products {
    padding: 10px 20px;
    background: rgb(236, 252, 252);
}

.products h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--color-primary);
}
/* -------------------- Slider Container -------------------- */
.product-slider {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    perspective: 1200px; /* for 3D effect */
}

/* -------------------- Slides -------------------- */
.product-slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    opacity: 0;
    transform: scale(0.95) translateX(0) rotateY(0deg);
    transition: transform 1s cubic-bezier(0.4,0,0.2,1), opacity 1s ease, box-shadow 0.8s ease;
    z-index: 0;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* -------------------- Active Slide -------------------- */
.product-slide.active {
    left: 0;
    opacity: 1;
    transform: scale(1) translateX(0) rotateY(0deg);
    z-index: 2;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

/* -------------------- Slide Entering -------------------- */
.product-slide.entering-right {
    left: 0;
    transform: translateX(100%) scale(0.9) rotateY(-15deg);
    z-index: 3;
    animation: slideInFromRight 1s cubic-bezier(0.4,0,0.2,1) forwards;
}

.product-slide.entering-left {
    left: 0;
    transform: translateX(-100%) scale(0.9) rotateY(15deg);
    z-index: 3;
    animation: slideInFromLeft 1s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* -------------------- Slide Exiting -------------------- */
.product-slide.exiting-left {
    left: 0;
    animation: slideOutToLeft 1s cubic-bezier(0.4,0,0.2,1) forwards;
}

.product-slide.exiting-right {
    left: 0;
    animation: slideOutToRight 1s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* -------------------- Slide Keyframes -------------------- */
@keyframes slideInFromRight {
    from { transform: translateX(100%) scale(0.9) rotateY(-15deg); opacity: 0; }
    to { transform: translateX(0) scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%) scale(0.9) rotateY(15deg); opacity: 0; }
    to { transform: translateX(0) scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes slideOutToLeft {
    from { transform: translateX(0) scale(1) rotateY(0deg); opacity: 1; }
    to { transform: translateX(-100%) scale(0.9) rotateY(15deg); opacity: 0; }
}

@keyframes slideOutToRight {
    from { transform: translateX(0) scale(1) rotateY(0deg); opacity: 1; }
    to { transform: translateX(100%) scale(0.9) rotateY(-15deg); opacity: 0; }
}
/* -------------------- Staggered Animations for Content -------------------- */
.product-content h3,
.product-content p,
.product-image img {
    opacity: 0;
    transform: translateY(30px);
    animation-fill-mode: both;
}

/* Headline */
.product-slide.active .product-content h3 {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

/* Paragraph */
.product-slide.active .product-content p {
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

/* Image with parallax effect */
.product-slide.active .product-image img {
    opacity: 0;
    transform: translateY(40px) scale(0.85);
    animation: popInImage 0.7s ease-out 0.2s forwards;
}

/* -------------------- Keyframes for Text & Image -------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popInImage {
    from { opacity: 0; transform: translateY(40px) scale(0.85); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* -------------------- Hover Effects -------------------- */
.product-slide.active:hover {
    transform: scale(1.03) translateZ(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

/* -------------------- Content Styling with Improved Padding -------------------- */
.product-content {
    padding-right: 30px; /* distance from right edge */
    padding-left: 20px;  /* optional left padding */
    max-width: 500px;    /* prevents text from stretching too far */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .product-content {
        padding-right: 20px;
        padding-left: 15px;
        max-width: 400px;
    }
}

@media (max-width: 600px) {
    .product-content {
        padding-right: 15px;
        padding-left: 10px;
        max-width: 100%;
    }
}

.product-content h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.product-content .first-word {
    color: var(--color-secondary);
}

.product-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.product-image {
    text-align: center;
}

.product-image img {
    max-width: 110%;
    border-radius: 10px;
}

/* -------------------- Navigation Buttons -------------------- */
.slider-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1px;
}

.slider-nav button {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5em;
    transition: background 0.3s, transform 0.2s;
}

.slider-nav button:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

/* ==========================================
   Styles for Products Section (Slider Consistency)
   ========================================== */

.product-slider .product-image {
    /* 1. קביעת גובה קבוע למיכל התמונה */
    height: 400px; /* בחר גובה המתאים לרוב התוכן שלך. ניתן לשנות לפי הצורך. */
    
    /* 2. הפעלת Flexbox לריכוז אנכי ואופקי של התמונה בתוך המיכל */
    display: flex; 
    justify-content: center; /* מרכוז אופקי */
    align-items: center;    /* מרכוז אנכי */
    
    /* 3. מניעת תמונות גבוהות מדי מלגלוש מחוץ למיכל */
    overflow: hidden;
}

.product-slider .product-image img {
    /* 4. ודא שהתמונה לא חורגת מהגובה או הרוחב של המיכל הקבוע, ושומרת על יחס גובה-רוחב */
    max-height: 100%; 
    width: auto;
    height: auto; 
}


/* ==========================================
   ABOUT PAGE SPECIFIC STYLES
   ========================================== */

.about-main-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.about-text-column, .about-image-column {
    flex-basis: calc(50% - 15px); 
    min-width: 300px; 
}
.about-text-column { order: 2; } 
.about-image-column { order: 1; } 

.partners-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.partners-row img {
    max-width: 100%;
    height: auto;
}

.fader-container {
    position: relative;
    max-width: 100%;
    height: 400px; 
    overflow: hidden;
    border-radius: 8px;
}

.fader-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
}

.fader-image.active-fader {
    opacity: 1;
}

/* ==========================================
   PRODUCT DETAIL PAGE STYLES (Traditional Layout)
   ========================================== */

/* Wrapper for the intro (text + image) */
.product-intro-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.intro-text-column, .intro-image-column {
    flex: 1 1 45%; 
    min-width: 300px;
}

.intro-image-column img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Detailed Product Cards - Two columns */
.detailed-products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.product-detail-card {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: right;
    overflow: auto; 
}

.product-detail-card h4 {
    color: var(--color-secondary);
    margin-top: 0;
    font-size: 1.5em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.product-detail-card .card-inline-img {
    float: right; 
    margin: 0 0 10px 15px; 
    width: 98px; 
    height: 98px; 
    object-fit: cover;
    border-radius: 5px;
}

/* --- Pure CSS Accordion Implementation --- */
.pure-css-accordion {
    margin-top: 20px;
}

.accordion-item {
    border-top: 1px solid #ddd;
}

.accordion-item:last-child {
    border-bottom: 1px solid #ddd;
}

.accordion-title {
    display: block;
    padding: 15px 0;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    position: relative;
    user-select: none;
    transition: color 0.2s;
}

.accordion-title:hover {
    color: var(--color-secondary);
}

.accordion-title::before {
    content: '+';
    position: absolute;
    left: 0;
    font-size: 1.2em;
    font-weight: normal;
    transition: transform 0.3s;
    line-height: 1; 
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 10px;
}

.accordion-content ul {
    margin-right: 20px;
    margin-bottom: 15px;
    list-style-type: disc;
}

.accordion-content p {
    margin-bottom: 10px;
}

.accordion-toggle {
    display: none;
}

.accordion-toggle:checked + .accordion-title::before {
    content: '–'; 
}

.accordion-toggle:checked ~ .accordion-content {
    max-height: 500px; 
    padding-bottom: 15px;
    transition: max-height 0.4s ease-in;
}

/* ==========================================
   PRODUCT DETAIL PAGE STYLES (Modern Layouts from snapir-modern.css)
   ========================================== */

/* Product Intro Section (Flexbox) */
.product-intro-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 20px 0;
}

.product-intro-flex .intro-text {
    flex: 2;
    order: 1; /* Text on the right (RTL) */
}

.product-intro-flex .intro-image {
    flex: 1;
    order: 2; /* Image on the left (RTL) */
    text-align: center;
}

.product-intro-flex .intro-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-intro-flex .intro-text h2 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 15px;
    font-size: 2em;
}

/* Detailed Products Grid (Grid Layout) */
.detailed-products-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card-modern {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.product-card-modern:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-card-modern h4 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.product-card-modern .card-content-flex {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.product-card-modern .card-content-flex .card-text {
    flex: 2;
    line-height: 1.4;
}

.product-card-modern .card-content-flex img {
    flex: 1;
    max-width: 80px;
    height: auto;
}

/* ==========================================
   CTA Section
   ========================================== */

.cta {
    background: var(--color-secondary);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.cta h3 {
    font-size: 2em;
    margin-bottom: 20px;
}

.cta-button {
    background: white;
    color: var(--color-secondary);
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s;
}

.cta-button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Button style for product cards (used in both layouts) */
.cta-button-small, .cta-button-card {
    background: var(--color-secondary);
    color: white;
    padding: 12px 25px; 
    border-radius: 5px;
    font-weight: bold;
    display: block;
    transition: all 0.3s;
    margin-top: 15px;
    margin-right: auto;
    margin-left: 0;
    width: fit-content;
}

.cta-button-small:hover, .cta-button-card:hover {
    background: var(--color-primary);
    transform: scale(1.05);
}

/* ==========================================
   Footer Styles
   ========================================== */

footer {
    background: linear-gradient(135deg, #4054b2 0%, #2d3e8f 100%);
    color: white;
    padding: 10px 10px;
}


/* NEW RULE: Center the content of the two navigation columns */
.footer-content .footer-section:nth-child(2),
.footer-content .footer-section:nth-child(3) {
    text-align: center;
}

/* --- NEW RULE FOR CENTERING THE LAST IMAGE SECTION (From previous request) --- */
.footer-content .footer-section:last-child {
    display: flex;
    justify-content: center; /* Centers the content horizontally */
    align-items: center;    /* Centers the content vertically */
}



.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.3em;
    color: white;
    font-weight: 700;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.footer-section p {
    color: white;
    margin: 5px 0;
    line-height: 1.8;
}

.footer-section a {
    color: white;
    margin: 5px 0;
    transition: color 0.3s;
    display: block;
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-section p a {
    display: inline;
}

.footer-section img {
    margin-bottom: 20px;
}

.copyright {
    text-align: center;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-top: 2px solid rgba(243, 14, 14, 0.1);
    margin-top: 5px;
}

.copyright a {
    color: #ccc;
}

.copyright a:hover {
    color: white;
}

/* ==========================================
   Mobile Menu & Toggle
   ========================================== */

.menu-toggle {
    display: none;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
    /* Product Intro Section: Stack columns vertically (for modern layout) */
    .product-intro-flex {
        flex-direction: column;
        gap: 20px;
    }

    .product-intro-flex .intro-text,
    .product-intro-flex .intro-image {
        order: initial; 
        flex: 1 1 100%;
    }
    
    .product-intro-flex .intro-text h2 {
        text-align: center;
    }
}


@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .header-phone {
        order: -1;
    }
    
    .menu-toggle {
        display: none;
    }
    
    nav {
        width: 100%;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        text-align: center;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul ul {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.1);
        width: 100%;
    }
    
    nav ul ul ul {
        background: rgba(255,255,255,0.15);
    }
    
    nav li.has-submenu > a::after {
        content: ' ▼';
    }
    
    nav ul ul li.has-submenu > a::after {
        content: ' ▼';
    }
    
    /* About Page: Stack columns */
    .about-text-column, .about-image-column {
        flex-basis: 100%;
        order: initial; 
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .solutions h2,
    .products h2 {
        font-size: 1.8em;
    }
    
    /* Product Slider: Stack columns */
    .product-slide {
        grid-template-columns: 1fr;
    }

    /* Traditional Product Detail Page: Stack columns */
    .product-intro-grid {
        flex-direction: column;
        gap: 20px;
    }
    .intro-text-column, .intro-image-column {
        flex: 1 1 100%;
    }
    .detailed-products-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 20px;
    }
    
    /* Modern Product Grid: Stack columns */
    .detailed-products-grid-modern {
        grid-template-columns: 1fr;
    }

    /* Solutions Grid: 1 column on mobile (Keeps the user's minmax settings) */
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 40px 20px;
    }
    
    .content-section h1 {
        font-size: 2em;
    }
    
    .content-section h2 {
        font-size: 1.6em;
    }

    /* Mobile: Ensure inline image is still small */
    .product-detail-card .card-inline-img {
        float: right;
        margin: 0 0 10px 15px;
        width: 80px; 
        height: 80px; 
    }

    /* Modern Banner Adjustments */
    .modern-page-banner {
        padding: 20px 0;
    }

    .modern-page-banner h1 {
        font-size: 2em;
    }
    
    .modern-page-banner p {
        font-size: 1em;
    }
    
    .page-title-banner {
        height: 180px;
    }
    .page-title-banner h1 {
        font-size: 1.8em;
    }
    .page-title-banner p.banner-subtitle {
        font-size: 1em;
        max-width: 90%;
        margin-top: 5px;
    }
}
/* ==========================================
   CONTACT FORM STYLES
   ========================================== */

.contact-form-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.contact-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-group {
    flex: 1 1 45%; /* Two columns layout */
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 1 100%;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    cursor: pointer;
}

input[type="text"],
input[type="email"],
select,
textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box; 
    direction: rtl; /* Ensure input text direction is correct for Hebrew */
}

textarea {
    resize: vertical;
}

.required-star {
    color: #cc0000; /* Use a stronger red for visibility */
    font-size: 1.2em;
}

/* Reusing your site's .cta-button style for the submit button */
.contact-form .cta-button {
    background: var(--color-secondary); /* From snapir-styles.css */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.contact-form .cta-button:hover {
    background: var(--color-primary);
}

.submit-group {
    align-items: flex-start; /* Align button to the right (start in RTL) */
    flex-direction: column;
}

.note {
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

.success-message {
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #d4edda;
    text-align: center;
    font-weight: bold;
}

.error-messages {
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #f8d7da;
}

.error-messages h3 {
    margin-top: 0;
    font-size: 1.1em;
}

.error-messages ul {
    margin-bottom: 0;
    padding-right: 20px;
    list-style-type: disc;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 600px) {
    .contact-form-section {
        margin: 20px auto;
        padding: 15px;
    }
    .form-group {
        flex: 1 1 100%; /* Single column layout */
    }
}


/* ==========================================
   PRODUCT TEMPLATE SPECIFIC STYLES (New Section)
   ========================================== */
/* --- Introduction Section --- */
/* Flex container for the intro text (right) and main image (left) */
.product-intro-main-flex {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    /* תיקון: שימוש ב-row מבטיח שהאלמנט הראשון ב-HTML יוצג מימין (בגלל direction: rtl;), 
       והאלמנט השני (התמונה) משמאל. */
    flex-direction: row; 
}

.product-intro-main-flex .intro-text-col {
    flex: 1 1 500px;
}

.product-intro-main-flex .intro-image-col {
    flex: 1 1 300px;
    text-align: center;
}

.product-main-image {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Separator --- */
.separator-primary {
    margin: 40px 0;
    border: 0;
    border-top: 2px solid var(--color-secondary); /* Blue separator */
}

/* --- Series Family Section --- */
.series-family-title {
    margin-top: 40px;
}

.series-sub-heading {
    margin-top: 40px;
    text-align: right;
}

.series-summary-text {
    margin-top: 30px;
    font-weight: bold;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Flex container for individual series items (zigzag layout) */
.series-item-zigzag {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

/* Modifier for Image on the RIGHT (Text on Left) */
.series-item-zigzag.reverse {
    flex-direction: row-reverse;
}

/* Modifier for Image on the LEFT (Text on Right) */
.series-item-zigzag.normal {
    flex-direction: row;
    border-bottom: 1px solid #eee;
}

.series-item-zigzag .series-text-col {
    flex: 1 1 55%;
}

.series-item-zigzag .series-image-col {
    flex: 1 1 300px;
    text-align: center;
    max-width: 40%;
    /* הוספת מינימום גובה למיכל התמונה ליציבות הפריסה */
    min-height: 250px; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* כללים לתמונות בתוך הבלוק, לווידוא שהן מוצגות נכון (object-fit) */
.series-item-zigzag .series-image-col .series-image {
    width: auto;
    height: auto;
    max-height: 250px;
    object-fit: contain; 
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* --- CTA Section --- */
.cta-with-margin {
    margin-top: 50px;
}

/* --- Responsive adjustments for Product Template --- */
@media (max-width: 768px) {
    /* Stack all flex elements on mobile */
    .product-intro-main-flex,
    .series-item-zigzag,
    .series-item-zigzag.reverse,
    .series-item-zigzag.normal {
        /* ביטול כל כיווניות הפוכה בנייד - הופך את כל הפריטים ל-column רגיל */
        flex-direction: column; 
        align-items: stretch;
    }

    
    /* Give full width to text and image columns on stack */
    .product-intro-main-flex .intro-text-col,
    .product-intro-main-flex .intro-image-col,
    .series-item-zigzag .series-text-col,
    .series-item-zigzag .series-image-col {
        flex-basis: 100%;
        max-width: 100%;
        min-height: auto; /* ביטול הגובה המינימלי בנייד */
    }
    
    /* Remove padding/border on stacked items where redundant */
    .series-item-zigzag {
        padding-bottom: 30px;
    }
    .series-item-zigzag.normal {
        border-bottom: none;
    }
}

/* GLOBAL UTILITY: Alignment for consistency */
.text-right {
    text-align: right;
}


/* ============================================================
   Solutions Page - Classic Cards with Scroll Animation
   ============================================================ */

.solutions.content-section {
    background: #f9f9f9;
    padding: 50px 20px;
    text-align: center;
}

.solutions.content-section h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.solutions.content-section p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #333;
}

/* Grid layout */
.solutions.content-section .solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual solution items */
.solutions.content-section .solution-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;              
    transform: translateY(20px);
}

/* Class to trigger animation */
.solutions.content-section .solution-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* Hover lift effect fix */
.solutions.content-section .solution-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Images with uniform height */
.solutions.content-section .solution-item img {
    width: 100%;
    height: 180px;       /* fixed height */
    object-fit: cover;   /* maintain aspect ratio and crop if needed */
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Headings */
.solutions.content-section .solution-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--color-primary);
}

/* Paragraphs */
.solutions.content-section .solution-item p {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .solutions.content-section .solutions-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    .solutions.content-section .solution-item img {
        height: 160px;
    }
}

@media (max-width: 600px) {
    .solutions.content-section .solutions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .solutions.content-section .solution-item {
        padding: 15px;
    }
    .solutions.content-section .solution-item h3 {
        font-size: 1.3em;
    }
    .solutions.content-section .solution-item p {
        font-size: 0.95em;
    }
    .solutions.content-section .solution-item img {
        height: 140px;
    }
}

