/* ==========================================================
   NexaGrid - עיצוב פרונט עתידני / מינימלי / בנטו-גריד
   ========================================================== */

:root{
	--nx-accent-from: #00f0ff;
	--nx-accent-to: #a855f7;
	--nx-bg: #05070f;
	--nx-bg-soft: #0b0f1e;
	--nx-card-bg: rgba(255,255,255,0.04);
	--nx-card-border: rgba(255,255,255,0.09);
	--nx-text: #eef1f8;
	--nx-text-dim: #93a0b8;
	--nx-radius: 22px;
	--nx-font: 'Assistant', 'Rubik', -apple-system, sans-serif;
	--nx-base-size: 16px;
	--nx-hero-size: 54px;
	--nx-card-title-size: 22px;
	--nx-heading-weight: 800;
}

*{ box-sizing: border-box; }

html{ overflow-x: hidden; } /* ה-overflow שייך ל-html ולא ל-body כדי לא לשבור position:sticky */

body.nexagrid-dark{
	background: var(--nx-bg);
	color: var(--nx-text);
	font-family: var(--nx-font);
	font-size: var(--nx-base-size);
	margin: 0;
	position: relative;
}
body.nexagrid-light{
	background: #f4f6fb;
	color: #10131c;
	font-family: var(--nx-font);
	font-size: var(--nx-base-size);
	margin: 0;
}

a{ text-decoration:none; color:inherit; }
img{ max-width:100%; height:auto; display:block; }

/* --- לוגו: הגבלת גודל תצוגה, כדי שתמונה גדולה שהועלתה לא "תפוצץ" את הכותרת/פוטר --- */
.nexagrid-header .custom-logo,
.nexagrid-header img.custom-logo{
	max-height: 46px; width:auto; border-radius:8px;
}
.nexagrid-footer-about .custom-logo,
.nexagrid-footer-about img.custom-logo{
	max-height: 40px; width:auto; border-radius:8px; margin-bottom: 8px;
}

/* --- מבנה עמוד ב-Flex: מבטיח header -> תוכן -> footer בסדר קבוע תמיד --- */
.nexagrid-page-wrap{
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.nexagrid-main{ flex: 1 0 auto; }
.nexagrid-header,
.nexagrid-footer{ flex-shrink: 0; }

/* רקע דינמי - זוהר עדין + רשת עתידנית */
.nexagrid-bg-fx{
	position: fixed; inset: 0; z-index: -1; pointer-events:none;
	background:
		radial-gradient(circle at 15% 20%, rgba(0,240,255,0.13), transparent 40%),
		radial-gradient(circle at 85% 75%, rgba(168,85,247,0.13), transparent 40%),
		repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 48px),
		repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 48px);
}

/* ---------- Top bar ---------- */
.nexagrid-top-bar{
	background: linear-gradient(90deg, var(--nx-accent-from), var(--nx-accent-to));
	color:#05070f; text-align:center; font-weight:700; font-size:14px;
	padding:8px 16px;
}

/* ---------- Header ---------- */
.nexagrid-header{
	position: relative; top:0; z-index: 50;
	backdrop-filter: blur(14px);
	background: rgba(5,7,15,0.55);
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nexagrid-header.is-sticky{ position: sticky; }
.nexagrid-header.is-transparent{ background: transparent; border-color: transparent; }
.nexagrid-header-inner{
	max-width: 1400px; margin: 0 auto; padding: 16px 32px;
	display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.nexagrid-logo-text{
	font-size: 22px; font-weight: 800;
	background: linear-gradient(90deg, var(--nx-accent-from), var(--nx-accent-to));
	-webkit-background-clip: text; background-clip:text; color: transparent;
}
.nexagrid-menu,
.nexagrid-menu ul{ display:flex; gap:24px; list-style:none; margin:0; padding:0; }
.nexagrid-menu > li{ position: relative; }
.nexagrid-menu a{ display:block; color: var(--nx-text-dim); font-weight:600; transition: color .25s; }
.nexagrid-menu a:hover{ color: var(--nx-accent-from); }

/* תפריטים נפתחים (תתי-עמודים) - במקום רשימה עם נקודות לא מעוצבת */
.nexagrid-menu .sub-menu{
	position:absolute; top: calc(100% + 14px); right:0; z-index:60;
	flex-direction: column; gap:2px; min-width: 200px;
	background: rgba(11,15,30,0.97); border:1px solid rgba(255,255,255,0.1);
	border-radius: 14px; padding: 8px; backdrop-filter: blur(14px);
	box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
	opacity:0; visibility:hidden; transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nexagrid-menu > li:hover > .sub-menu,
.nexagrid-menu > li:focus-within > .sub-menu{
	opacity:1; visibility:visible; transform: translateY(0);
}
.nexagrid-menu .sub-menu a{ padding: 9px 12px; border-radius: 8px; font-size:14px; }
.nexagrid-menu .sub-menu a:hover{ background: rgba(255,255,255,0.06); }
.nexagrid-menu .sub-menu .sub-menu{ top:0; right: calc(100% + 8px); }

@media (max-width: 820px){
	.nexagrid-header-inner{ flex-wrap: wrap; }
	.nexagrid-menu{ flex-wrap:wrap; gap:14px; width:100%; }
	.nexagrid-menu .sub-menu{ position:static; opacity:1; visibility:visible; transform:none; display:none; box-shadow:none; background:transparent; border:none; padding-right: 14px; }
	.nexagrid-menu > li:hover > .sub-menu{ display:flex; }
}

/* ---------- Hero ---------- */
.nexagrid-hero{ text-align:center; padding: 72px 24px 32px; }
.nexagrid-hero-title{
	font-size: clamp(30px, 5vw, var(--nx-hero-size)); font-weight: var(--nx-heading-weight); margin:0 0 12px;
	background: linear-gradient(90deg, #fff, var(--nx-accent-from) 45%, var(--nx-accent-to));
	-webkit-background-clip: text; background-clip:text; color: transparent;
	letter-spacing: -0.5px;
}
.nexagrid-hero-subtitle{ color: var(--nx-text-dim); font-size: 18px; max-width: 640px; margin: 0 auto; }

/* ---------- Ad slots ---------- */
.nexagrid-ad-slot{ max-width:1400px; margin: 24px auto; padding: 0 24px; text-align:center; }

/* ---------- Grid / Bento (כרטיסים גדולים ועשירים) ---------- */
.nexagrid-grid-section{ max-width: 1400px; margin: 0 auto; padding: 24px 24px 80px; }
.nexagrid-grid{
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), 1fr);
	grid-auto-rows: minmax(280px, auto);
	align-items: stretch;
	gap: 26px;
}
.nexagrid-cols-2{ --cols: 2; }
.nexagrid-cols-3{ --cols: 3; }
.nexagrid-cols-4{ --cols: 4; }
.nexagrid-cols-5{ --cols: 5; }

.nexagrid-size-small{ grid-column: span 1; grid-row: span 1; }
.nexagrid-size-medium{ grid-column: span 1; grid-row: span 1; min-height: 280px; }
.nexagrid-size-large{ grid-column: span 2; grid-row: span 2; position: relative; }
.nexagrid-size-large .nexagrid-card-icon-wrap{ width:72px; height:72px; border-radius:20px; }
.nexagrid-size-large .nexagrid-card-icon{ font-size:36px; width:36px; height:36px; }
.nexagrid-size-large .nexagrid-stat-number{ font-size:38px; }
.nexagrid-size-large .nexagrid-card-title{ font-size: calc(var(--nx-card-title-size) + 8px); }
.nexagrid-size-large::after{
	content:''; position:absolute; z-index:0; pointer-events:none;
	width: 260px; height:260px; border-radius:50%;
	left:-90px; bottom:-90px;
	background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 70%);
}

@media (max-width: 900px){
	.nexagrid-grid{ grid-template-columns: repeat(2, 1fr) !important; grid-auto-rows: minmax(260px, auto); }
	.nexagrid-size-large{ grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 560px){
	.nexagrid-grid{ grid-template-columns: 1fr !important; grid-auto-rows: auto; }
	.nexagrid-size-large, .nexagrid-size-medium, .nexagrid-size-small{ grid-column: span 1; grid-row: span 1; min-height: 300px; }
}

.nexagrid-card{
	position: relative;
	display:flex; flex-direction: column; justify-content: space-between;
	padding: 30px;
	border-radius: var(--nx-radius);
	background: var(--nx-card-bg);
	border: 1px solid var(--nx-card-border);
	backdrop-filter: blur(10px);
	overflow: hidden;
	transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
	background-size: cover; background-position:center;
}
.nexagrid-card.has-image{ background-blend-mode: overlay; }
.nexagrid-card.has-image::before{
	content:''; position:absolute; inset:0;
	background: linear-gradient(180deg, rgba(5,7,15,0.25), rgba(5,7,15,0.92));
	z-index:0;
}
.nexagrid-card:hover{
	transform: translateY(-6px) scale(1.012);
	box-shadow: 0 20px 50px -20px rgba(0,240,255,0.35);
}

.nexagrid-card-glow{
	position:absolute; inset:-2px; border-radius: inherit; z-index:0;
	opacity:0; transition: opacity .35s;
	background: linear-gradient(120deg, var(--nx-accent-from), var(--nx-accent-to));
	filter: blur(20px);
}
.nexagrid-card:hover .nexagrid-card-glow{ opacity: .35; }

/* תגית */
.nexagrid-card-badge{
	position:absolute; top:18px; left:18px; z-index:2;
	background: linear-gradient(90deg, var(--nx-accent-from), var(--nx-accent-to));
	color:#05070f; font-size:12px; font-weight:800;
	padding: 5px 12px; border-radius: 999px;
}

/* חלק עליון: אייקון + סטטיסטיקה */
.nexagrid-card-top{
	position: relative; z-index:1;
	display:flex; align-items:flex-start; justify-content:space-between;
}
.nexagrid-card-icon-wrap{
	width:56px; height:56px; border-radius:16px;
	display:flex; align-items:center; justify-content:center;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
}
.nexagrid-card-icon{ font-size: 28px; width:28px; height:28px; }
.nexagrid-card-stat{ text-align:left; }
.nexagrid-stat-number{ display:block; font-size:26px; font-weight:800; }
.nexagrid-stat-label{ display:block; font-size:12px; color: var(--nx-text-dim); }

/* גוף הכרטיס */
.nexagrid-card-body{ position:relative; z-index:1; margin-top: 18px; }
.nexagrid-card-title{ display:block; font-size: var(--nx-card-title-size); font-weight: var(--nx-heading-weight); margin-bottom: 6px; }
.nexagrid-card-subtitle{ display:block; font-size: 15px; color: var(--nx-text-dim); line-height:1.5; margin-bottom: 8px; }
.nexagrid-card-desc{ display:block; font-size: 13.5px; color: var(--nx-text-dim); line-height:1.6; margin-bottom: 12px; opacity: .85; }

.nexagrid-card-features{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 16px; }
.nexagrid-feature-chip{
	font-size: 12px; padding: 4px 10px; border-radius: 999px;
	background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
	color: var(--nx-text-dim);
}

.nexagrid-card-cta{
	display:inline-flex; align-items:center; gap:8px;
	font-weight:700; font-size:14px; padding: 10px 18px;
	border-radius: 999px; background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.14);
	transition: gap .25s, background .25s;
}
.nexagrid-card:hover .nexagrid-card-cta{ gap:14px; background: rgba(255,255,255,0.14); }
.nexagrid-card-arrow{ transition: transform .3s; }
.nexagrid-card:hover .nexagrid-card-arrow{ transform: translateX(-4px); }

/* צבעים תמאטיים לכל כרטיס */
.nexagrid-color-cyan   .nexagrid-card-icon,
.nexagrid-color-cyan   .nexagrid-stat-number{ color:#00f0ff; }
.nexagrid-color-violet .nexagrid-card-icon,
.nexagrid-color-violet .nexagrid-stat-number{ color:#a855f7; }
.nexagrid-color-pink   .nexagrid-card-icon,
.nexagrid-color-pink   .nexagrid-stat-number{ color:#ec4899; }
.nexagrid-color-green  .nexagrid-card-icon,
.nexagrid-color-green  .nexagrid-stat-number{ color:#22e6a8; }
.nexagrid-color-orange .nexagrid-card-icon,
.nexagrid-color-orange .nexagrid-stat-number{ color:#ff9d42; }
.nexagrid-color-blue   .nexagrid-card-icon,
.nexagrid-color-blue   .nexagrid-stat-number{ color:#4d8dff; }

.nexagrid-color-cyan   .nexagrid-card-glow{ background: linear-gradient(120deg,#00f0ff,#0072ff); }
.nexagrid-color-violet .nexagrid-card-glow{ background: linear-gradient(120deg,#a855f7,#6d28d9); }
.nexagrid-color-pink   .nexagrid-card-glow{ background: linear-gradient(120deg,#ec4899,#be185d); }
.nexagrid-color-green  .nexagrid-card-glow{ background: linear-gradient(120deg,#22e6a8,#059669); }
.nexagrid-color-orange .nexagrid-card-glow{ background: linear-gradient(120deg,#ff9d42,#ea580c); }
.nexagrid-color-blue   .nexagrid-card-glow{ background: linear-gradient(120deg,#4d8dff,#1d4ed8); }

/* ---------- Latest posts ---------- */
.nexagrid-latest-posts{ max-width:1400px; margin:0 auto; padding: 0 24px 90px; }
.nexagrid-section-title{ font-size:24px; font-weight:800; margin-bottom:20px; }
.nexagrid-posts-row{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:20px; }
.nexagrid-post-card{
	background: var(--nx-card-bg); border:1px solid var(--nx-card-border);
	border-radius: 16px; overflow:hidden; transition: transform .3s;
}
.nexagrid-post-card:hover{ transform: translateY(-4px); }
.nexagrid-post-thumb img{ width:100%; display:block; aspect-ratio: 16/9; object-fit:cover; }
.nexagrid-post-card h3{ padding: 14px 16px; font-size:16px; margin:0; }

/* ---------- Footer ---------- */
.nexagrid-footer{ border-top: 1px solid rgba(255,255,255,0.06); padding: 50px 24px 0; }
.nexagrid-footer-inner{
	max-width:1400px; margin:0 auto; display:grid; gap:32px;
	grid-template-columns: 2fr 1fr 1fr;
}
.nexagrid-footer-cols-1{ grid-template-columns: 1fr; }
.nexagrid-footer-cols-2{ grid-template-columns: 2fr 1fr; }
.nexagrid-footer-cols-3{ grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 700px){ .nexagrid-footer-inner{ grid-template-columns: 1fr !important; } }

.nexagrid-footer-col h4{ font-size:15px; margin-bottom:14px; }
.nexagrid-footer-about-text{ color: var(--nx-text-dim); font-size:14px; line-height:1.7; margin: 12px 0; }
.nexagrid-footer-menu, .nexagrid-footer-contact{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.nexagrid-footer-menu ul{ list-style:none; margin: 6px 0 0; padding: 0 0 0 14px; display:flex; flex-direction:column; gap:8px; }
.nexagrid-footer-menu a{ color: var(--nx-text-dim); font-size:14px; }
.nexagrid-footer-menu a:hover{ color: var(--nx-accent-from); }
.nexagrid-footer-contact li{ color: var(--nx-text-dim); font-size:14px; }

.nexagrid-social-links{ display:flex; gap:10px; margin-top:14px; }
.nexagrid-social-icon{
	width:36px; height:36px; border-radius:50%;
	display:flex; align-items:center; justify-content:center;
	background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
	transition: background .25s, transform .25s;
}
.nexagrid-social-icon:hover{ background: linear-gradient(90deg, var(--nx-accent-from), var(--nx-accent-to)); transform: translateY(-3px); }

.nexagrid-footer-bottom{
	margin-top: 40px; padding: 20px 24px; text-align:center;
	border-top: 1px solid rgba(255,255,255,0.06);
	color: var(--nx-text-dim); font-size:13px;
}

/* ---------- Generic pages ---------- */
.nexagrid-container{ max-width: 900px; margin:0 auto; padding: 60px 24px; }
.nexagrid-page-title{ font-size:36px; font-weight:800; margin-bottom:20px; }
.nexagrid-page-content{ line-height:1.8; font-size:17px; }
.nexagrid-page-content ul{ padding-inline-start: 22px; line-height:1.9; }
.nexagrid-empty{ text-align:center; color: var(--nx-text-dim); padding: 60px 0; }

/* ---------- עמוד חלון פנימי (page-nexagrid-window.php) ---------- */
.nexagrid-window-hero{
	position:relative; overflow:hidden; padding: 70px 24px 90px; text-align:center;
	background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}
.nexagrid-window-hero-inner{ position:relative; z-index:1; max-width:700px; margin:0 auto; }
.nexagrid-window-hero-icon{
	width:76px; height:76px; margin:0 auto 20px; border-radius:22px;
	background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
}
.nexagrid-window-hero-icon .nexagrid-card-icon{ font-size:36px; width:36px; height:36px; }
.nexagrid-window-hero-title{
	font-size: clamp(28px, 4vw, 44px); font-weight: var(--nx-heading-weight); margin: 0 0 18px;
	background: linear-gradient(90deg, #fff, var(--nx-accent-from) 45%, var(--nx-accent-to));
	-webkit-background-clip: text; background-clip:text; color: transparent;
}
.nexagrid-window-back{
	display:inline-block; font-size:14px; color: var(--nx-text-dim);
	padding: 8px 16px; border-radius:999px; border:1px solid rgba(255,255,255,0.12);
	transition: color .2s, border-color .2s;
}
.nexagrid-window-back:hover{ color: var(--nx-accent-from); border-color: var(--nx-accent-from); }

.nexagrid-window-content{ padding-top: 0; margin-top:-50px; position:relative; z-index:2; }
.nexagrid-glass-card{
	background: var(--nx-card-bg); border:1px solid var(--nx-card-border);
	border-radius: var(--nx-radius); padding: 36px; backdrop-filter: blur(10px);
	margin-bottom: 24px;
}
.nexagrid-window-contact h2{ margin-top:0; font-size:20px; }
.nexagrid-window-contact-row{ display:flex; flex-wrap:wrap; gap:18px; align-items:center; color: var(--nx-text-dim); }
