/* ===========================
   LIBCO – BASE + PSYCHEDELIC THEME
   =========================== */

/* צבעים קבועים למותג – DARK MODE */
:root{
  --brand:#f9fafb;          
  --accent:#1ed760;
  --muted:#9ca3af;
  --bg:#05060a;
  --panel:rgba(15,23,42,0.96);
  --border:rgba(148,163,184,0.38);

  --libco-bg:#05060a;
  --libco-card:rgba(8,10,18,0.94);
  --libco-accent:#40ff9f;
  --libco-accent-soft:#9b5cff;
  --libco-accent-hot:#ff3ea8;
  --libco-accent-ice:#3ad5ff;
  --libco-text:#f7f9ff;
}

/* רקע גלובלי + טיפוגרפיה */
html,
body{
  margin:0;
  padding:0;
  background:
    radial-gradient(circle at top left, rgba(155, 92, 255, 0.22) 0, transparent 55%),
    radial-gradient(circle at bottom right, rgba(64, 255, 159, 0.18) 0, transparent 55%),
    var(--libco-bg);
  color:var(--libco-text);
  font:16px/1.55 "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  position:relative;
  overflow-x:hidden;
}

/* שכבת "רעש" עדינה */
body::before{
  content:"";
  pointer-events:none;
  position:fixed;
  inset:0;
  opacity:0.18;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  mix-blend-mode:soft-light;
  z-index:-2;
}

/* שכבת גל ניאון "נושמת" */
body::after{
  content:"";
  pointer-events:none;
  position:fixed;
  inset:-20%;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 62, 168, 0.18) 0, transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(58, 213, 255, 0.15) 0, transparent 60%);
  opacity:0.9;
  filter:blur(8px);
  animation:libcoGlow 22s ease-in-out infinite alternate;
  z-index:-3;
}

@keyframes libcoGlow{
  0%{ transform:translate3d(-10px,8px,0) scale(1); opacity:0.75; }
  50%{ transform:translate3d(10px,-12px,0) scale(1.05); opacity:1; }
  100%{ transform:translate3d(-6px,4px,0) scale(1.03); opacity:0.85; }
}

/* ===========================
   LAYOUT
   =========================== */

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:32px 20px;
}

.topbar{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand-logo{
  width:40px;
  height:40px;
  border-radius:8px;
  background:linear-gradient(135deg,#22c55e,#4ade80);
  box-shadow:0 0 18px rgba(34,197,94,0.7);
  display:inline-block;
}

.brand h1{
  font-size:22px;
  margin:0;
  letter-spacing:0.4px;
}

.tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tag{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,23,42,0.92);
  border:1px solid var(--border);
  font-size:13px;
  color:var(--muted);
}

/* ===========================
   HERO + SECTIONS
   =========================== */

.hero{
  padding:18px 20px;
  border:1px solid var(--border);
  background:radial-gradient(circle at top,rgba(148,163,255,0.18),transparent 60%), var(--libco-card);
  border-radius:18px;
  box-shadow:0 18px 60px rgba(0,0,0,0.75);
}

.hero h2{
  margin:0 0 6px;
  font-size:20px;
}

.hero p{
  margin:0;
  color:var(--muted);
}

.nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:18px 0;
}

.nav a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  text-decoration:none;
  color:var(--libco-text);
  background:rgba(15,23,42,0.96);
  box-shadow:0 8px 24px rgba(15,23,42,0.7);
}

.nav a:hover{
  border-color:rgba(209,213,219,0.6);
  transform:translateY(-1px);
}

.section{
  margin:28px 0;
}

.section h3{
  margin:0 0 10px;
  font-size:18px;
}

/* ===========================
   CARDS / PANELS
   =========================== */

.card,
.panel,
.form-card{
  border:1px solid var(--border);
  background:var(--libco-card);
  border-radius:12px;
  padding:14px;
  box-shadow:0 18px 50px rgba(0,0,0,0.85);
}

.note{
  color:var(--muted);
  font-size:14px;
}

/* ===========================
   TABLES
   =========================== */

.tbl{
  width:100%;
  border-collapse:collapse !important;
}

.tbl th,
.tbl td{
  padding:12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:middle;
}

.tbl thead th{
  background:linear-gradient(to bottom,#1a2233,#0d121d) !important;
  color:#e6e9ed !important;
  font-size:0.82rem !important;
  font-weight:700 !important;
  letter-spacing:0.15em !important;
  text-transform:uppercase !important;
  padding:10px 12px !important;
  line-height:1.1 !important;
  border-bottom:1px solid rgba(255,255,255,0.12) !important;
  text-align:left;
}

/* תגית קטנה בתא */
.tbl td .badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(15,23,42,0.96);
  border:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
}

.price{
  font-weight:700;
}

/* ===========================
   BUTTONS
   =========================== */

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(15,23,42,0.96);
  color:var(--libco-text);
  text-decoration:none;
  font-weight:600;
  box-shadow:0 10px 28px rgba(0,0,0,0.7);
  transition:transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn.cta{
  background:var(--accent);
  border-color:var(--accent);
  color:#08140a;
  box-shadow:0 15px 40px rgba(34,197,94,0.8);
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 40px rgba(0,0,0,0.85);
}

/* ===========================
   GRID / FOOTER
   =========================== */

.grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

@media (min-width:820px){
  .grid{
    grid-template-columns:1fr 1fr;
  }
}

.footer{
  margin-top:32px;
  padding-top:18px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:14px;
}

.footer a{
  color:inherit;
}

.sticky{
  position:sticky;
  top:8px;
}

.list{
  margin:0;
  padding-left:18px;
}

.list li{
  margin:6px 0;
}

.kbd{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  background:rgba(15,23,42,0.96);
  border:1px solid var(--border);
  padding:2px 6px;
  border-radius:6px;
}

.small{
  font-size:12.5px;
  color:var(--muted);
}

/* ===========================
   NAVBAR
   =========================== */

.navbar{
  background:rgba(15,23,42,0.96);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:5;
  backdrop-filter:blur(18px);
}

.navbar-inner{
  max-width:1100px;
  margin:0 auto;
  padding:10px 20px;
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:space-between;
}

.navbar a{
  color:var(--libco-text);
  text-decoration:none;
  margin:0 8px;
}

.navbar .right a{
  opacity:.9;
}

/* ===========================
   GALLERY
   =========================== */

.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:12px;
}

.gallery img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--panel);
}

/* תמונות קטנות בתוך הטבלה */
.img-thumb{
  width:100%;
  max-width:140px;
  height:auto;
  display:block;
  margin:0 auto;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--panel);
  object-fit:cover;
}

/* גריד של הגלריות */
.strain-gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:10px;
  margin-top:16px;
  margin-bottom:24px;
}

.strain-gallery-grid img{
  width:100%;
  height:150px;
  object-fit:cover;
  border-radius:12px;
  display:block;
}

/* מובייל */
@media (max-width:768px){
  .img-thumb{ max-width:110px; }
  .strain-gallery-grid img{ height:110px; }
}

/* מסתיר גלריות מקור */
.strain-gallery{
  display:none;
}

/* ===========================
   FORMS
   =========================== */

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.form-row .full{
  grid-column:1/-1;
}

input,
select,
textarea{
  width:100%;
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
  font:inherit;
  background:rgba(15,23,42,0.96);
  color:var(--libco-text);
}

label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}

/* התראה */
.alert{
  background:#fff8e1;
  border:1px solid #ffe0a3;
  padding:10px;
  border-radius:10px;
  color:#735c0f;
}

/* ================================================
   LIBCO — PREMIUM SPLIT-VIEW GALLERY MODAL (FINAL)
================================================ */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.gallery-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-dialog {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  height: 75vh;
  background: #050915;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 38% 62%;
  box-shadow: 0 0 40px rgba(0,0,0,0.55);
}

/* LEFT SIDE — TEXT */
.gallery-modal-left {
  padding: 32px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(180deg,#131b2f,#0b0f1d);
  border-right: 1px solid rgba(255,255,255,0.08);
}

.gallery-modal-logo img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.gallery-modal-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gallery-modal-meta {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 10px;
}

.gallery-modal-thca {
  margin-top: 14px;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(30,215,96,0.18);
  color: #1ed760;
  display: inline-block;
}

/* RIGHT SIDE — IMAGE */
.gallery-modal-right {
  position: relative;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal-image {
  max-width: 95%;
  max-height: 95%;
  border-radius: 18px;
  object-fit: contain;
}

/* CLOSE BUTTON */
.gallery-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 32px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 50;
}

/* NAV BUTTONS */
.gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: background .2s ease;
}

.gallery-modal-nav:hover {
  background: rgba(255,255,255,0.28);
}

.gallery-modal-nav[data-gallery-prev] {
  left: 20px;
}

.gallery-modal-nav[data-gallery-next] {
  right: 20px;
}

/* MOBILE */
@media(max-width: 768px){
  .gallery-modal-dialog {
    width: 94vw;
    height: 80vh;
    grid-template-columns: 1fr;
  }

  .gallery-modal-left {
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
  }

  .gallery-modal-right {
    padding: 12px;
  }

  .gallery-modal-image {
    max-height: 65vh;
  }

  .gallery-modal-nav {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }
}
