/* =================================
   Base Variables & Setup (Night Theme - Default)
   ================================= */
:root {
  color-scheme: dark;
--card-bg-light: #f8f8f8; /* צבע רקע בהיר לכרטיסים */

  /* Basic UI Colors */
  --bg: #2a1c15;
  --panel: #3b2b24;
  --panel-2: #35251f;
  --card-border: rgba(255, 255, 255, .08);

  /* Text Colors */
  --text: #f5ece4;
  --muted: #b3a89e;
  --accent: #ffca28;

  /* Semantic Colors */
  --danger: #d32f2f;
  --success: #66bb6a;
  --warning: #ff9800;

  /* === THIS IS THE SECTION YOU NEED TO ADD === */
  /* Accent Color Palette for Static Page Content Blocks */
  --accent-color-1: #3498db; /* Blue */
  --accent-color-2: #e74c3c; /* Red */
  --accent-color-3: #2ecc71; /* Green */
  --accent-color-4: #f1c40f; /* Yellow */
  --accent-color-5: #9b59b6; /* Purple */
  /* ========================================== */


  /* Interactive States */
  --ring: rgba(255, 202, 40, .35);
  --edit-btn-bg: #2196f3;
  --edit-btn-hover: #1976d2;

  /* Icon Colors - organized by function */
  --icon-primary: #81c784;     /* Green */
  --icon-secondary: #64b5f6;   /* Blue */
  --icon-tertiary: #ffd54f;    /* Yellow */
  --icon-quaternary: #ba68c8;  /* Purple */

  /* Navigation Icon Colors */
  --icon-home: var(--icon-primary);
  --icon-about: var(--icon-secondary);
  --icon-tributes: var(--icon-tertiary);
  --icon-admin: var(--icon-quaternary);
  --icon-active: var(--bg);

  /* Footer Icon Colors */
  --footer-icon-1: var(--icon-primary);
  --footer-icon-2: var(--icon-secondary);
  --footer-icon-3: var(--icon-tertiary);
  --footer-icon-4: var(--icon-quaternary);

  /* Layout & Typography - using rem units */
  --gap: 1rem;
  --padding: 1.25rem;
  --border-radius: 0.75rem;
  --border-radius-large: 1rem;
  --font-main: 'Heebo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index scale */
  --z-dropdown: 200;
  --z-tooltip: 300;
  --z-fixed: 100;
  --z-modal-backdrop: 1000;
  --z-modal-content: 1001;
}

/* =================================
   Theme System - Enhanced
   ================================= */
:root[data-skin="sunrise"] {
  color-scheme: light;
  --bg: #fdf6e3;
  --panel: #ffffff;
  --text: #4a4a4a;
  --muted: #666666;
  --accent: #d35400;
  --card-border: rgba(0, 0, 0, 0.1);
  --success: #27ae60;
  --danger: #c0392b;
  --panel-2: #f8f4e9;
  --warning: #e67e22;

  /* Nav Icon Colors */
  --icon-home: #27ae60;
  --icon-about: #2980b9;
  --icon-tributes: #f39c12;
  --icon-admin: #8e44ad;
  --icon-active: #ffffff;

  /* Footer Icon Colors */
  --footer-icon-1: #27ae60;
  --footer-icon-2: #2980b9;
  --footer-icon-3: #f39c12;
  --footer-icon-4: #8e44ad;
}

:root[data-skin="midnight"] {
  --bg: #1d232a;
  --text: #a6adbb;
  --muted: #7d899e;
  --panel: #2a323c;
  --panel-2: #242a32;
  --card-border: #3d4957;
  --accent: #66cc8a;

  /* Nav Icon Colors */
  --icon-home: #66cc8a;
  --icon-about: #5dade2;
  --icon-tributes: #f4d03f;
  --icon-admin: #af7ac5;
  --icon-active: #1d232a;

  /* Footer Icon Colors */
  --footer-icon-1: #66cc8a;
  --footer-icon-2: #5dade2;
  --footer-icon-3: #f4d03f;
  --footer-icon-4: #af7ac5;
}

/* =================================
   Base Styles - Enhanced
   ================================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-main);
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: clamp(0.875rem, 2vw + 0.5rem, 1.125rem);
  line-height: 1.6;
}

/* Focus outline */
a:focus-visible,
button:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Site Layout Grid */
.site-layout {
  display: grid;
  grid-template-areas: "header" "main" "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: var(--padding);
}

/* =================================
   Accessibility & Performance
   ================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-breath { animation: none; }
  html { scroll-behavior: auto; }
}

/* Data-Saver – remove heavy background */
@media (prefers-reduced-data: reduce) {
  body { background-image: none !important; }
}

/* =================================
   Header & Nav - Enhanced v3.3
   ================================= */
.site-header {
  grid-area: header;
  background: var(--panel);
  border-radius: var(--border-radius-large);
  margin: var(--padding) auto;
  max-width: 900px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
  contain: layout style paint;   /* ← נוספה המילה paint */
}

:root[data-skin="sunrise"] .site-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.utility-bar {
  padding: 0.5rem var(--padding);
  font-size: 0.85rem;
  background-color: rgba(0,0,0,0.1);
  border-bottom: 1px solid var(--card-border);
}

:root[data-skin="sunrise"] .utility-bar {
  background-color: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.utility-bar .container {
  display: flex;
  justify-content: flex-start;
}

.utility-bar .user-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.utility-bar a {
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
}

.utility-bar a:hover {
  color: var(--text);
  background-color: rgba(255,255,255,0.1);
}

:root[data-skin="sunrise"] .utility-bar a:hover {
  background-color: rgba(0,0,0,0.05);
}

.utility-bar a.register-link {
  background-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
  padding: 0.5rem 0.875rem;
}

.utility-bar a.register-link:hover {
  filter: brightness(1.1);
  color: var(--bg);
}

.utility-bar .separator {
  color: var(--muted);
  font-size: 1.2rem;
  opacity: 0.6;
}

.utility-bar .feather {
  width: 18px;
  height: 18px;
}

.utility-bar a.login-link .feather {
  stroke: var(--icon-about);
}

.main-header-wrapper {
  padding: 1.5rem var(--padding);
  text-align: center;
}

.branding h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--accent);
  margin: 0;
}

.branding .tagline {
  color: var(--muted);
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  margin-top: 0.25rem;
}

.topnav-wrapper {
  background-color: var(--panel-2);
  border-top: 1px solid var(--card-border);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

:root[data-skin="sunrise"] .topnav-wrapper {
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.topnav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.topnav a:hover {
  background-color: var(--bg);
  transform: translateY(-1px);
}

.topnav a.active {
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 700;
}

.topnav a .feather {
  stroke: var(--muted);
}

.topnav a.nav-home .feather { stroke: var(--icon-home); }
.topnav a.nav-about .feather { stroke: var(--icon-about); }
.topnav a.nav-tributes .feather { stroke: var(--icon-tributes); }
.topnav a.nav-admin .feather { stroke: var(--icon-admin); }
.topnav a.active .feather { stroke: var(--bg) !important; }

/* =================================
   Main Content & Cards - Enhanced
   ================================= */
.site-main {
  grid-area: main;
}

.card {
  background: var(--panel);
  background-image: radial-gradient(circle at 1% 1%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                    linear-gradient(175deg, var(--panel), var(--panel-2));
  border-radius: var(--border-radius);
  padding: var(--padding);
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: var(--transition);
  contain: layout style paint;
  will-change: transform;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

:root[data-skin="sunrise"] .card {
  background-color: rgba(255, 255, 255, 0.75);
  background-image: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* =================================
   Layout System - Homepage Isolation (FINAL)
   ================================= */
.homepage-main-grid {
    display: grid !important; /* כופה את שיטת הגריד, עוקף הכל */
    grid-template-columns: 1fr 1fr; /* 2 טורים שווים וקבועים */
    gap: var(--gap, 1.25rem); /* שימוש ב-var(--gap) שלך */
    align-items: start;
    position: relative;
    z-index: 1;
}

/* מאפשר לבלוקים רחבים לתפוס את כל הרוחב (כמו הודעת המערכת) */
.homepage-main-grid .item-wide {
    grid-column: 1 / span 2;
}

/* התאמה למובייל: טור אחד במסכים צרים */
@media (max-width: 980px) {
    .homepage-main-grid {
        grid-template-columns: 1fr !important;
    }
    .homepage-main-grid .item-wide {
        grid-column: 1 / span 1;
    }
}

.tribute-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
}

/* =================================
   Forms - Enhanced with validation
   ================================= */
form {
  display: grid;
  gap: var(--gap);
}

.form-field {
  position: relative;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  color: var(--text);
  font-family: inherit;
  transition: var(--transition);
}

/* Apply focus styles to standard form elements, but NOT to the pell editor */
input:not(.pell-content):focus,
textarea:not(.pell-content):focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Form Validation States */
input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 20%, transparent);
}

input:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--success);
}

button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =================================
   Typography - Fluid Scaling
   ================================= */
h1 {
  font-size: clamp(1.8rem, 4vw + 1rem, 3rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.4rem, 3vw + 1rem, 2.2rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw + 0.8rem, 1.8rem);
  line-height: 1.4;
}

/* =================================
   Messages & Content
   ================================= */
.message-card {
  background: var(--bg);
  padding: 1.125rem;
  border-radius: var(--border-radius);
  border-inline-start: 4px solid var(--accent);
  margin-block: var(--gap);
}

.message-content {
  line-height: 1.7;
  margin-bottom: 0.75rem;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  hyphens: auto;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =================================
   Statistics & Data Display
   ================================= */
.pulse-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.stat-item .feather {
  width: 2.2rem;
  height: 2.2rem;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.stat-item div {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.pulse-stats .stat-item:nth-child(1) .feather { color: var(--icon-primary); }
.pulse-stats .stat-item:nth-child(2) .feather { color: var(--icon-secondary); }
.pulse-stats .stat-item:nth-child(3) .feather { color: var(--icon-tertiary); }
.pulse-stats .stat-item:nth-child(4) .feather { color: var(--icon-quaternary); }

/* =================================
   Tributes & Special Content
   ================================= */
.tribute-blockquote {
  font-style: italic;
  color: var(--muted);
  border-right: 3px solid var(--accent);
  padding-right: 1.5rem;
  margin: 2rem 0;
}

.tribute-card {
  background: var(--panel);
  border-radius: var(--border-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  contain: layout style paint;
  will-change: transform;
}

.tribute-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: var(--accent);
}

.tribute-image {
  width: 100%;
  height: 200px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  filter: grayscale(50%);
  transition: var(--transition);
}

.tribute-card:hover .tribute-image {
  filter: grayscale(0%);
}

.tribute-info {
  padding: var(--padding);
  text-align: center;
}

.tribute-name {
  color: var(--accent);
}

.tribute-hero-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem auto;
  border: 4px solid var(--accent);
}

.tribute-intro {
  text-align: center;
}

/* =================================
   Chandler Special Section
   ================================= */
.chandler-card {
  background: var(--panel-2);
}

.chandler-moments {
  display: flex;
  align-items: center;
  gap: var(--gap);
  justify-content: space-between;
  flex-wrap: wrap;
}

.chandler-quotes {
  list-style: none;
  padding: 0;
  flex-grow: 1;
  min-width: 0;
}

.chandler-quotes li {
  background: rgba(0,0,0,0.2);
  padding: 0.625rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  border-right: 3px solid var(--accent);
  font-weight: 500;
  color: #fafafa;
}

.chandler-gif {
  max-width: 150px;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

/* =================================
   Footer - Enhanced v4.2
   ================================= */
.site-footer {
  grid-area: footer;
  background-color: var(--bg);
  color: var(--muted);
  margin-top: 3.75rem;
  border-top: 4px solid var(--accent);
  font-size: 0.95rem;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
  position: relative;
  z-index: var(--z-fixed);
}

.footer-emotion-strip {
  background: var(--panel-2);
  padding: 1.25rem;
  text-align: center;
  font-style: italic;
  animation: fadeIn 1s ease-in-out;
  border-bottom: 1px solid var(--card-border);
}

.footer-emotion-strip p {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.footer-emotion-strip .feather {
  color: var(--accent);
  vertical-align: -4px;
  margin-inline-end: 0.5rem;
}

.footer-emotion-strip small {
  font-size: 0.8em;
  opacity: 0.8;
}

.footer-main-content {
  padding: 2.5rem 0;
  background: var(--panel);
}

:root[data-skin="sunrise"] .footer-main-content {
  background-color: #f8f4e9;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.75rem;
}

.footer-column h4 {
  color: var(--accent);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--card-border);
  display: inline-block;
}

.footer-column p,
.footer-links li {
  font-size: 0.95rem;
  line-height: 2;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0.3125rem 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-inline-end: 0.3125rem;
}

.footer-links a:hover .feather-small {
  color: var(--accent) !important;
}

.feather-small {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -3px;
  margin-inline-end: 0.625rem;
  transition: color 0.2s ease;
}

.footer-logo {
  width: 100px;
  margin-bottom: 1.125rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

/* Footer Icon Colors */
.footer-column:nth-child(2) .footer-links li:nth-child(1) .feather-small,
.footer-column:nth-child(3) .footer-links li:nth-child(1) .feather-small,
.footer-column:nth-child(4) .footer-links li:nth-child(1) .feather-small { color: var(--footer-icon-1); }

.footer-column:nth-child(2) .footer-links li:nth-child(2) .feather-small,
.footer-column:nth-child(3) .footer-links li:nth-child(2) .feather-small,
.footer-column:nth-child(4) .footer-links li:nth-child(2) .feather-small { color: var(--footer-icon-2); }

.footer-column:nth-child(2) .footer-links li:nth-child(3) .feather-small,
.footer-column:nth-child(3) .footer-links li:nth-child(3) .feather-small,
.footer-column:nth-child(4) .footer-links li:nth-child(3) .feather-small { color: var(--footer-icon-3); }

.footer-column:nth-child(2) .footer-links li:nth-child(4) .feather-small,
.footer-column:nth-child(3) .footer-links li:nth-child(4) .feather-small,
.footer-column:nth-child(4) .footer-links li:nth-child(4) .feather-small { color: var(--footer-icon-4); }

.values-links a {
  cursor: default;
}

.values-links a:hover {
  transform: none;
  color: var(--muted);
  padding-inline-end: 0;
}

.values-links a:hover .feather-small {
  color: inherit !important;
}

.link-soon {
  opacity: 0.6;
  cursor: not-allowed;
  text-decoration: line-through;
}

.link-soon:hover {
  color: var(--muted) !important;
  transform: none !important;
  padding-inline-end: 0;
}

.footer-bottom-wrapper {
  background-color: var(--bg);
}

.footer-dedication-strip {
  color: var(--muted);
  padding: 1.25rem 0;
  font-size: 0.95rem;
  text-align: center;
  font-style: italic;
  border-bottom: 1px solid var(--card-border);
}

.footer-dedication-strip strong {
  color: var(--text);
  font-weight: 500;
}

.footer-credit-strip {
  padding: 1rem 0;
  font-size: 0.9rem;
}

.footer-credit-strip .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9375rem;
}

/* =================================
   Fixed Controls - Enhanced
   ================================= */
.audio-control,
.theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  width: 50px;
  height: 50px;
  background: var(--panel);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--card-border);
  z-index: var(--z-fixed);
  transition: var(--transition);
  will-change: transform;
}

.audio-control {
  left: 1.25rem;
}

.theme-toggle {
  right: 1.25rem;
}

.audio-control:hover,
.theme-toggle:hover {
  transform: scale(1.1);
}

.audio-control.muted .icon-on { display: none; }
.audio-control.muted .icon-off { display: block; color: var(--muted); }
.audio-control:not(.muted) .icon-on { display: block; color: var(--accent); }
.audio-control:not(.muted) .icon-off { display: none; }

.theme-toggle .icon-dawn { display: block; }
.theme-toggle .icon-night { display: none; }

:root[data-skin="sunrise"] .theme-toggle .icon-dawn { display: none; }
:root[data-skin="sunrise"] .theme-toggle .icon-night { display: block; }
:root[data-skin="sunrise"] .audio-control, 
:root[data-skin="sunrise"] .theme-toggle { color: var(--text); }

.back-to-top {
  position: fixed;
  bottom: 5rem;
  left: 1.25rem;
  width: 50px;
  height: 50px;
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  z-index: calc(var(--z-fixed) + 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  will-change: transform, opacity;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: scale(1.1);
  color: var(--accent);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* =================================
   Animations - Enhanced
   ================================= */
.btn-breath {
  animation: breath-animation 3s ease-in-out infinite;
}

@keyframes breath-animation {
  0% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  }
}

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

.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--panel) 0%,
    var(--panel-2) 50%,
    var(--panel) 100%
  );
  background-size: 200px 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

/* =================================
   Icons & Visual Elements
   ================================= */
.feather {
  width: 1.2em;
  height: 1.2em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feather-sun { color: #ffb300; }
.feather-activity { color: #ef5350; }
.feather-book-open { color: #29b6f6; }
.feather-message-circle { color: #ff7043; }
.feather-star { color: var(--icon-tributes); }

/* =================================
   Form Enhancements
   ================================= */
.char-counter {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: -0.25rem;
}

.char-counter-bar {
  width: 100px;
  height: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.char-counter-progress {
  height: 100%;
  width: 0%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.char-counter.limit-warning .char-counter-progress {
  background: var(--warning);
}

.char-counter.limit-exceeded .char-counter-progress {
  background: var(--danger);
}

.char-counter.limit-exceeded #charCount {
  color: var(--danger);
  font-weight: bold;
}

form button.btn-submit {
  padding: 0.5rem 1.125rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: auto;
  display: inline-block;
}

.hp-wrap {
  display: none !important;
}

/* =================================
   System Messages - Enhanced (TIGHT VERSION)
   ================================= */
.form-status:not(.success):not(.error) {
  display: none !important;
}

.system-message,
.form-status.success,
.form-status.error {
  /* שינוי מרכזי: הורדתי את הריפוד למעלה/למטה ל-0.6rem במקום 0.9rem */
  padding: 0.6rem 1rem !important;
  
  /* הקטנתי גם את המרווח החיצוני (margin) כדי שההודעה לא תדחוף את התוכן רחוק מדי */
  margin: 0.75rem 0 !important;
  
  border-radius: var(--border-radius) !important;
  border: 1px solid !important;
  display: flex !important;
  align-items: flex-start !important; /* שינוי מ-center ל-flex-start כדי שטקסט ארוך לא יישבר מוזר */
  gap: 0.75rem !important;
  
  /* הקטנה קלה של הפונט וגובה השורה למראה הדוק יותר */
  font-size: 0.95rem !important;
  line-height: 1.4 !important; 
  
  font-weight: 500 !important;
  background-image: none !important;
}

.system-message .feather,
.form-status .feather {
  width: 18px; /* הקטנתי טיפה את האייקון שיתאים לגובה החדש */
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem; /* יישור עדין מול הטקסט */
}

.system-message.success,
.form-status.success {
  background-color: color-mix(in srgb, var(--success) 10%, transparent) !important; /* רקע עדין יותר */
  border-color: var(--success) !important;
  color: var(--success) !important;
}

.system-message.error,
.form-status.error {
  background-color: color-mix(in srgb, var(--danger) 10%, transparent) !important; /* רקע עדין יותר */
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}
/* =================================
   Daily Inspiration Components
   ================================= */
.daily-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
}

.daily-inspiration-grid h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

:root[data-skin="sunrise"] .daily-inspiration-grid h4 {
  color: var(--accent);
}

.daily-inspiration-grid .quote-text {
  font-size: 0.95rem;
  margin: 0;
  padding: 0.75rem;
}

.daily-inspiration-grid .player {
  height: 180px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.daily-inspiration-grid .daily-quote {
  background-color: var(--panel-2);
  padding: var(--padding);
  border-radius: var(--border-radius);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.daily-inspiration-grid .daily-quote blockquote.quote-text {
  flex-grow: 1;
  font-size: 1rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
  quotes: """ """ "'" "'";
}

.daily-inspiration-grid .daily-quote blockquote.quote-text::before {
  content: open-quote;
}

.daily-inspiration-grid .daily-quote blockquote.quote-text::after {
  content: close-quote;
}

.daily-inspiration-grid .quote-author {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: right;
}

:root[data-skin="sunrise"] .daily-inspiration-grid .daily-quote {
  background-color: #fbf8f2;
}

.inspiration-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 250px;
}

.quote-carousel {
  text-align: center;
}

.quote-carousel-item {
  animation: fadeIn 0.8s ease-in-out;
}

.quote-carousel-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

.quote-carousel-author {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.inspiring-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9375rem;
  margin-top: 0.625rem;
  margin-bottom: 1.5625rem;
}

#getQuestionBtn {
  background-color: transparent;
  border: 1px solid var(--card-border);
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#getQuestionBtn:hover {
  background-color: var(--panel-2);
  color: var(--accent);
  border-color: var(--accent);
}

#questionDisplay {
  text-align: center;
  max-width: 90%;
  width: fit-content;
  margin: 0 auto;
  padding: 0.9375rem 1.5625rem;
  position: relative;
  border: 1px solid var(--card-border);
  background-color: var(--panel-2);
  border-radius: var(--border-radius);
}

#questionDisplay::before {
  content: '✨';
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  font-size: 1.1rem;
  transform: rotate(15deg);
}

.text-right {
  text-align: left;
  margin-top: 0.625rem;
}

#messageForm {
  margin-bottom: 1.875rem;
}

/* =================================
   Particles & Background Effects
   ================================= */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--bg);
  transition: background-color 0.5s ease;
}

/* =================================
   Media Queries & Responsive Design
   ================================= */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .chandler-moments {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .daily-inspiration-grid .player {
    height: 220px;
  }
  
  .pulse-stats {
    flex-direction: column;
    text-align: center;
  }
  
  .topnav {
    flex-direction: column;
    align-items: center;
  }
  
  .utility-bar .user-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-column h4 {
    display: block;
    border-right: none;
  }
  
  .footer-links li,
  .values-links li {
    justify-content: center;
  }
  
  .footer-logo {
    margin: 0 auto 1.125rem;
  }
  
  .daily-inspiration-grid .daily-quote {
    padding: 1rem;
  }
  
  .daily-inspiration-grid .daily-quote blockquote.quote-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .back-to-top,
  .audio-control,
  .theme-toggle {
    width: 45px;
    height: 45px;
  }
  
  .container {
    padding: 1rem;
  }
}

/* =================================
   Print Styles
   ================================= */
@media print {
  .audio-control,
  .theme-toggle,
  .back-to-top,
  .topnav,
  #tsparticles {
    display: none !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  * {
    background: white !important;
    color: black !important;
  }
}

/* =================================
   High Contrast Mode Support
   ================================= */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid;
  }
  
  button {
    border: 2px solid currentColor;
  }
  
  input,
  textarea,
  select {
    border: 2px solid;
  }
}
/* =================================
   404 Page Styles
   ================================= */
.not-found-page {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--panel);
    border-radius: var(--border-radius-large);
    margin: 2rem auto;
    max-width: 900px;
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
:root[data-skin="sunrise"] .not-found-page {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.not-found-page h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.not-found-page .lead {
    font-size: 1.25rem;
    color: var(--muted);
    margin-top: 1rem;
    line-height: 1.6;
}

.campfire-image {
    position: relative;
    margin: 2rem auto;
    max-width: 300px;
}
.campfire-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
#spark-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.search-form {
    margin: 2rem auto;
    max-width: 500px;
}
.search-form .form-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.search-form input {
    flex-grow: 1;
}

.useful-links {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.useful-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    background-color: var(--panel-2);
    color: var(--accent);
    transition: var(--transition);
}
.useful-links a:hover {
    background-color: var(--bg);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal-backdrop);
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--panel);
    margin: 10% auto;
    padding: 2rem;
    border-radius: var(--border-radius-large);
    max-width: 400px;
    text-align: center;
    color: var(--text);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
:root[data-skin="sunrise"] .modal-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-content h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.modal-content .form-field {
    margin-bottom: 1rem;
}

/* =================================
   Search Page Styles
   ================================= */
.search-results {
    margin-top: 2rem;
    text-align: right;
}

.search-result {
    background-color: var(--panel-2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--padding);
    margin-bottom: var(--gap);
    transition: var(--transition);
}

.search-result:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.search-result a {
    text-decoration: none;
    color: var(--text);
    display: block;
}

/* הסרת העיצוב המיותר של quote-text */
.search-result .quote-text {
    padding: 0;
    border: none;
    background: none;
    font-style: normal;
    color: inherit;
}

.search-result .quote-author {
    color: var(--muted);
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* הדגשת מילת החיפוש */
.search-highlight {
    background-color: var(--accent);
    color: var(--bg);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.daily-spark {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
}
.inspiring-question-filler {
    background-color: color-mix(in srgb, var(--accent) 10%, transparent);
}

.daily-inspiration-grid {
    display: grid;
    /* רשת גמישה שיודעת להתמודד עם 2, 3 או 4 פריטים */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}



/* --- Content area inside the card --- */
.daily-inspiration-grid .daily-item .player,
.daily-inspiration-grid .daily-item .quote-text {
    padding: var(--padding);
    flex-grow: 1;
}

/* --- Applying the Theme-Aware colors to each ribbon AND ICON --- */
.daily-inspiration-grid .daily-item:nth-child(1) h4 { background-color: var(--accent-color-song); }
.daily-inspiration-grid .daily-item:nth-child(1) h4 .feather { color: var(--accent-color-song); }

.daily-inspiration-grid .daily-item:nth-child(2) h4 { background-color: var(--accent-color-quote-he); }
.daily-inspiration-grid .daily-item:nth-child(2) h4 .feather { color: var(--accent-color-quote-he); }

.daily-inspiration-grid .daily-item:nth-child(3) h4 { background-color: var(--accent-color-quote-en); }
.daily-inspiration-grid .daily-item:nth-child(3) h4 .feather { color: var(--accent-color-quote-en); }

.daily-inspiration-grid .daily-item:nth-child(4) h4 { background-color: var(--accent-color-story); }
.daily-inspiration-grid .daily-item:nth-child(4) h4 .feather { color: var(--accent-color-story); }


/* --- Hover effect for all items --- */
.daily-inspiration-grid .daily-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

/* --- General text styling remains the same --- */
.daily-inspiration-grid .daily-item .quote-text {
    font-size: 1rem;
    color: var(--muted);
}
.editor-preface {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: var(--panel-2);
    border-radius: var(--border-radius);
    text-align: center;
}

/* =================================
   The Open Field (השדה הפתוח) - v3.0 FINAL
   ================================= */

/* Container for all the message cards */
#messagesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Styling for each individual message "note" */
.message-card {
    background: var(--panel-2); /* Uses your existing theme variable */
    border: 1px solid var(--card-border);
    padding: 1.25rem;
    border-radius: 4px 4px 12px 4px; /* "Folded corner" effect */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.message-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Subtle, random-feeling rotation for each card */
.message-card:nth-child(5n+1) { transform: rotate(1.5deg); }
.message-card:nth-child(5n+2) { transform: rotate(-1deg); }
.message-card:nth-child(5n+3) { transform: rotate(0.5deg); }
.message-card:nth-child(5n+4) { transform: rotate(-1.5deg); }
.message-card:nth-child(5n+5) { transform: rotate(1deg); }

/* Ensure hover effect respects the base rotation */
.message-card:nth-child(5n+1):hover { transform: translateY(-5px) scale(1.03) rotate(1.5deg); }
.message-card:nth-child(5n+2):hover { transform: translateY(-5px) scale(1.03) rotate(-1deg); }
.message-card:nth-child(5n+3):hover { transform: translateY(-5px) scale(1.03) rotate(0.5deg); }
.message-card:nth-child(5n+4):hover { transform: translateY(-5px) scale(1.03) rotate(-1.5deg); }
.message-card:nth-child(5n+5):hover { transform: translateY(-5px) scale(1.03) rotate(1deg); }

.message-content {
    font-size: 1.05rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    flex-grow: 1;
    color: var(--text); /* Uses your existing theme variable */
}

.message-meta {
    margin-top: 1rem;
    text-align: left;
    font-size: 0.85rem;
    color: var(--muted); /* Uses your existing theme variable */
}
@keyframes fresh-glow {
  0%, 100% { box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2), 0 0 8px var(--accent); }
}

.message-card.is-fresh {
  border-color: var(--accent);
  animation: fresh-glow 2.5s ease-in-out infinite;
}
/* =================================
   Active Campfire Effect
   ================================= */
#campfire-particles {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh; /* גובה של 40% מגובה המסך */
    z-index: 0;   /* ודא שזה מופיע מאחורי התוכן אבל מעל הרקע */
    pointer-events: none; /* מאפשר ללחוץ "דרך" האנימציה על התוכן שמאחוריה */
}


/* =================================
   Intimate Writing Mode Styles (v3.1 - CLEANED)
   ================================= */
.section-title-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.btn-icon:hover {
    background-color: var(--panel-2);
    color: var(--accent);
}
.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* 🔥 [התיקון מתחיל כאן] 🔥 */
body.intimate-mode-active {
    /* עדיין משתמשים ב-flex כדי למרכז את הטופס */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden; /* מונע גלילה מיותרת */
}

/* 1. מסתירים את *כל* הילדים הישירים של body */
body.intimate-mode-active > * {
    display: none;
}

/* 2. מחזירים לחיים *רק* את הנתיב לטופס ואת הכפתורים הצפים */
body.intimate-mode-active .main-content-container,
body.intimate-mode-active #leave-a-message,
body.intimate-mode-active .floating-action-buttons,
body.intimate-mode-active .back-to-top {
    display: block !important; /* כופה עליהם להופיע */
}

/* 3. בתוך הנתיב, מסתירים את כל האחים של הטופס */
body.intimate-mode-active .main-content-container > *,
body.intimate-mode-active .main-content-container > main > *,
body.intimate-mode-active .homepage-main-grid > *:not(#leave-a-message) {
    display: none;
}


/* 4. מחזירים לחיים *רק* את הטופס עצמו */
body.intimate-mode-active .main-content-container > main,
body.intimate-mode-active .main-content-container > main > .homepage-main-grid,
body.intimate-mode-active .homepage-main-grid > #leave-a-message {
    display: block !important;
}
/* 🔥 [התיקון מסתיים כאן] 🔥 */


/* זה הכלל שנותן לטופס את העיצוב הממורכז */
body.intimate-mode-active #leave-a-message {
    position: relative; 
    width: 100%;
    height: auto;
    max-width: 800px; 
    z-index: 1000;
    margin: 0;
    overflow-y: auto;
    border-radius: var(--border-radius-large); 
}

/* כללים להחלפת האייקון בכפתור */
body.intimate-mode-active #intimate-mode-toggle .feather-maximize {
    display: none;
}
body:not(.intimate-mode-active) #intimate-mode-toggle .feather-minimize {
    display: none;
}

/* Tooltip Styles (v3 - JavaScript Powered) */
#global-tooltip {
    position: fixed; /* Use fixed positioning to float above everything */
    background-color: var(--panel-2);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: var(--z-tooltip);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* The tooltip itself should not be interactive */
}

#global-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* Active Bonfire Mode Styles (v2 - Border Method) */
@keyframes pulse-border {
  0% {
    border-color: rgba(255, 202, 40, 0);
  }
  50% {
    border-color: rgba(255, 202, 40, 0.7);
  }
  100% {
    border-color: rgba(255, 202, 40, 0);
  }
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  
  /* Start with a transparent border */
  border: 4px solid transparent;
  border-radius: var(--border-radius-large);
  
  /* Set a transition for smoothness */
  transition: border-color 0.5s ease-in-out;
  
  animation: none;
}

body.bonfire-active::after {
  animation: pulse-border 2.5s ease-in-out 3; /* Pulse 3 times */
}


/* --- Emoji Picker Overlay & Fixes --- */

/* 1. הכלל הזה מונע מהדף לגלול כשהחלונית פתוחה */
body.emoji-picker-open {
    overflow: hidden;
}

/* 2. זהו העיצוב של שכבת הכיסוי הכהה שניתן ללחוץ עליה */
.pell-emoji-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
}

/* 3. הכלל הזה מוודא שבורר האימוג'ים יושב מעל שכבת הכיסוי */
emoji-picker.pell-emoji-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

/* ================================================= */
/* Announcements - v6 (DEFINITIVE & FINAL FIX)     */
/* ================================================= */

/* --- Keyframes (Unchanged) --- */
@keyframes breathing-halo {
    0%, 100% { box-shadow: 0 0 12px 0px rgba(var(--ann-color-rgb), 0); }
    50% { box-shadow: 0 0 18px 6px rgba(var(--ann-color-rgb), 0.4); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- The Main Announcement Bar --- */
.site-announcement {
    --ann-color-rgb: 76, 175, 80; /* Default to success */
    --ann-color: rgb(var(--ann-color-rgb));
    
    position: relative;
    display: flex;
    justify-content: center; /* Horizontally center content */
    align-items: center;     /* Vertically center content */
    gap: 1rem;
    padding: 0.75rem 5rem; /* Vertical padding & side padding for close button */
    background-color: var(--panel-2);
    border-bottom: 1px solid var(--card-border);
    animation: breathing-halo 4s ease-in-out infinite alternate;
    min-height: 60px; /* Ensure bar has height even with less content */
}

/* Colored indicator strip */
.site-announcement::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background-color: var(--ann-color);
}

/* Setting colors for each type */
.site-announcement[data-type="info"] { --ann-color-rgb: 33, 150, 243; }
.site-announcement[data-type="success"] { --ann-color-rgb: 76, 175, 80; }
.site-announcement[data-type="warning"] { --ann-color-rgb: 255, 152, 0; }
.site-announcement[data-type="danger"] { --ann-color-rgb: 211, 47, 47; }
.site-announcement[data-type="update"] { --ann-color-rgb: 126, 87, 194; }
.site-announcement[data-type="community"] { --ann-color-rgb: 240, 98, 146; }
.site-announcement[data-type="maintenance"] { --ann-color-rgb: 141, 110, 99; }
.site-announcement[data-type="question"] { --ann-color-rgb: 38, 166, 154; }

/* Icon in a colored circle */
.announcement-icon-wrapper {
    width: 40px; /* Slightly larger for presence */
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: rgba(var(--ann-color-rgb), 0.15);
    border: 1px solid rgba(var(--ann-color-rgb), 0.3);
}
.announcement-icon-wrapper svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    stroke: var(--ann-color);
}

/* NEW: Wrapper for all text content */
.announcement-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align title/summary block */
    text-align: center;
    gap: 0.25rem; /* Small gap between title row and summary */
}

/* Title and "Read More" link now on the same line */
.announcement-text-content {
    display: flex;
    align-items: baseline; /* Aligns title and link nicely */
    gap: 0.75rem;
}
.announcement-text-content span {
    font-weight: 500;
    font-size: 1.1rem; /* Make title more prominent */
    color: var(--text);
}
.announcement-text-content .read-more {
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--ann-color);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    white-space: nowrap; /* Prevent link from breaking */
}
.announcement-text-content .read-more:hover {
    opacity: 1;
    text-decoration: underline;
}

/* NEW: Style for the summary text */
.announcement-summary {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    max-width: 60ch; /* Limit width for readability */
}

/* The Close Button (DEFINITIVE FIX) */
.close-announcement {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; /* Larger touch/click target */
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0; /* Remove padding to rely on flex centering */
    opacity: 0.7; /* Start slightly transparent */
}
.close-announcement:hover {
    background-color: rgba(var(--ann-color-rgb), 0.15);
    color: var(--ann-color);
    transform: translateY(-50%) rotate(90deg) scale(1.1); /* Add scale for effect */
    opacity: 1;
}
.close-announcement svg {
    stroke: currentColor;
    width: 22px;
    height: 22px;
}


/* --- Styles for the Announcements Page (Unchanged but included for completeness) --- */
.announcements-list {
    max-width: 800px;
    margin: 2rem auto;
    animation: fade-in 0.5s ease-out;
}
.announcement-item {
    background-color: var(--panel);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-left: 5px solid; /* Defined by type below */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.announcement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.announcement-item.type-info { border-left-color: rgb(33, 150, 243); }
.announcement-item.type-success { border-left-color: rgb(76, 175, 80); }
.announcement-item.type-warning { border-left-color: rgb(255, 152, 0); }
.announcement-item.type-danger { border-left-color: rgb(211, 47, 47); }
.announcement-item.type-update { border-left-color: rgb(126, 87, 194); }
.announcement-item.type-community { border-left-color: rgb(240, 98, 146); }
.announcement-item.type-maintenance { border-left-color: rgb(141, 110, 99); }
.announcement-item.type-question { border-left-color: rgb(38, 166, 154); }

.announcement-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}
.announcement-header:hover {
    background-color: var(--panel-2);
}
.announcement-header h2 {
    margin: 0;
    font-size: 1.4rem;
    flex-grow: 1;
    font-weight: 700;
}
.announcement-icon-large {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.announcement-item.type-info .announcement-icon-large { color: rgb(33, 150, 243); }
.announcement-item.type-success .announcement-icon-large { color: rgb(76, 175, 80); }
.announcement-item.type-warning .announcement-icon-large { color: rgb(255, 152, 0); }
.announcement-item.type-danger .announcement-icon-large { color: rgb(211, 47, 47); }
.announcement-item.type-update .announcement-icon-large { color: rgb(126, 87, 194); }
.announcement-item.type-community .announcement-icon-large { color: rgb(240, 98, 146); }
.announcement-item.type-maintenance .announcement-icon-large { color: rgb(141, 110, 99); }
.announcement-item.type-question .announcement-icon-large { color: rgb(38, 166, 154); }

.announcement-date {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}

.announcement-body {
    padding: 0 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}
.announcement-item.expanded .announcement-body {
    max-height: 1500px;
    padding: 1.5rem 2rem 2rem;
}
.announcement-body p:first-child { margin-top: 0; }
.announcement-body p:last-child { margin-bottom: 0; }

/* --- Styles for Interactive Announcements Page --- */
.announcement-header {
    cursor: pointer;
    user-select: none; /* Prevent text selection on click */
    transition: background-color 0.2s ease;
}

.announcement-header:hover {
    background-color: var(--panel-2);
}

.announcement-icon-large {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.announcement-item.expanded .announcement-icon-large {
    transform: rotate(90deg);
}

.announcement-body {
    padding: 0 2rem; /* Remove vertical padding when closed */
    line-height: 1.8;
    font-size: 1.1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.announcement-item.expanded .announcement-body {
    max-height: 1500px; /* A large enough value to allow content to expand */
    padding: 1.5rem 2rem 2rem;
}

.announcement-body p:first-child { margin-top: 0; }
.announcement-body p:last-child { margin-bottom: 0; }

/* --- NEW: Styles for Upgraded Footer --- */
.footer-column h4 .feather-small {
    vertical-align: -3px;
    margin-inline-end: 0.5rem;
}

.support-numbers li a {
    font-weight: 500;
}

.support-numbers li strong {
    color: var(--text);
}
/* --- NEW: Footer Column Hover Effect --- */
.footer-column {
    /* Add a transition to the base element for a smooth effect */
    transition: all 0.3s ease-in-out;
    border-radius: var(--border-radius); /* Add border-radius for the hover background */
}

.footer-column-content {
    padding: 1rem;
}

.footer-column:hover {
    transform: translateY(-5px);
    background-color: var(--panel-2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* ================================================= */
/* Tributes Pages ('Shining Souls') - Final Styles  */
/* ================================================= */

/* --- Main List Page (tributes/index.php) --- */
.tributes-list-page h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tribute-card {
    background-color: var(--panel);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tribute-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.tribute-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.tribute-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tribute-card:hover .tribute-image {
    transform: scale(1.05);
}

.tribute-info {
    padding: var(--padding);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.tribute-name {
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.tribute-years {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tribute-quote {
    font-style: italic;
    flex-grow: 1;
    color: var(--text);
}

.btn-view-tribute {
    margin-top: 1.5rem;
    background-color: var(--panel-2);
    color: var(--accent);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    align-self: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tribute-card:hover .btn-view-tribute {
    background-color: var(--accent);
    color: var(--bg);
}


/* --- Single Tribute Page (tributes/tribute.php) --- */
.tribute-hero {
    position: relative;
    height: 60vh;
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius-large);
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-shadow: 0 4px 10px rgba(0,0,0,0.6);
    margin-bottom: 0.5rem;
}

.hero-content .tribute-years {
    font-weight: 500; /* Bolder for visibility */
    text-shadow: 0 2px 8px rgba(0,0,0,0.8); /* Stronger shadow */
}

.tribute-main-content {
    max-width: 800px;
    margin: -5rem auto 2rem auto; /* Pull content up over the hero */
    position: relative;
    z-index: 3;
    display: grid;
    gap: 1.5rem;
}

.tribute-main-content h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent);
    margin-top: 0;
}

/* --- TIMELINE FIX --- */
.tribute-timeline {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    position: relative;
}
.tribute-timeline::before { /* The vertical line */
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    right: 49px; /* Position it relative to the year */
    width: 2px;
    background-color: var(--card-border);
}

.tribute-timeline li {
    display: flex;
    gap: 1.5rem;
    align-items: center; 
    position: relative;
    padding: 0.75rem 0;
}

.timeline-year {
    flex: 0 0 70px; /* Give it a fixed width and prevent shrinking */
    font-weight: 700;
    text-align: right;
    color: var(--accent);
    position: relative;
    padding-right: 25px;
}
.timeline-year::after { /* The dot on the line */
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent);
}
.timeline-event {
    flex-grow: 1;
    color: var(--muted);
    padding: 0.75rem;
    background-color: var(--panel-2);
    border-radius: var(--border-radius);
}
/* --- END OF TIMELINE FIX --- */

.tribute-blockquote {
    font-style: italic;
    color: var(--muted);
    border-right: 3px solid var(--accent);
    padding-right: 1.5rem;
    margin: 1.5rem 0;
    font-size: 1.1rem;
}

/* --- GIF FIX --- */
.special-content-card .chandler-moments {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.special-content-card .chandler-gif {
    max-width: 200px;
    border-radius: 8px;
    order: -1; /* Place GIF on top */
}
.special-content-card .chandler-quotes {
    list-style: none;
    padding: 0;
    width: 100%;
}
.special-content-card .chandler-quotes li {
    background: var(--bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-right: 3px solid var(--accent);
}
/* --- END OF GIF FIX --- */


#community-candles .text-center {
    padding: 1rem 0;
}

#community-candles .btn-primary {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* Modal specific styles */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal-backdrop);
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal[style*="display: none"] {
    display: none !important;
}

.modal-content {
    background: var(--panel);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    width: 90%;
    max-width: 500px;
    position: relative;
}
.close-modal-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.modal-content h3 {
    color: var(--accent);
    margin-top: 0;
    text-align: center;
}
.modal-content form {
    display: grid;
    gap: 1rem;
}

/* =================================
   Static Pages - General Styles (UNIFIED & UPGRADED)
   ================================= */

.content-page {
    animation: fadeIn 0.5s ease-out;
}

.page-header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    background-color: var(--panel-2);
    border-radius: var(--border-radius-large);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 40%);
}

.page-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.page-header .lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) { /* Changed breakpoint for better layout */
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =================================
   Static Pages - Visual Level Up
   ================================= */

/* --- LEVEL UP: Defining a color palette for the blocks --- */
:root {
    --block-color-1: var(--icon-primary);   /* Green */
    --block-color-2: var(--icon-secondary);  /* Blue */
    --block-color-3: var(--icon-tertiary);   /* Yellow */
    --block-color-4: var(--icon-quaternary); /* Purple */
}

/* --- LEVEL UP: Applying a different colored border and icon to each card sequentially --- */
.main-content .card {
    transition: all 0.3s ease;
    border-top: 4px solid; /* Make border thicker */
}

/* Cycle through the 4 colors for each card */
.main-content .card:nth-child(4n+1) { border-top-color: var(--block-color-1); }
.main-content .card:nth-child(4n+2) { border-top-color: var(--block-color-2); }
.main-content .card:nth-child(4n+3) { border-top-color: var(--block-color-3); }
.main-content .card:nth-child(4n+4) { border-top-color: var(--block-color-4); }

/* Match the icon color inside the card's h2 to its border color */
.main-content .card:nth-child(4n+1) h2 .feather { color: var(--block-color-1); }
.main-content .card:nth-child(4n+2) h2 .feather { color: var(--block-color-2); }
.main-content .card:nth-child(4n+3) h2 .feather { color: var(--block-color-3); }
.main-content .card:nth-child(4n+4) h2 .feather { color: var(--block-color-4); }


.sidebar .card {
    border-top: 3px solid var(--accent);
}
.sidebar .card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- About Page --- */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.feature-item h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
}
.feature-item:nth-child(1) .feather { color: var(--icon-primary); }
.feature-item:nth-child(2) .feather { color: var(--icon-tertiary); }
.feature-item:nth-child(3) .feather { color: var(--icon-secondary); }
.feature-item:nth-child(4) .feather { color: var(--icon-quaternary); }

/* --- Join Us Page --- */
.roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.role-card {
    background-color: var(--panel-2);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}
.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-bottom-color: var(--accent);
}
.role-card h3 {
    color: var(--accent);
}

/* --- LEVEL UP: Creative fix for the Call to Action block --- */
.cta-card {
    text-align: center;
    border-radius: var(--border-radius-large); /* More rounded */
    padding: 2rem; /* More space */
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 80%, black));
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cta-card h2, .cta-card p {
    color: inherit; /* Inherit the white color */
}

.cta-card button {
    background-color: rgba(255,255,255,0.9);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-card button:hover {
    background-color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* --- 404 Page --- */
.not-found-page .useful-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.not-found-page .useful-links a {
    text-decoration: none;
    color: var(--accent);
    background-color: var(--panel-2);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.not-found-page .useful-links a:hover {
    background-color: var(--accent);
    color: var(--bg);
    transform: scale(1.05);
}

.search-form-404 {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 1rem auto;
}
.search-form-404 input {
    flex-grow: 1;
}

/* =================================
   Sunrise (Light Theme) Overrides
   ================================= */
:root[data-skin="sunrise"] {
    /* --- Static Pages --- */
    .role-card {
        color: var(--text); 
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    }
    
    .cta-card {
        background: var(--accent);
        color: #ffffff;
        text-shadow: none;
    }

    .cta-card button {
        background-color: #ffffff;
        color: var(--accent);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .cta-card button:hover {
       background-color: #fff;
       box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    /* --- Tributes Pages --- */
    .tribute-hero .hero-content h1,
    .tribute-hero .hero-content .tribute-years {
        text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    }

    .special-content-card .chandler-quotes li {
        color: var(--text);
        background-color: var(--panel-2);
    }
    
    .main-content .card, .sidebar .card {
        box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    }
}

/* =================================
    Site Logo Fix
   ================================= */
.branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.site-logo {
    width: 60px;  /* You can adjust this value */
    height: auto;
}

.site-title-group h1,
.site-title-group p {
    margin: 0;
    text-align: right;
}

/* ================================================= */
/* ================================================= */
/* == SPARK UI UPGRADES - ALL NEW STYLES FROM HERE == */
/* ================================================= */
/* ================================================= */

/* =================================
    General Fixes & Upgrades
   ================================= */
.branding {
    justify-content: center; /* FIX: Center the logo and title */
}

/* =================================
    Upgraded Theme Toggle Button (LEVEL UP)
   ================================= */
.theme-toggle-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: var(--z-fixed);
}

/* Hide the old, now unused, button structure */
.theme-toggle {
    display: none;
}

.theme-toggle-switch {
    width: 60px;
    height: 30px;
    background: #3b2b24; /* Dark theme base */
    border: 1px solid var(--card-border);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.4s ease;
}

.theme-toggle-switch .slider {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icons inside the slider */
.theme-toggle-switch .slider::before,
.theme-toggle-switch .slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    transition: all 0.4s ease;
}

/* Moon Icon (Default state) */
.theme-toggle-switch .slider::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>') center no-repeat;
    opacity: 1;
    transform: scale(1);
}

/* Sun Icon (Checked state) */
.theme-toggle-switch .slider::after {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23fdf6e3" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>') center no-repeat;
    opacity: 0;
    transform: scale(0);
}

/* --- FIX: Hide the actual checkbox --- */
#theme-toggle-checkbox {
    display: none;
}

#theme-toggle-checkbox:checked ~ .slider {
    transform: translateX(30px);
}

#theme-toggle-checkbox:checked + .slider::before {
    opacity: 0;
    transform: scale(0);
}
#theme-toggle-checkbox:checked + .slider::after {
    opacity: 1;
    transform: scale(1);
}

:root[data-skin="sunrise"] .theme-toggle-switch {
    background: #f8f4e9;
    border-color: #e0d5b9;
}
:root[data-skin="sunrise"] .slider {
    background: var(--accent);
}

/* =================================
    Upgraded Form Styles
   ================================= */
.form-field-upgraded {
    position: relative;
}
.form-field-upgraded input {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: transparent;
    color: var(--text);
    width: 100%;
}
.form-field-upgraded label {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: var(--muted);
    pointer-events: none;
    transition: all 0.2s ease;
}
.form-field-upgraded input:focus ~ label,
.form-field-upgraded input:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    background-color: var(--panel);
    padding: 0 0.25rem;
    color: var(--accent);
}

/* --- LEVEL UP: Centered Form Actions --- */
.form-actions-center {
    text-align: center;
}

/* =================================
    Premium Button Styles
   ================================= */
.btn-premium {
    position: relative;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ffca28, #d35400);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.5s ease;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.btn-premium:hover::before {
    left: 100%;
}

/* =================================
    Subtle Button Styles (LEVEL UP)
   ================================= */
.inspiring-question {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.btn-subtle {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--muted);
    padding: 0.5rem 1rem;
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.btn-subtle:hover {
    background-color: var(--panel-2);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}
.btn-subtle .feather {
    width: 16px;
    height: 16px;
}

    /* Search page specific styles, following the new design system */
    .search-results {
        text-align: right;
        margin-top: 2rem;
        display: grid;
        gap: 1rem; /* Spacing from our 8px scale */
    }
    .search-result-card {
        background-color: var(--panel-1);
        border: 1px solid var(--card-border);
        border-radius: 8px; /* Consistent border-radius */
        padding: 1.5rem; /* Consistent padding */
        text-decoration: none;
        display: block;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .search-result-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }
    .result-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .result-type-badge {
        font-size: 0.8rem;
        font-weight: 500;
        padding: 0.25rem 0.6rem;
        background-color: var(--panel-2);
        border-radius: 20px;
        color: var(--muted);
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }
    .result-content {
        color: var(--text-color);
        font-size: 1.1rem;
        line-height: 1.6;
    }
    .result-content .search-highlight {
        background-color: rgba(var(--primary-color-rgb), 0.2);
        padding: 0 2px;
        border-radius: 3px;
    }
    .result-content .quote-author {
        color: var(--muted);
        display: block;
        margin-top: 0.5rem;
    }

    /* Hide audio-control only on 404 page */
body.page-404 .audio-control {
    display: none !important;
}

/* --- Visual Level Up for Static Page Content Blocks --- */

.c-content-block {
    border-top: 4px solid; /* Make border thicker */
    border-top-color: var(--accent-color-1); /* Default color */
    transition: all 0.3s ease;
}

.c-content-block h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.c-content-block h2 .feather {
    color: var(--accent-color-1); /* Default color */
}

/* Cycle through the 5 accent colors for each card in the main content */
.main-content .c-content-block:nth-child(5n+1) { border-top-color: var(--accent-color-1); }
.main-content .c-content-block:nth-child(5n+1) h2 .feather { color: var(--accent-color-1); }

.main-content .c-content-block:nth-child(5n+2) { border-top-color: var(--accent-color-2); }
.main-content .c-content-block:nth-child(5n+2) h2 .feather { color: var(--accent-color-2); }

.main-content .c-content-block:nth-child(5n+3) { border-top-color: var(--accent-color-3); }
.main-content .c-content-block:nth-child(5n+3) h2 .feather { color: var(--accent-color-3); }

.main-content .c-content-block:nth-child(5n+4) { border-top-color: var(--accent-color-4); }
.main-content .c-content-block:nth-child(5n+4) h2 .feather { color: var(--accent-color-4); }

.main-content .c-content-block:nth-child(5n+5) { border-top-color: var(--accent-color-5); }
.main-content .c-content-block:nth-child(5n+5) h2 .feather { color: var(--accent-color-5); }

/* Sidebar cards have a more subtle, unified color */
.sidebar .c-content-block {
    border-top-color: var(--accent);
}
.sidebar .c-content-block h2 .feather {
    color: var(--accent);
}
/* --- Static Page Header Icon Color (v2 - Contrasting Color) --- */
.page-header h1.has-icon .feather {
    color: var(--icon-secondary); /* Using the blue icon color for contrast */
}
/* --- Breadcrumbs Styling (v2 - with icon color fix) --- */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.breadcrumbs ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; align-items: center;
}
.breadcrumbs li {
    display: flex; align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: '›'; margin: 0 0.75rem; color: var(--muted);
}
.breadcrumbs a, .breadcrumbs span {
    color: var(--muted); text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.25rem 0.5rem;
}
.breadcrumbs a:hover {
    color: var(--accent); background-color: var(--panel-2); border-radius: 4px;
}
.breadcrumbs span[aria-current="page"] {
    color: var(--text); font-weight: 500;
}

/* --- THIS IS THE FIX --- */
.breadcrumbs .feather {
    width: 16px; height: 16px; stroke-width: 2.5;
    /* Default color for icons that don't have a specific one */
    color: var(--muted); 
}
.breadcrumbs a:hover .feather {
    color: var(--accent); /* Icon color on hover */
}
/* Specific icon colors */
.breadcrumbs .feather-home { color: var(--icon-primary); }
.breadcrumbs .feather-info { color: var(--icon-secondary); }
.breadcrumbs .feather-compass { color: var(--icon-secondary); }
.breadcrumbs .feather-shield { color: var(--icon-primary); }
.breadcrumbs .feather-users { color: var(--icon-quaternary); }
.breadcrumbs .feather-star { color: var(--icon-tertiary); }
.breadcrumbs .feather-bell { color: var(--accent); }
.breadcrumbs .feather-life-buoy { color: var(--icon-primary); }
.breadcrumbs .feather-mail { color: var(--icon-secondary); }
/* --- END OF FIX --- */

/* --- Global Fixes for Static Pages --- */

/* Force header icon color to be different from the title on ALL static pages */
.static-page-template .page-header h1.has-icon .feather {
    color: var(--icon-secondary) !important; /* Blue for contrast */
}

/* Fix for fallen list alignment */
.fallen-list {
    text-align: right; /* Ensure text is aligned to the right */
}

/* --- Preview Modal --- */
.preview-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.preview-content {
    background-color: var(--panel);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
}
.preview-content h3 {
    margin-top: 0;
    color: var(--accent);
}
.preview-content .close-preview {
    margin-top: 1rem;
    cursor: pointer;
}

/* =================================
   Zen Mode Styles (FIXED POSITION)
   ================================= */

/* The Button */
.zen-mode-toggle {
    position: fixed;
    /* This is the new position: */
    bottom: calc(1.25rem + 30px + 1rem); /* bottom-padding + theme-toggle-height + gap */
    right: 1.25rem;
    width: 50px;
    height: 50px;
    background: var(--panel);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--card-border);
    z-index: var(--z-fixed);
    transition: var(--transition);
    will-change: transform;
    color: var(--muted);
}

.zen-mode-toggle:hover {
    transform: scale(1.1);
    color: var(--accent);
}

/* The "Magic" Rule */
/* When the body has the .zen--active class, disable all animations */
body.zen-mode-active * {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

/* Change icon when active */
body.zen-mode-active .zen-mode-toggle {
    color: var(--accent);
    box-shadow: 0 0 10px var(--ring);
}

/* --- Final position fix for Back-to-Top Button --- */
.back-to-top {
    right: calc(320px + 30px); /* Sidebar width + gap */
}

/* On mobile, when the sidebar is at the bottom, return the button to its original spot */
@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
    }
}

/* =======================================================
   FLOATING SIDEBAR NOTICE (FINAL STABLE VERSION)
   ======================================================= */

.floating-notice-area {
    position: fixed; /* This makes it float on top of the page */
    bottom: 20px;
    right: 20px;
    width: 320px;
    z-index: 1001;
    animation: slideInUp 0.5s ease-out 0.5s both;
}

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

.sidebar-notice-card {
    background: var(--panel-2);
    color: var(--text);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    border-top: 4px solid var(--accent); 
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.close-notice-btn {
    position: absolute; top: 8px; left: 10px; background: none; border: none; font-size: 1.8rem; color: var(--muted); cursor: pointer; line-height: 1; padding: 0; transition: color 0.2s ease;
}
.close-notice-btn:hover { color: var(--text); }

.sidebar-notice-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notice-icon {
    font-size: 1.5rem;
}

.notice-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Color theming based on notice type */
.sidebar-notice-card[data-type="info"] { --accent: #4ea3ff; }
.sidebar-notice-card[data-type="tip"] { --accent: #4cc790; }
.sidebar-notice-card[data-type="announcement"] { --accent: #ffb020; }

/* Light theme adjustments */
:root[data-skin="sunrise"] .sidebar-notice-card {
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-notice-area {
        left: 10px;
        right: 10px;
        bottom: 80px; /* Raise it above the floating buttons */
        width: auto;
    }
}
/* --- Upgraded Notice Button Style 2.0 (with Feather Icon) --- */

.notice-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

.btn-notice {
    /* Layout for icon and text */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* Space between icon and text */
    direction: rtl; /* Ensure RTL layout for text and icon */

    /* Visuals */
    background-image: linear-gradient(to right, var(--accent) 0%, color-mix(in srgb, var(--accent), #000 15%) 100%);
    color: #ffffff; /* Text color */
    padding: 8px 16px;
    border-radius: 50px; /* More rounded, pill-like button */
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25); /* Stronger shadow */

    /* Text */
    text-decoration: none;
    font-size: 0.95rem; /* Slightly larger text */
    font-weight: 700;
    letter-spacing: 0.5px; /* Spacing between letters for better readability */

    /* Animation */
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden; /* For hover effect */
}

.btn-notice:hover {
    transform: translateY(-3px); /* Lifts up more */
    box-shadow: 0 6px 15px rgba(0,0,0,0.35); /* Stronger shadow on hover */
    filter: brightness(1.1); /* Slightly brighter on hover */
}

/* Pseudo-element for a subtle shine effect on hover */
.btn-notice::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2); /* White shine */
    transform: skewX(-30deg);
    transition: all 0.5s ease;
}

.btn-notice:hover::after {
    left: 100%; /* Slides the shine across */
}


/* Styling for the feather icon within the button */
.btn-notice .btn-notice-icon {
    width: 18px; /* Slightly larger icon */
    height: 18px;
    color: #ffffff; /* Icon color */
    stroke-width: 2.5; /* Thicker icon lines */
    transition: transform 0.3s ease-in-out;
}

.btn-notice:hover .btn-notice-icon {
    transform: translateX(-3px); /* Move icon slightly left on hover */
}

/* Adjustments for light theme if needed */
:root[data-skin="sunrise"] .btn-notice {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

:root[data-skin="sunrise"] .btn-notice:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Fix: Bring "Back to Top" & Action Buttons above the Sidebar Notice */
#back-to-top,
.floating-action-buttons {
    z-index: 1010;
}
/* =================================
   WIKI ACKNOWLEDGE BUTTON (FINAL FIX)
   ================================= */
.btn.btn-acknowledge {
    background-color: var(--success) !important;
    color: white !important;
    font-weight: bold !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.btn.btn-acknowledge .feather {
    width: 20px !important;
    height: 20px !important;
    stroke: white !important;
}

.btn.btn-acknowledge:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* ===============================================
   Footer Social Links - Fancy Hover Effect
   ================================================ */
.footer-social-links a {
    /* Controls the smoothness of the color and size change */
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-links a:hover {
    /* Makes the icon pop a little on hover */
    transform: scale(1.15) translateY(-2px);
}

.footer-social-links a[title="פייסבוק"]:hover {
    color: #1877F2; /* Facebook Blue */
}

.footer-social-links a[title="אינסטגרם"]:hover {
    color: #C13584; /* Instagram Pink/Purple */
}

.footer-social-links a[title="יוטיוב"]:hover {
    color: #FF0000; /* YouTube Red */
}
/* ===============================================
   Admin Maintenance Notice
   ================================================ */
.admin-maintenance-notice {
    background-color: #e74c3c;
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.admin-maintenance-notice span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
/* back-to-top – נשאר בפינה */
#back-to-top{
    position:fixed;
    bottom:20px;          /* כמו היום */
    right:20px;
    z-index:2200;         /* גבוה – מעל רוב התוכן */
}

/* הודעה צדדית – קצת מעל */
.floating-notice-area{
    position:fixed;
    bottom:90px;          /* 20 + 50-70px מרווח מעל החץ */
    right:20px;           /* אותה שורה אופקית */
    z-index:2100;         /* נמוך מהחץ, גבוה מהכול */
}

/* במסכים צרים – להימנע מחפיפה */
@media(max-width:600px){
    .floating-notice-area{
        right:10px;
        left:10px;        /* פרוס על כל הרוחב */
        bottom:80px;
    }
}

/* ===============================================
   Admin Sidebar - Colored Icons
   ================================================ */
.sidebar-nav .nav-item .feather,
.sidebar-nav .accordion button .feather {
    transition: color 0.2s ease;
}

.sidebar-nav .feather-home { color: #81c784; }        /* ראשי */
.sidebar-nav .feather-settings { color: #e57373; }   /* הגדרות ותפעול */
.sidebar-nav .feather-inbox { color: #4fc3f7; }      /* פניות מהאתר */
.sidebar-nav .feather-edit-3 { color: #64b5f6; }     /* ניהול תוכן */
.sidebar-nav .feather-star { color: #ffd54f; }       /* הנצחה */
.sidebar-nav .feather-tool { color: #ffb74d; }       /* ניטור וכלים */
/* ===============================================
   Global Colorful Icons (v2.0 - More Robust)
   ================================================ */

/* General style for common icons to make them stand out */
h1 .feather, h2 .feather, h3 .feather, .breadcrumbs .feather {
    stroke-width: 2;
    vertical-align: middle;
    margin-inline-end: 0.5rem;
    transition: transform 0.3s ease;
}

h1:hover .feather, h2:hover .feather, h3:hover .feather {
    transform: scale(1.1);
}

/* --- Icon Specific Colors (Attribute Selectors) --- */
/* This method colors the icon based on its name, regardless of where it is on the page */

/* Community & Connection (Warm Colors) */
[data-feather="heart"],
[data-feather="users"],
[data-feather="send"],
[data-feather="message-circle"],
[data-feather="home"] {
    color: #E74C3C; /* Pomegranate Red */
}

/* Vision & Inspiration (Bright Colors) */
[data-feather="star"],
[data-feather="award"],
[data-feather="zap"],
[data-feather="compass"] {
    color: #F1C40F; /* Sunflower Yellow */
}

/* Info & Safety (Calm Blues) */
[data-feather="shield"],
[data-feather="info"],
[data-feather="help-circle"],
[data-feather="life-buoy"],
[data-feather="grid"] {
    color: #3498DB; /* Peter River Blue */
}

/* Tools & Process (Creative Colors) */
[data-feather="tool"],
[data-feather="trending-up"],
[data-feather="code"],
[data-feather="coffee"] {
    color: #9B59B6; /* Amethyst Purple */
}

/* Content & Documents (Green Tones) */
[data-feather="list"],
[data-feather="file-text"],
[data-feather="music"],
[data-feather="edit-3"] {
    color: #2ECC71; /* Emerald Green */
}

/* Future & Sharing (Special Colors) */
[data-feather="link"],
[data-feather="arrow-right-circle"],
[data-feather="share-2"] {
    color: #1ABC9C; /* Turquoise */
}

/* ===============================================
   Footer - Final Color Polish
   ================================================ */

/* --- 1. Support Links Colors --- */
/* This targets the specific links in the support section */

.support-numbers a[href*="tel:1201"] {
    color: #2ECC71; /* Green for ERAN */
}
.support-numbers a[href*="sahar.org.il"] {
    color: #3498DB; /* Blue for SAHAR */
}
/* Keep the icons inheriting the new link color */
.support-numbers a .feather {
    color: inherit;
}


/* --- 2. AI Credit Icons Colors --- */
/* This targets each AI icon by its title attribute */

.ai-credits [title="Gemini"] .feather {
    color: #8E44AD; /* Purple */
}
.ai-credits [title="ChatGPT"] .feather {
    color: #74AA9C; /* Teal */
}
.ai-credits [title="Grok"] .feather {
    color: #E74C3C; /* Red */
}
.ai-credits [title="Copilot"] .feather {
    color: #2E86C1; /* Blue */
}
.support-numbers a[href*="urgent-help"] {
    color: var(--danger); /* Red for Urgent Help */
}

/* ===============================================
   FINAL FIX: Z-Index Stacking Context
   ================================================ */

/* 1. Header is the top layer, above everything */
.site-header {
    position: relative;
    z-index: 100;
}

/* 2. Particle layer is in the back and CANNOT be clicked */
#header-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    z-index: -1; /* Pushes it BEHIND the header's content */
    pointer-events: none; /* Makes it completely transparent to mouse clicks */
}

/* 3. Main content is on a lower layer than the header */
.main-content-container, .content-page {
    position: relative;
    z-index: 1;
}

/* 4. Failsafe for breadcrumbs - just in case */
.breadcrumbs a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* ===============================================
   FINAL & UNIFIED Component Styles
   ================================================ */

/* --- 1. Global Accent Colors --- */
:root {
    --accent-color-1: #5DADE2; /* Blue */
    --accent-color-2: #F1C40F; /* Yellow */
    --accent-color-3: #E74C3C; /* Red */
    --accent-color-4: #2ECC71; /* Green */
    --accent-color-5: #9B59B6; /* Purple */
}

/* --- 2. Generic Components --- */

/* Card for CTA/Sidebar */
.cta-card {
    background-color: var(--panel-2);
    text-align: center;
}
.cta-card.c-content-block {
    margin-top: 2rem;
}
.cta-card h2 .feather {
    color: inherit !important;
    opacity: 0.9;
}
.cta-card .btn-primary {
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

/* Tables (Rules, Data Retention etc.) */
.rules-table, .retention-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1.5rem;
}
.rules-table td, .retention-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}
.rules-table td.icon-cell {
    width: 40px;
    text-align: center;
    font-size: 1.5rem;
}
.rules-table .rule-category, .retention-table .rule-category {
    font-weight: bold;
    color: var(--text);
}
.rules-table .rule-explanation, .retention-table .rule-explanation {
    color: var(--muted);
}
.icon-cell.allowed { color: var(--success); }
.icon-cell.forbidden { color: var(--danger); }

/* --- 3. Page-Specific Components --- */

/* About Page: Feature List */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.feature-item {
    text-align: center;
}
.feature-item h3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text);
}
.feature-item h3 .feather {
    color: var(--accent);
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}
.feature-item p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: var(--muted);
}

/* Team Page */
.team-tabs { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid var(--card-border); padding-bottom: 1rem; }
.team-tab { background-color: transparent; border: none; color: var(--muted); font-size: 1.1rem; font-weight: 500; padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.team-tab.active, .team-tab:hover { color: var(--accent); background-color: var(--panel-2); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.team-card { background-color: var(--panel-2); border-radius: var(--border-radius); padding: 2rem; text-align: center; border: 1px solid var(--card-border); display: none; }
.team-card.active { display: block; }
.team-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 4px solid var(--accent); }
.team-name { font-size: 1.4rem; font-weight: 700; margin: 0; color: var(--text); }
.team-role { font-size: 0.9rem; font-weight: 500; color: var(--accent); margin-bottom: 1rem; display: block; }
.team-bio { font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

/* Accordion (Join Us, Support pages) */
.accordion-item {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-top: 4px solid var(--accent-color-1); /* Default color */
}
.accordion-item:nth-of-type(5n+2) { border-top-color: var(--accent-color-2); }
.accordion-item:nth-of-type(5n+3) { border-top-color: var(--accent-color-3); }
.accordion-item:nth-of-type(5n+4) { border-top-color: var(--accent-color-4); }
.accordion-item:nth-of-type(5n+5) { border-top-color: var(--accent-color-5); }
.accordion-button {
    background-color: var(--panel);
    color: var(--text);
    cursor: pointer;
    padding: 1.5rem;
    width: 100%;
    border: none;
    text-align: right;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.accordion-button:hover { background-color: var(--panel-2); }
.accordion-button::after {
    content: '+';
    color: var(--accent);
    font-weight: 700;
    margin-right: auto;
    transition: transform .2s;
}
.accordion-item.is-open .accordion-button::after {
    content: "−";
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease-out;
    background-color: var(--panel);
    padding: 0 1.5rem;
}
.accordion-content > *:last-child {
    padding-bottom: 1.5rem;
}
/* ===============================================
   Colored Top Borders for Content Blocks
   ================================================ */

/* Apply to both regular content cards and accordion items for consistency */
.c-content-block, 
.accordion-item {
    /* Add some space from the top to make the line visible */
    margin-top: 1rem;
    padding-top: 2rem;
    position: relative;
    border-top: 4px solid var(--accent-color-1); /* Default color (Blue) */
}

/* Cycle through the accent colors */
.c-content-block:nth-of-type(5n+2),
.accordion-item:nth-of-type(5n+2) {
    border-top-color: var(--accent-color-2); /* Yellow */
}

.c-content-block:nth-of-type(5n+3),
.accordion-item:nth-of-type(5n+3) {
    border-top-color: var(--accent-color-3); /* Red */
}

.c-content-block:nth-of-type(5n+4),
.accordion-item:nth-of-type(5n+4) {
    border-top-color: var(--accent-color-4); /* Green */
}

.c-content-block:nth-of-type(5n+5),
.accordion-item:nth-of-type(5n+5) {
    border-top-color: var(--accent-color-5); /* Purple */
}

/* Ensure the first block on a page has a bit more space from the top header */
.content-body > .c-content-block:first-child {
    margin-top: 0;
}
/* Secondary Button Style for Dual CTA */
.form-actions-dual .btn-secondary {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--muted);
    font-weight: normal;
    padding: 0 1.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.form-actions-dual .btn-secondary:hover {
    background-color: var(--panel-2);
    color: var(--text);
    border-color: var(--accent);
}

/* ===============================================
   Support Page - Polished Emergency Links
   ================================================ */

.support-numbers li a {
    text-decoration: none; /* Remove the default, ugly underline */
    color: var(--text);   /* Make the link color the same as regular text */
    border-bottom: 1px dashed var(--card-border); /* Add a subtle, dashed bottom border */
    padding-bottom: 4px; /* Add a little space between text and the new line */
    transition: color 0.3s ease, border-color 0.3s ease;
}

.support-numbers li a:hover {
    color: var(--accent); /* On hover, change text color to accent */
    border-bottom-color: var(--accent); /* And change the border color */
}

/* Ensure the bolded part inside the link is also the main text color */
.support-numbers li a strong {
    color: inherit; 
}

/* ===============================================
   Custom Top Text Bar
   ================================================ */
.site-top-text-bar {
    background-color: var(--panel-2);
    color: var(--muted);
    text-align: center;
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.site-title-group .tagline { display: block !important; }

/* ===================================================
   Daily Inspiration Item Styles (v10 - CORRECTED & RESTORED)
   =================================================== */

/* --- Defining the Theme-Aware Accent Colors for Ribbons --- */
:root {
    --accent-color-song: #a5d6a7;
    --accent-color-quote-he: #9fa8da;
    --accent-color-quote-en: #81d4fa;
    --accent-color-story: #ce93d8;
}
:root[data-skin="sunrise"] {
    --accent-color-song: #4caf50;
    --accent-color-quote-he: #5c6bc0;
    --accent-color-quote-en: #29b6f6;
    --accent-color-story: #9c27b0;
}

/* --- General styling for all items (Restored from your original) --- */
.daily-inspiration-grid .daily-item {
    transition: all 0.3s ease;
    background-color: var(--panel);
    background-image: linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.02) 75%, rgba(0,0,0,0.02)), 
                      linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.02) 75%, rgba(0,0,0,0.02));
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- The Title Ribbon (Restored from your original) --- */
.daily-inspiration-grid .daily-item h4 {
    color: var(--bg) !important;
    font-weight: 700;
    padding: 10px 15px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.15);
}

.daily-inspiration-grid .daily-item h4 .feather {
    stroke-width: 2.5;
}

/* --- Content area inside the card (Restored from your original) --- */
.daily-inspiration-grid .daily-item .player,
.daily-inspiration-grid .daily-item .quote-text {
    padding: var(--padding);
    flex-grow: 1;
}

/* --- Applying the Theme-Aware colors to each RIBBON ONLY --- */
/* This is where the old bug was. Now we only color the background. */
.daily-inspiration-grid .daily-item:nth-child(1) h4 { background-color: var(--accent-color-song); }
.daily-inspiration-grid .daily-item:nth-child(2) h4 { background-color: var(--accent-color-quote-he); }
.daily-inspiration-grid .daily-item:nth-child(3) h4 { background-color: var(--accent-color-quote-en); }
.daily-inspiration-grid .daily-item:nth-child(4) h4 { background-color: var(--accent-color-story); }

/* --- THIS IS THE FIX: The correct icon colors, now without conflicts --- */
.daily-inspiration-card h3 > [data-feather="award"] {
    color: var(--accent);
}
.daily-item h4 [data-feather="music"] {
    color: var(--icon-tertiary); /* Yellow */
}
.daily-item h4 [data-feather="star"] {
    color: var(--icon-secondary); /* Blue */
}
.daily-item h4 [data-feather="globe"] {
    color: var(--icon-primary); /* Green */
}
.daily-item h4 [data-feather="heart"] {
    color: var(--icon-quaternary); /* Purple */
}


/* --- Hover effect for all items (Restored from your original) --- */
.daily-inspiration-grid .daily-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

/* --- General text styling (Restored from your original) --- */
.daily-inspiration-grid .daily-item .quote-text {
    font-size: 1rem;
    color: var(--muted);
}
/* =======================================================
   FINAL ATTEMPT: Targeting SVG 'stroke' property directly
   ======================================================= */

/* This targets the main title icon of the "Daily Inspiration" block */
.daily-inspiration-card h3 > .feather-award {
    color: var(--accent) !important;
    stroke: var(--accent) !important; /* The important part */
}

/* This targets the icons within each item in that block */
.daily-item h4 .feather-music {
    color: var(--icon-tertiary) !important;
    stroke: var(--icon-tertiary) !important;
}

.daily-item h4 .feather-star {
    color: var(--icon-secondary) !important;
    stroke: var(--icon-secondary) !important;
}

.daily-item h4 .feather-globe {
    color: var(--icon-primary) !important;
    stroke: var(--icon-primary) !important;
}

.daily-item h4 .feather-heart {
    color: var(--icon-quaternary) !important;
    stroke: var(--icon-quaternary) !important;
}

/* ===============================================
   FINAL FIX: Force Colored Header Icons
   ================================================= */

/* --- צבע לאייקונים בכותרת הראשית של העמוד --- */
.static-page-template .page-header h1.has-icon [data-feather="book-open"] {
    stroke: var(--accent) !important;
}
.static-page-template .page-header h1.has-icon [data-feather="shield"] {
    stroke: var(--icon-primary) !important;
}
.static-page-template .page-header h1.has-icon [data-feather="info"] {
    stroke: var(--icon-secondary) !important;
}
.static-page-template .page-header h1.has-icon [data-feather="users"] {
    stroke: var(--icon-quaternary) !important;
}
.static-page-template .page-header h1.has-icon [data-feather="git-pull-request"] {
    stroke: var(--accent) !important;
}

/* --- צבע לאייקונים בפירורי הלחם --- */
.breadcrumbs .feather-home {
    stroke: var(--icon-primary) !important;
}
.breadcrumbs .feather-book-open {
    stroke: var(--accent) !important;
}
.breadcrumbs .feather-shield {
    stroke: var(--icon-primary) !important;
}
.breadcrumbs .feather-info {
    stroke: var(--icon-secondary) !important;
}
.breadcrumbs .feather-users {
    stroke: var(--icon-quaternary) !important;
}


.topnav a.nav-library .feather { stroke: var(--icon-primary); }

.prefix-important { background-color: #e74c3c; } /* ✨ הוסף את השורה הזו ✨ */


/* ===============================================
   RESTORED: Footer Icon Colors (v3.0 - Targets SVG classes)
   ================================================ */

/* General hover effect for all footer icons */
.footer-links a:hover .feather {
    transform: scale(1.1);
    color: var(--accent) !important;
}

/* Specific icon colors by their generated class name */
/* --- Using !important to ensure override --- */
.footer-links .feather-info { color: #5DADE2 !important; }
.footer-links .feather-compass { color: #F1C40F !important; }
.footer-links .feather-shield { color: #5DADE2 !important; } /* Re-added, might be needed */
.footer-links .feather-users { color: #E74C3C !important; }
.footer-links .feather-help-circle { color: #2ECC71 !important; }
.footer-links .feather-map { color: #9B59B6 !important; } /* Re-added, might be needed */
.footer-links .feather-message-circle { color: #1ABC9C !important; }
.footer-links .feather-star { color: #F1C40F !important; }
.footer-links .feather-award { color: #9B59B6 !important; }
.footer-links .feather-bell { color: #1ABC9C !important; } /* Re-added, might be needed */
.footer-links .feather-gift { color: #E74C3C !important; }
.footer-links .feather-user-plus { color: var(--accent) !important; }
.footer-links .feather-life-buoy { color: var(--danger) !important; }
.footer-links .feather-phone-call { color: var(--muted) !important; } /* Re-added, might be needed */

/* Add colors from the footer's internal style block for consistency */
.footer-links a .icon-komunot { color: #3498db !important; }
.footer-links a .icon-updates { color: #2ecc71 !important; }
.footer-links a .icon-guide { color: #9b59b6 !important; }
.footer-links a .icon-status { color: #f1c40f !important; }
.footer-links a .icon-candle { color: #e67e22 !important; }
.footer-links a .icon-visuals { color: #e74c3c !important; }
.footer-links a .icon-videos { color: #8e44ad !important; }
.footer-secondary-links a .icon-privacy { color: #1abc9c !important; }

/* Ensure support number icons inherit link color */
.support-numbers a .feather {
    color: inherit !important;
}
.support-numbers a[href*="tel:1201"] { color: #2ECC71 !important; }
.support-numbers a[href*="sahar.org.il"] { color: #3498DB !important; }
.support-numbers a[href*="urgent-help"] { color: var(--danger) !important;}


/* ========================================================
   FLOATING BUTTONS & ICONS - THE DEFINITIVE, FINAL FIX
   ======================================================== */

/* --- 1. The Main Wrapper for Buttons on the LEFT side --- */
.floating-action-buttons {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 101;
    display: flex;
    flex-direction: column-reverse; /* Stacks them bottom-up */
    align-items: center;
    gap: 1rem;
}

/* --- 2. UNIFIED Styling for ALL floating buttons --- */
#audio-control,
#zen-mode-toggle,
#theme-to-light-btn,
#theme-to-dark-btn {
    width: 50px;
    height: 50px;
    background: var(--panel);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--card-border);
    color: var(--muted);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    padding: 0; /* Override any other padding */
}
#audio-control:hover,
#zen-mode-toggle:hover,
#theme-to-light-btn:hover,
#theme-to-dark-btn:hover {
    transform: scale(1.1);
    color: var(--accent);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* --- 3. FIX for the "Back to Top" button position --- */
.back-to-top {
    position: fixed;
    z-index: 100;
    bottom: 1.25rem;
    right: 1.25rem;
    left: auto;
}

/* --- 4. FIX for the Audio Button icon switching --- */
#audio-control.muted .icon-on { display: none; }
#audio-control:not(.muted) .icon-on { display: block; }
#audio-control.muted .icon-off { display: block; }
#audio-control:not(.muted) .icon-off { display: none; }


/* --- 6. This ensures ALL icons inside the buttons are visible --- */
.fab-item svg, .fab-item i.feather,
#audio-control svg, #audio-control i.feather,
#zen-mode-toggle svg, #zen-mode-toggle i.feather,
#theme-to-light-btn svg, #theme-to-light-btn i.feather,
#theme-to-dark-btn svg, #theme-to-dark-btn i.feather,
.back-to-top svg, .back-to-top i.feather {
    stroke: currentColor; /* Inherits the button's color (muted or accent on hover) */
    width: 24px;
    height: 24px;
}


/* ========================================================
   MASTER FOOTER & FLOATING BUTTONS STYLES (v4.22)
   ======================================================== */

/* --- 1. Footer Icon Colors (All-in-one) --- */
.footer-links a:hover .feather {
    transform: scale(1.1);
    color: var(--accent) !important;
}
.footer-links a .icon-komunot { color: #3498db !important; }
.footer-links a .icon-updates { color: #2ecc71 !important; }
.footer-links a .icon-guide { color: #9b59b6 !important; }
.footer-links a .icon-status { color: #f1c40f !important; }
.footer-links a .icon-candle { color: #e67e22 !important; }
.footer-links a .icon-visuals { color: #e74c3c !important; }
.footer-links a .icon-videos { color: #8e44ad !important; }
.footer-links .feather-info { color: #5DADE2 !important; }
.footer-links .feather-compass { color: #F1C40F !important; }
.footer-links .feather-shield { color: #5DADE2 !important; }
.footer-links .feather-users { color: #E74C3C !important; }
.footer-links .feather-help-circle { color: #2ECC71 !important; }
.footer-links .feather-message-circle { color: #1ABC9C !important; }
.footer-links .feather-star { color: #F1C40F !important; }
.footer-links .feather-award { color: #9B59B6 !important; }
.footer-links .feather-gift { color: #E74C3C !important; }
.footer-links .feather-user-plus { color: var(--accent) !important; }
.footer-links .feather-life-buoy { color: var(--danger) !important; }

/* --- 2. Secondary Footer Links (Clickability & Colors) --- */
.footer-credit-strip {
    position: relative;
    z-index: 4; /* Lower */
}
.footer-secondary-strip {
    position: relative;
    z-index: 5; /* Higher - FIXES UNCLICKABLE LINKS */
}
.footer-secondary-links a .icon-privacy { color: #1abc9c !important; }

/* --- 3. Floating Buttons Position (RTL-Safe) --- */
.back-to-top {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;  /* Use 'left' for RTL safety */
    right: auto !important; /* Unset 'right' */
    z-index: 1050 !important;
    /* Original Styles */
    width: 44px; height: 44px; background: var(--accent); color: var(--bg);
    border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb, 255, 202, 40), 0.4); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-dark); transform: scale(1.1); }

.floating-action-buttons {
    position: fixed !important;
    bottom: 80px !important; /* Above back-to-top */
    left: 20px !important;  /* Use 'left' for RTL safety */
    right: auto !important; /* Unset 'right' */
    z-index: 1050 !important;
    /* Original Styles */
    display: flex; flex-direction: column; gap: 0.75rem;
}
.fab-item {
    width: 44px; height: 44px; background: var(--panel-2); color: var(--muted);
    border: 1px solid var(--card-border); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer; transition: all 0.3s ease; padding: 0 !important;
}
.fab-item:hover { background: var(--panel-1); color: var(--accent); transform: scale(1.1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

/* --- 4. Floating Button *Icon* Visibility (Restored) --- */
.fab-item i[data-feather],
#audio-control i[data-feather],
#zen-mode-toggle i[data-feather],
#theme-to-light-btn i[data-feather],
#theme-to-dark-btn i[data-feather],
#back-to-top i[data-feather] {
    stroke: currentColor !important;
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2 !important;
    display: block !important;
}
#back-to-top i[data-feather] {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2.5 !important;
}

/* Audio switching */
#audio-control .icon-on { display: none !important; }
#audio-control.muted .icon-off { display: block !important; }
#audio-control:not(.muted) .icon-on { display: block !important; }
#audio-control:not(.muted) .icon-off { display: none !important; }
#audio-control:not(.muted) { background-color: var(--accent-light); color: var(--accent); border-color: var(--accent); }

/* Theme switching */
#theme-to-light-btn { display: none !important; }
#theme-to-dark-btn { display: flex !important; }
:root[data-skin="sunrise"] #theme-to-light-btn { display: flex !important; }
:root[data-skin="sunrise"] #theme-to-dark-btn { display: none !important; }

/* ==============================================
   FIXES for v4.2 (Lightbox Layout & Header Icon)
   ============================================== */

/* 1. FIX: Header Icon Color */
.visuals-page-header .page-title-icon {
    color: var(--accent) !important;
}

/* 2. FIX: Lightbox Layout */
.visual-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.visual-lightbox.is-visible {
    opacity: 1;
    visibility: visible;
}
.visual-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem; /* RTL-friendly */
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 1002;
}
.visual-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
}

/* The Content Wrapper */
.visual-lightbox-content {
    background: var(--panel);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-large);
    max-width: 90vw;
    max-height: 90vh;
    width: 1100px; /* Max width */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Mobile-first */
}

.visual-lightbox-image-wrapper {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden; /* Ensure image fits */
}
.visual-lightbox-image {
    width: 100%;
    height: auto;
    max-height: 60vh; /* Mobile height limit */
    object-fit: contain;
    display: block;
}

.visual-lightbox-info {
    padding: 1.5rem;
    overflow-y: auto;
    background-color: var(--panel-2);
    flex-grow: 1;  /* [תיקון] Fill remaining vertical space */
    display: flex; 
    flex-direction: column;
    min-height: 0; /* [תיקון] Fix flexbox overflow bug */
}
.visual-lightbox-info-text {
}
.visual-lightbox-info h3 {
    font-size: 1.5rem;
    color: var(--text-headings);
    margin: 0 0 0.75rem 0;
}
.visual-lightbox-info p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

/* Desktop layout: Side-by-side */
@media (min-width: 992px) {
    .visual-lightbox-content {
        flex-direction: row; /* Side-by-side */
        height: 80vh;
        max-height: 800px;
    }
    .visual-lightbox-image-wrapper {
         flex-basis: 70%;
         flex-shrink: 1;
         height: 100%;
    }
    .visual-lightbox-image {
        max-height: 100%;
        width: 100%;
        height: 100%;
    }
    .visual-lightbox-info {
        flex-basis: 30%;
        flex-shrink: 0;
        height: 100%;
        max-height: 100%;
    }
}
/* ============================================== */
/* סוף CSS לייטבוקס */
/* ============================================== */

/* ============================================== */
/* CSS עבור תגובות (גרסה מלאה ללייטבוקס) */
/* ============================================== */
/* [תיקון] שינוי הקלאס כדי למנוע שגיאת JS */
.lightbox-reactions {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--card-border);
}
.lightbox-reactions .reactions-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 1rem 0;
    text-align: right;
}
.lightbox-reactions .reaction-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}
.lightbox-reactions .reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--panel-1);
    border: 1px solid var(--card-border);
    color: var(--muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lightbox-reactions .reaction-btn:hover {
    background-color: var(--panel-2);
    color: var(--text);
    border-color: var(--accent);
}
.lightbox-reactions .reaction-btn .emoji {
    font-size: 1.2rem;
    line-height: 1;
}
.lightbox-reactions .reaction-btn .label {
    display: inline-block; /* Show label */
}
.lightbox-reactions .reaction-btn .count {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}
.lightbox-reactions .reaction-btn.user-reacted {
    background-color: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.lightbox-reactions .reaction-btn.user-reacted .count {
    color: var(--bg);
    font-weight: 700;
}
/* ============================================== */

/* ================================================== */
/* [תיקון סופי] הבהרת צבע Placeholder בטופס CTA */
/* ================================================== */

/* זה הכלל שמטפל בטקסט האפור ("השם שלך" וכו') */
.cta-card form input::placeholder,
.cta-card form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important; /* צבע לבן-אפרפר בהיר וקריא */
    opacity: 1; /* נדרש עבור Firefox */
}

/* כללי גיבוי לדפדפנים ישנים יותר */
.cta-card form input::-webkit-input-placeholder,
.cta-card form textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.cta-card form input::-moz-placeholder,
.cta-card form textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

.cta-card form input:-ms-input-placeholder,
.cta-card form textarea:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}
/* ================================================== */
/* [תיקון] צבע ברירת מחדל ל-Select בטופס CTA */
/* ================================================== */

/* 1. קובעים ש-select תקין (אחרי בחירה) יחזור להיות לבן */
.cta-card form select {
    color: #FFFFFF !important;
}

/* * 2. טריק: כשה-select "לא תקין" (invalid) - כלומר,
 * כשהאפשרות הריקה "בחירת תחום עניין" מסומנת - 
 * דורסים את הכלל הלבן ומציגים צבע פלייסהולדר.
*/
.cta-card form select:invalid {
    color: rgba(255, 255, 255, 0.6) !important;
}
/* ===============================================
   🔥 [תיקון] S2.8.g - כפיית גודל לצ'קבוקס בפוסט נעוץ
   =============================================== */
.thread-card.is-sticky .bulk-mod-checkbox {
    width: 1.25rem !important;
    height: 1.25rem !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: 8px !important;
    transform: none !important;
    font-size: 1rem !important;
}

/* ===== Bulk Reason Modal (namespaced) ===== */
.mk-modal{position:fixed; inset:0; z-index:1000; display:none; align-items:center; justify-content:center;}
.mk-modal.is-open{display:flex;}
.mk-modal[aria-hidden="true"]{display:none;}

.mk-modal__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.55);}
.mk-modal__dialog{
  position:relative; z-index:1; max-width:560px; width:92%;
  background:#fff; color:#111; border-radius:16px; padding:16px; box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.mk-modal__header{display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem;}
.mk-modal__title{margin:0; font-size:1.15rem;}
.mk-modal__close{background:transparent; border:0; font-size:1.5rem; line-height:1; cursor:pointer;}
.mk-modal__body{display:flex; flex-direction:column; gap:.5rem;}
.mk-modal__footer{display:flex; gap:.5rem; justify-content:flex-end; margin-top:1rem;}

/* מצב כהה (אם יש לך body.dark או דף AI כהה וכד') */
body.dark .mk-modal__dialog{background:#1a1a1a; color:#eee;}

/* תגית "(נמחק)" */
.deleted-badge{display:inline-block; font-size:.85em; opacity:.8;}
.is-soft-deleted{opacity:.55; filter:grayscale(15%);}

/* ===== Modal: Dark theme variants ===== */
body.dark .mk-modal__dialog,
[data-theme="dark"] .mk-modal__dialog,
.theme-dark .mk-modal__dialog,
.ai-theme .mk-modal__dialog {
  background: #16181b;  /* כהה */
  color: #e9ecef;
  border: 1px solid rgba(255,255,255,.08);
}

body.dark .mk-modal__backdrop,
[data-theme="dark"] .mk-modal__backdrop,
.theme-dark .mk-modal__backdrop,
.ai-theme .mk-modal__backdrop {
  background: rgba(0,0,0,.72); /* השחרה חזקה יותר */
}

/* טפסים במודאל כהה */
body.dark .mk-modal__dialog select,
body.dark .mk-modal__dialog textarea,
[data-theme="dark"] .mk-modal__dialog select,
[data-theme="dark"] .mk-modal__dialog textarea,
.theme-dark .mk-modal__dialog select,
.theme-dark .mk-modal__dialog textarea,
.ai-theme .mk-modal__dialog select,
.ai-theme .mk-modal__dialog textarea {
  background: #0f1113;
  color: #e9ecef;
  border: 1px solid rgba(255,255,255,.12);
}
/* ===== Minimal buttons ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.5rem .9rem; border-radius:10px; border:1px solid transparent;
  background:#e9ecef; color:#111; font-weight:600; cursor:pointer;
  transition:transform .04s ease, background .2s;
}
.btn:hover{ transform: translateY(-1px); }

.btn-danger{
  background:#c92a2a; color:#fff; border-color:#a61e1e;
}
.btn-danger:hover{ background:#a61e1e; }

/* כהה */
body.dark .btn{ background:#2b3035; color:#e9ecef; border-color:#3c4146; }
body.dark .btn-danger{ background:#e03131; border-color:#c92a2a; }

/* ===================================================
   S2.9 - Notifications Page (V2 - Design Upgrade)
   =================================================== */

.notifications-page .page-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.notifications-page .page-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.notifications-page .page-header h1 .feather {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.notifications-list-wrapper .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--panel);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.notifications-list-wrapper .empty-state .feather {
    width: 48px;
    height: 48px;
    color: var(--success); /* צבע ירוק */
    margin-bottom: 1rem;
}

.notifications-list-wrapper .empty-state h2 {
    margin: 0;
    color: var(--text);
}

.notifications-list-wrapper .empty-state p {
    color: var(--muted);
    font-size: 1rem;
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* הגדלנו קצת את הרווח */
}

/* ★★★ [V2] שדרוג עיצוב ★★★ */
.notification-item {
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

/* ★★★ [V2] זה העיצוב החדש והבולט להתראות שלא נקראו ★★★ */
.notification-item.is-unread {
    background-color: var(--panel); /* רקע בולט יותר */
    box-shadow: 0 3px 6px rgba(0,0,0,0.05); /* צל עדין להרמה */
    
    /* "המסגרת" שביקשת (ידידותי ל-RTL) */
    border-inline-start: 4px solid var(--accent); 
}
/* הדגשה מיוחדת לדיווחים שלא נקראו: רקע אדום מלא לאייקון */
.notification-item.is-unread .notification-icon[data-type="new_report"] {
    background-color: var(--danger); /* אדום מלא */
}
.notification-item.is-unread .notification-icon[data-type="new_report"] .feather {
    color: #fff; /* אייקון לבן */
}


/* ★★★ [V2] זה העיצוב להתראות שנקראו ★★★ */
.notification-item.is-read {
    background-color: var(--bg); /* רקע "מת" */
    opacity: 0.8; /* כל הפריט מעומעם */
}
/* טקסט אפור ופחות מודגש להתראה שנקראה */
.notification-item.is-read .notification-content p {
    color: var(--muted);
    font-weight: 400; 
}


/* אפקט ריחוף כללי */
.notification-item:hover {
    background-color: var(--panel-hover);
    border-color: var(--accent-soft); /* הדגשת מסגרת בריחוף */
    opacity: 1; /* החזרת שקיפות מלאה בריחוף */
}

.notification-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-soft);
    transition: all 0.2s ease;
}
.notification-icon .feather {
    width: 20px;
    height: 20px;
    color: var(--accent);
    transition: color 0.2s ease;
}

/* סוג מיוחד: דיווחים */
.notification-icon[data-type="new_report"] {
    background-color: var(--danger-soft);
}
.notification-icon[data-type="new_report"] .feather {
    color: var(--danger);
}

.notification-content {
    flex-grow: 1;
}

.notification-content p {
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text); /* [V2] מוודא שברירת המחדל היא צבע טקסט בהיר */
    transition: color 0.2s ease;
}

.notification-content .notification-time {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
    display: block;
}
/* התראת מערכת (למשל בדף התראות) */
.system-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.system-alert.alert-warning {
    background-color: var(--warning-soft);
    border-color: var(--warning);
    color: var(--warning-dark);
}
.system-alert .feather {
    width: 24px;
    height: 24px;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 2px;
}
.system-alert strong {
    color: var(--warning-dark);
}
.system-alert a {
    color: var(--warning-dark);
    font-weight: 600;
    text-decoration: underline;
}

/* קישור מנוטרל (למי שאין הרשאה) */
.notification-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
.notification-link.is-disabled:hover {
    background-color: transparent;
}
/* [S2.9] עיצוב להתראת מערכת מסוג 'מידע' (כחול) */
.system-alert.alert-info {
    background-color: var(--info-soft);
    border-color: var(--info);
    color: var(--info-dark);
}
.system-alert.alert-info .feather {
    color: var(--info);
}
.system-alert.alert-info strong {
    color: var(--info-dark);
}
.system-alert.alert-info a {
    color: var(--info-dark);
    font-weight: 600;
    text-decoration: underline;
}

/* [S2.9] עיצוב לאייקון של 'פוסט ממתין' */
.notification-icon[data-type="pending_post"] {
    background-color: var(--info-soft);
}
.notification-icon[data-type="pending_post"] .feather {
    color: var(--info);
}
/* הדגשה ל'לא נקרא' */
.notification-item.is-unread .notification-icon[data-type="pending_post"] {
    background-color: var(--info); /* כחול מלא */
}
.notification-item.is-unread .notification-icon[data-type="pending_post"] .feather {
    color: #fff; /* אייקון לבן */
}

/* ============================================== */
/* [S2.6] עיצוב "להבת הזיכרון" V5.2 (FINAL RITUAL POLISH) */
/* ============================================== */

/* --- 1. עיצוב Header (צבע האייקון) --- */
.theme-candle-space .c-page-header .icon-bg {
    background-color: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
}
.theme-candle-space .c-page-header .emotional-quote {
    /* [FIX] ודא שהציטוט ממורכז כראוי (כמו ב-static-page) */
    text-align: right; 
    margin: 1.25rem auto 0 auto; 
    max-width: 65ch;
    padding: 0.75rem 1.5rem 0.75rem 1rem;
    border-left: none; 
    border-right: 4px solid var(--accent); 
    border-radius: 4px 0 0 4px; 
    background-color: var(--panel-1);
    font-style: italic;
    color: var(--text-headings);
}

/* --- 2. עיצוב הטופס והשדות --- */
.theme-candle-space .candle-form-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
}
.theme-candle-space .candle-form-section h2 { margin-bottom: 1.5rem; text-align: center; }

/* פריסת שדות */
.theme-candle-space .form-group { margin-bottom: 1rem; flex-grow: 1; }
.theme-candle-space .form-row { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.theme-candle-space .form-row .form-group { margin-bottom: 0; }
.theme-candle-space .form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.theme-candle-space .form-group .required { color: var(--danger); font-weight: 700; }
.theme-candle-space .form-group .optional { font-size: 0.85rem; color: var(--muted); }

/* עיצוב Input */
.theme-candle-space .candle-form input[type="text"],
.theme-candle-space .candle-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem; 
    border: 1px solid var(--card-border);
    border-radius: 8px; 
    background: var(--bg); 
    color: var(--text);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.2s ease;
}
.theme-candle-space .candle-form textarea { min-height: 100px; }

.theme-candle-space .candle-form input[type="text"]:focus,
.theme-candle-space .candle-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 255, 202, 40), 0.2);
}

/* כפתור Submit */
.theme-candle-space .form-actions { text-align: center; margin-top: 2rem; }
.theme-candle-space .btn.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px; 
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: var(--accent);
    color: var(--bg, #FFFFFF); 
    border: 2px solid var(--accent);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}
.theme-candle-space .btn.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.5);
}
.theme-candle-space .btn-icon { width: 18px; height: 18px; }


/* --- 3. Level Up 2: עיצוב הנר הקהילתי (הווידג'ט הגדול) --- */
.theme-candle-space .community-candle-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--panel-2); 
    border: 1px solid var(--accent); 
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}
.theme-candle-space .community-candle-widget .candle-icon {
    font-size: 2.5rem;
    line-height: 1;
    text-shadow: 0 0 10px var(--accent-color-1); 
    color: var(--accent-color-1); 
    animation: candle-pulse 4s infinite ease-in-out;
}
.theme-candle-space .community-candle-widget .candle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.theme-candle-space .community-candle-widget .candle-text strong {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.theme-candle-space .community-candle-widget .candle-text span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
}
@keyframes candle-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}


/* --- 4. עיצוב קיר הנרות (הכרטיסים) --- */
.theme-candle-space .candle-wall-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.05); 
}
.theme-candle-space .candle-wall-section h2 { margin: 0 0 1.5rem 0; text-align: center; }
.theme-candle-space .candle-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem; 
    padding: 1.5rem 0;
    margin: 0;
    border-top: 1px solid var(--card-border);
}
.theme-candle-space .candle-card {
    background: var(--panel-1); /* רקע שונה מהקיר */
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.2); 
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.theme-candle-space .candle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.15), 0 0 20px var(--accent, rgba(255, 193, 7, 0.6));
    border-color: var(--accent);
}
.theme-candle-space .candle-content { padding: 1.25rem 1.5rem; }
.theme-candle-space .candle-deceased-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-headings);
    margin: 0 0 0.5rem 0;
}
.theme-candle-space .candle-deceased-name a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.theme-candle-space .candle-deceased-name a:hover { color: var(--accent); }
.theme-candle-space .candle-message {
    font-size: 1.05rem;
    font-style: normal; 
    color: var(--text);
    margin-bottom: 0;
}
.theme-candle-space .candle-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1rem;
    border-top: 1px dashed var(--card-border);
    padding-top: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.theme-candle-space .candle-footer {
    padding: 0.75rem 1.25rem;
    background-color: var(--panel-2);
    border-top: 1px solid var(--card-border);
}
.theme-candle-space .candle-footer .reaction-summary-bar {
    margin-bottom: 0; padding-top: 0; border-top: none; margin-bottom: 0.75rem;
}
.theme-candle-space .no-candles {
    text-align: center; font-size: 1.1rem; color: var(--muted); padding: 2rem;
    background: var(--panel-1); border-radius: 12px;
}
.theme-candle-space .filter-clear { text-align: center; margin-bottom: 1rem; }
.theme-candle-space .pagination-container-top { margin-bottom: 1.5rem; }
.theme-candle-space .pagination-container-bottom { margin-top: 1.5rem; }

/* --- 5. התאמות רספונסיביות --- */
@media (max-width: 700px) {
    .theme-candle-space .form-row { flex-direction: column; gap: 0; }
    .theme-candle-space .form-row .form-group { margin-bottom: 1rem; }
    .theme-candle-space .candle-wall-grid { grid-template-columns: 1fr; gap: 1rem; padding: 0; }
    .theme-candle-space .candle-form-section { padding: 1.5rem 1rem; }
    .theme-candle-space .candle-wall-section { padding: 1.5rem 1rem; }
}

/* --- 6. Level Up 1.5 (Floating-In & Sharing) --- */
.theme-candle-space .candle-card.candle-floating-in {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    animation: floatIn 0.5s ease-out forwards;
}
@keyframes floatIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.theme-candle-space .new-candle-notice {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
}
.theme-candle-space .personal-share-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.theme-candle-space .personal-share-buttons span { font-weight: 600; }
.theme-candle-space .personal-share-buttons .share-btn {
    display: inline-flex;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted);
    transition: all 0.2s ease;
}
.theme-candle-space .personal-share-buttons .share-btn:hover {
    color: var(--text);
    background: var(--panel-1);
}
.theme-candle-space .personal-share-buttons .share-btn.whatsapp:hover { color: #25D366; }
.theme-candle-space .personal-share-buttons .share-btn.facebook:hover { color: #1877F2; }
.theme-candle-space .candle-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.theme-candle-space .community-share-btn {
    padding: 0.45rem 0.6rem;
}

/* ============================================== */
/* [S2.6 HOTFIX v5] CSS ריאקשנים מלא ותקין */
/* ============================================== */

/* [!!!] 1. סרגל הסיכום (היה חסר) [!!!] */
.theme-candle-space .reaction-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem; 
    padding-top: 0.75rem; 
    border-top: 1px dashed var(--card-border); 
}
.theme-candle-space .summary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--panel-1);
    border: 1px solid var(--card-border);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    position: relative; 
}
.theme-candle-space .summary-item .emoji {
    font-size: 0.9rem;
}
.theme-candle-space .summary-item .count {
    font-weight: 700;
    color: var(--text-headings);
}
.theme-candle-space .summary-item.staff-highlight {
    background-color: rgba(var(--accent-rgb), 0.1);
    border-color: var(--accent);
}
.theme-candle-space .summary-item.staff-highlight .count {
    color: var(--accent);
}
.theme-candle-space .summary-item[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute; bottom: 125%; left: 50%;
    transform: translateX(-50%);
    background-color: #333; color: #fff;
    padding: 0.35rem 0.75rem; border-radius: 6px;
    font-size: 0.85rem; white-space: nowrap; z-index: 10;
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease, bottom 0.2s ease;
}
.theme-candle-space .summary-item[data-tooltip]::after {
    content: ''; position: absolute; bottom: 125%; left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 5px solid transparent; border-top-color: #333;
    z-index: 11; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, bottom 0.2s ease;
}
.theme-candle-space .summary-item[data-tooltip]:hover::before,
.theme-candle-space .summary-item[data-tooltip]:hover::after {
    opacity: 1; bottom: 135%;
}

/* [!!!] 2. הקונטיינר הראשי (תיקון Z-Index) [!!!] */
.theme-candle-space .emotional-reactions-container {
    position: relative;
    z-index: 2; /* גורם לזה להיות מעל התוכן */
}

/* [!!!] 3. כפתור הטריגר (+🙂) [!!!] */
.theme-candle-space .reaction-hover-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--panel-1);
    border: 1px solid var(--card-border);
    color: var(--muted);
    padding: 0.35rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.theme-candle-space .reaction-hover-trigger .feather {
    width: 16px; height: 16px;
}
.theme-candle-space .reaction-hover-trigger:hover,
.theme-candle-space .reaction-hover-wrapper.is-open .reaction-hover-trigger {
    border-color: var(--accent);
    color: var(--text);
}
.theme-candle-space .reaction-hover-trigger .emoji {
    font-size: 1rem;
}

/* [!!!] 4. התפריט המרחף (התיקון המלא) [!!!] */
.theme-candle-space .reaction-hover-wrapper {
    position: relative; 
}

.theme-candle-space .reaction-buttons {
    display: flex;
    flex-wrap: nowrap; 
    gap: 0.35rem; 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px); 
    position: absolute;
    bottom: 100%; 
    right: 0;
    margin-bottom: 8px; 
    z-index: 10; 
    background: var(--card-bg); 
    border: 1px solid var(--card-border);
    padding: 0.5rem;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* [!!!] 5. הצגה באמצעות JavaScript (התיקון האמיתי) [!!!] */
.theme-candle-space .reaction-hover-wrapper.is-open .reaction-buttons {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* [!!!] 6. עיצוב הכפתורים בתוך הפופאפ [!!!] */
.theme-candle-space .reaction-buttons .reaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--panel-1);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.15s ease;
}
.theme-candle-space .reaction-buttons .reaction-btn:hover {
    transform: scale(1.2);
    border-color: var(--accent);
}
.theme-candle-space .reaction-buttons .reaction-btn .emoji {
    font-size: 1.5rem; 
}
.theme-candle-space .reaction-buttons .reaction-btn .count {
    display: none; 
}
.theme-candle-space .reaction-buttons .reaction-btn.user-reacted {
    background-color: rgba(var(--accent-rgb), 0.15);
    border: 2px solid var(--accent);
}

/* =================================
   Smart Bubbles (Tight & Sexy)
   ================================= */

/* עיצוב הבועה הבסיסי */
.smart-bubble {
    /* טכניקת ה-Flex היא זו שהופכת את הבועה ל"חכמה" */
    display: flex; 
    align-items: flex-start; /* האייקון נשאר למעלה אם יש הרבה טקסט */
    gap: 12px; /* רווח מדויק בין האייקון לטקסט */
    
    /* ריפוד הדוק - לא "שמן" */
    padding: 12px 16px;
    
    /* עיצוב הבועה */
    background-color: var(--panel-2); /* צבע רקע כהה מעט */
    border-radius: 8px; /* פינות עגולות עדינות */
    border-right: 4px solid var(--accent); /* הפס הצבעוני בצד ימין */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* צל עדין לעומק */
    
    /* זה הטריק! מבטל גובה מינימלי ומאפשר לכווץ */
    height: auto;
    min-height: 0;
    
    /* רווח בין הודעה להודעה */
    margin-bottom: 16px;
    
    /* מעבר חלק במקרה של שינוי */
    transition: all 0.2s ease;
}

/* טיפול בתוכן הפנימי - זה מה שמונע את הרווחים המיותרים! */
.smart-bubble .bubble-content {
    flex-grow: 1; /* לוקח את כל המקום הפנוי */
    display: flex;
    flex-direction: column;
    justify-content: center; /* ממקם במרכז הגובה */
}

/* איפוס כותרות וטקסט בתוך הבועה */
.smart-bubble h4, 
.smart-bubble h3,
.smart-bubble strong {
    margin: 0 0 4px 0 !important; /* רווח קטנטן מתחת לכותרת */
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text);
}

.smart-bubble p, 
.smart-bubble span {
    margin: 0 !important; /* אפס רווחים! */
    padding: 0 !important;
    line-height: 1.4;
    font-size: 0.95rem;
    color: var(--muted);
}

/* עיצוב האייקון */
.smart-bubble .icon-wrapper {
    flex-shrink: 0; /* מונע מהאייקון להתכווץ */
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent); /* האייקון מקבל את צבע הפס */
}

.smart-bubble .icon-wrapper svg {
    width: 20px;
    height: 20px;
}

/* =================================
   וריאציות צבעים (אופציונלי)
   ================================= */
.smart-bubble.info { --accent: #3498db; }    /* כחול */
.smart-bubble.warning { --accent: #f1c40f; } /* צהוב */
.smart-bubble.danger { --accent: #e74c3c; }  /* אדום */
.smart-bubble.success { --accent: #2ecc71; } /* ירוק */
.smart-bubble.team { --accent: #9b59b6; }    /* סגול לצוות */


/* =========================================
   S3.12 - Editor Internal Fixes
   ========================================= */

/* בכוח: רקע בהיר ונעים לעורך במצב יום */
body.post-content {
    background-color: #ffffff !important;
    color: #1e1e1e !important;
    padding: 10px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* בכוח: רקע כהה ונעים לעורך במצב לילה */
[data-skin="dark"] body.post-content {
    background-color: #2d3436 !important;
    color: #dfe6e9 !important;
}

/* התאמה ללב צעיר */
[data-skin="youth"] body.post-content {
    background-color: #ffffff !important;
    color: #004D40 !important;
}

/* ========================================================== */
/* ★★★ [S3.12] FINAL INTEGRATED ENGINE: Spoilers & Mentions ★★★ */
/* ========================================================== */

/* ------------------------------------------------------------- */
/* 1. התיוג המשודרג (Chips Style) */
/* ------------------------------------------------------------- */
.mention-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85em;
    letter-spacing: 0.3px;
    text-decoration: none;
    border-width: 1px;
    border-style: solid;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: context-menu;
    vertical-align: middle;
    margin: 0 2px;
}
.mention-text:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* התאמה לנוער */
:root[data-skin="youth"] .mention-text,
.theme-youth .mention-text {
    box-shadow: 0 2px 5px rgba(0, 121, 107, 0.1);
}

/* ------------------------------------------------------------- */
/* 2. הספוילר החכם (Smart Spoiler v4.0 - Core Integrated) */
/* ------------------------------------------------------------- */

/* === מצב ברירת מחדל: "גחלים לוחשות" (מתאים לליבה הכהה/חומה) === */
.spoiler-content {
    /* עיצוב בסיס */
    color: transparent;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.4s ease;
    user-select: none;
    position: relative;
    display: inline-block;
    
    /* צבעים: חום עמוק וטשטוש כתום */
    background-color: #3E2723; 
    text-shadow: 0 0 12px rgba(255, 112, 67, 0.6); 
    border: 1px solid #5D4037;
}

/* אפקט ריחוף בחושך - נדלק כמו גחל */
.spoiler-content:not(.is-visible):hover {
    background-color: #4E342E; 
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.2); 
    border-color: #FF5722;
}

/* טולטיפ לחושך */
.spoiler-content:not(.is-visible):hover::after {
    content: '🔥 לחץ לחשיפה';
    position: absolute;
    top: -30px; left: 50%; transform: translateX(-50%);
    background: #212121; color: #FFCC80; 
    font-size: 0.75rem; padding: 2px 8px; border-radius: 4px;
    white-space: nowrap; pointer-events: none; border: 1px solid #5D4037;
    z-index: 10;
}

/* === מצב Sunrise: "ערפל" (אפור בהיר) === */
:root[data-skin="sunrise"] .spoiler-content {
    background-color: #dfe6e9;
    text-shadow: 0 0 12px rgba(0,0,0,0.4);
    border-color: #b2bec3;
    box-shadow: none;
}
:root[data-skin="sunrise"] .spoiler-content:not(.is-visible):hover {
    background-color: #b2bec3;
    border-color: #636e72;
}
:root[data-skin="sunrise"] .spoiler-content:not(.is-visible):hover::after {
    content: '👁️ לחץ לחשיפה';
    background: #2d3436; color: #fff; border: none;
}

/* === מצב Youth: "ענן קסם" (טורקיז) === */
:root[data-skin="youth"] .spoiler-content,
.theme-youth .spoiler-content {
    background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%);
    text-shadow: 0 0 10px #00796B;
    border: 1px dashed #80CBC4;
    box-shadow: 0 2px 5px rgba(0, 121, 107, 0.05);
}
:root[data-skin="youth"] .spoiler-content:not(.is-visible):hover,
.theme-youth .spoiler-content:not(.is-visible):hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 121, 107, 0.15);
    background: linear-gradient(135deg, #B2DFDB 0%, #80CBC4 100%);
}
:root[data-skin="youth"] .spoiler-content:not(.is-visible):hover::after,
.theme-youth .spoiler-content:not(.is-visible):hover::after {
    content: '✨ סוד כמוס';
    background: #00796B; color: #fff; border: none;
}

/* === מצב חשיפה (משותף לכולם - מנקה את האפקטים) === */
.spoiler-content.is-visible {
    background: transparent !important;
    color: inherit !important;
    text-shadow: none !important;
    user-select: text;
    cursor: text;
    border-color: transparent !important;
    /* סימון עדין שזה היה ספוילר */
    background-color: rgba(255, 235, 59, 0.1) !important; 
    border-bottom: 2px solid rgba(255, 235, 59, 0.4) !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------- */
/* חוק ברזל: בתוך העורך (TinyMCE) - הכל גלוי ורגיל */
/* ------------------------------------------------------------- */
.mce-content-body .spoiler-content {
    background-color: rgba(0, 0, 0, 0.03) !important;
    color: inherit !important;
    text-shadow: none !important;
    border: 1px dashed #ccc !important;
    opacity: 1 !important;
    cursor: text !important;
    background: none !important;
    box-shadow: none !important;
}
.mce-content-body .spoiler-content::after { display: none !important; }

/* ========================================================== */
/* ★★★ [S3.12] FINAL QUOTE ENGINE (Professional Box) ★★★ */
/* ========================================================== */

blockquote {
    /* איפוס והגדרת קופסה */
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    width: 100%;
    box-sizing: border-box;
    
    /* עיצוב בסיס */
    background-color: var(--panel-2) !important;
    border-right: 4px solid var(--accent) !important; /* הפס הצבעוני מימין */
    border-radius: 0 8px 8px 0; /* פינות מעוגלות רק בצד שמאל */
    
    /* טקסט */
    font-style: normal; /* ביטול נטייה אוטומטית */
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* שורת הכותרת (מי כתב) */
.quote-meta {
    display: block;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
    font-size: 0.9em;
}

/* הוספת מרכאות מעוצבות באייקון (במקום טקסט) */
.quote-meta::before {
    content: '\201D'; /* מרכאות כפולות יפות */
    font-family: serif;
    font-size: 2em;
    line-height: 0.5;
    margin-left: 8px;
    vertical-align: sub;
    opacity: 0.3;
    color: inherit;
}

/* --- התאמות לערכות נושא --- */

/* 1. מצב ברירת מחדל (כהה/מדורה) */
body:not([data-skin="sunrise"]):not([data-skin="youth"]) blockquote {
    background-color: rgba(255, 255, 255, 0.03) !important; /* שקיפות עדינה */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 4px solid var(--accent);
}

/* 2. מצב יום (Sunrise) */
:root[data-skin="sunrise"] blockquote {
    background-color: #f1f2f6 !important;
    border: 1px solid #dcdde1;
    border-right: 4px solid var(--accent);
    color: #2f3542;
}

/* 3. מצב נוער (Youth) */
:root[data-skin="youth"] blockquote,
.theme-youth blockquote {
    background-color: #E0F2F1 !important; /* תכלת ירקרק */
    border: 1px solid #80CBC4;
    border-right: 4px solid #009688 !important;
    color: #00695C;
    border-radius: 12px;
}
:root[data-skin="youth"] .quote-meta {
    color: #00796B;
    border-bottom-color: rgba(0, 150, 136, 0.2);
}

/* =========================================
   Fix: Pagination Layout
   ========================================= */
.pagination {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
    gap: 5px !important; /* רווח קטן בין הכפתורים */
}

.page-item {
    display: inline-block !important;
    margin: 0 !important;
}

.page-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem !important;
    border: 1px solid var(--card-border);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 8px !important; /* כפתורים עגולים ויפים */
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item.active .page-link {
    background: var(--accent) !important;
    color: var(--bg) !important;
    border-color: var(--accent) !important;
    font-weight: bold;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}




/* FIX: אל תחביא כותרות ועמודי תוכן */
body.intimate-mode-active .page-title,
body.intimate-mode-active .thread-title,
body.intimate-mode-active .komunot-title,
body.intimate-mode-active h1,
body.intimate-mode-active header {
    display: block !important;
}






/* ===============================================
   HAMEDURA MOBILE PERFECTION – FINAL TOUCHES (2025)
   =============================================== */

/* 1. בסיס מובייל – הכל נוזלי ויפה */
@media (max-width: 900px) {
    .container, .wrapper, .main-content, .content-wrapper {
        padding: 1rem !important;
        margin: 0 !important;
    }

    /* כותרות – לא ענקיות מדי */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.4rem !important; }

    /* גרידים – תמיד טור אחד */
    .grid, .columns, .row, .homepage-main-grid, .tribute-grid, .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* כרטיסיות – מרווח נעים */
    .card, .tool-card, .message-card, .tribute-card {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* טפסים – קל ללחוץ */
    input, textarea, button, .btn, .btn-premium {
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }

    /* כפתורים צפים – לא מפריעים */
    .floating-action-buttons, .back-to-top {
        bottom: 1rem !important;
        right: 1rem !important;
        gap: 0.75rem !important;
    }

    /* הודעות – לא תופסות את כל המסך */
    .system-message, .form-status, .alert {
        padding: 1rem !important;
        margin: 1rem 0 !important;
        font-size: 1rem !important;
    }

    /* תמונות – לא בורחות */
    img, .tribute-image, .gahali-host {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ניווט – נוח */
    .topnav {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}

/* 2. מסכים קטנים מאוד (אייפון SE וכו') */
@media (max-width: 480px) {
    body { font-size: 1rem !important; }
    .btn, button { padding: 1.2rem !important; font-size: 1.2rem !important; }
    .card { padding: 1.25rem !important; }
}


/* ===============================================
   HAMEDURA MOBILE FIX – FINAL & PERFECT (2025)
   =============================================== */

@media (max-width: 900px) {
    /* 1. הכל נוזלי – אין דברים קבועים שדוחפים */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* 2. התוכן הראשי – רוחב מלא */
    .container, .main-content, .content-wrapper, .treehouse-container, .komunot-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }

    /* 3. סיידברים – מתחת לתוכן, לא בצד */
    .sidebar, .komuna-sidebar, .floating-notice-area, .sidebar-widget {
        position: static !important;
        width: 100% !important;
        margin-top: 2rem !important;
        float: none !important;
    }

    /* 4. גרידים – תמיד טור אחד */
    .grid, .homepage-main-grid, .workspace-grid, .games-section, .content-grid, .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 5. כותרות – לא ענקיות מדי */
    h1 { font-size: 2.2rem !important; line-height: 1.2 !important; }
    h2 { font-size: 1.8rem !important; }
    h3 { font-size: 1.5rem !important; }

    /* 6. כפתורים – קל ללחוץ */
    button, .btn, .btn-premium, .submit-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        margin: 0.5rem 0 !important;
    }

    /* 7. תפריטים – עמודות */
    .topnav, .utility-bar .user-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* 8. תמונות – לא בורחות */
    img, .gahali-host, .tribute-image {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 0 auto;
    }

    /* 9. הודעות – לא תופסות מקום מיותר */
    .system-message, .form-status, .alert {
        margin: 1rem 0 !important;
        padding: 1rem !important;
    }

    /* 10. כפתורים צפים – לא מפריעים */
    .floating-action-buttons, .back-to-top, .audio-control, .theme-toggle {
        bottom: 1rem !important;
        right: 1rem !important;
        left: auto !important;
    }
}

/* מסכים ממש קטנים */
@media (max-width: 480px) {
    .container { padding: 0.75rem !important; }
    h1 { font-size: 2rem !important; }
}








/* ===============================================
   ADMIN BAR MOBILE FIX – HAMEDURA 2025
   =============================================== */

/* 1. במובייל – האדמין באר הופך לעמודות ומקטין גובה */
@media (max-width: 768px) {
    .admin-bar {
        flex-direction: column !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }

    .admin-bar .left,
    .admin-bar .right {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .admin-bar .separator {
        display: none !important;
    }

    /* הסתרת טקסטים – רק אייקונים */
    .admin-bar a.btn span:not(.notification-badge) {
        display: none !important;
    }

    /* כפתורים קטנים יותר */
    .admin-bar a.btn {
        padding: 0.5rem !important;
        min-width: 44px !important;
        justify-content: center !important;
    }

    /* באדג' התראות – קטן יותר */
    .admin-bar .notification-badge {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        line-height: 16px !important;
        top: -6px !important;
        right: -6px !important;
    }

    /* גובה האדמין באר קטן יותר */
    .admin-bar {
        min-height: auto !important;
        padding-bottom: 0.75rem !important;
    }

    /* התאמת padding של body */
    body {
        padding-top: 100px !important; /* יותר מקום כי האדמין באר גבוה יותר במובייל */
    }
}

/* 2. מסכים קטנים מאוד */
@media (max-width: 480px) {
    .admin-bar a.btn {
        padding: 0.4rem !important;
    }
    body {
        padding-top: 110px !important;
    }
}


/* ===============================================
   HAMEDURA MOBILE – UNIFIED & CLEAN (2025)
   =============================================== */

@media (max-width: 900px) {
    /* 1. איפוס בסיסי */
    body, html {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-top: 0 !important;
    }

    /* 2. כל הקונטיינרים – רוחב מלא */
    .container, 
    .main-content-container, 
    .komunot-container, 
    .treehouse-container,
    .content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    /* 3. גרידים – טור אחד */
    .homepage-main-grid,
    .tribute-grid,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 4. אדמין באר – קומפקטי */
    .admin-bar {
        position: sticky !important;
        top: 0 !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }
    
    .admin-bar a.btn {
        padding: 0.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .admin-bar .separator {
        display: none !important;
    }

    /* 5. הידר – קומפקטי */
    .site-header {
        padding: 1rem !important;
    }
    
    .topnav {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    /* 6. כפתורים צפים – לא מפריעים */
    .floating-action-buttons,
    .back-to-top {
        bottom: 1rem !important;
        left: 1rem !important;
        right: auto !important;
    }
    
    .floating-notice-area {
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        bottom: 5rem !important;
    }

    /* 7. תמונות – לא בורחות */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 8. כותרות – גדלים סבירים */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.3rem !important; }
}

/* מסכים ממש קטנים */
@media (max-width: 480px) {
    .container { padding: 0.75rem !important; }
    h1 { font-size: 1.8rem !important; }
}





/* ===============================================
   CRITICAL MOBILE FIX – SIDEBAR NAVIGATION
   =============================================== */

@media (max-width: 900px) {
    
    /* 1. הסיידבר/נאוויגיישן הראשי – מוסתר או תפריט המבורגר */
    .sidebar-nav,
    .main-sidebar,
    .side-navigation,
    .left-sidebar,
    nav.sidebar,
    aside.sidebar {
        position: fixed !important;
        right: -300px !important; /* מחוץ למסך */
        top: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: var(--panel) !important;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3) !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
    }
    
    /* כשהתפריט פתוח */
    .sidebar-nav.is-open,
    .main-sidebar.is-open,
    body.menu-open .sidebar-nav,
    body.menu-open .main-sidebar {
        right: 0 !important;
    }
    
    /* 2. התוכן הראשי – תופס את כל הרוחב */
    .main-content,
    .page-content,
    .content-area,
    main {
        width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding: 1rem !important;
    }
    
    /* 3. כפתור המבורגר – להצגת התפריט */
    .mobile-menu-toggle,
    .hamburger-menu,
    .menu-toggle {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        z-index: 10000 !important;
        width: 44px !important;
        height: 44px !important;
        background: var(--accent) !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    }
    
    /* 4. שכבת כיסוי כשהתפריט פתוח */
    .sidebar-overlay {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 9998 !important;
    }
    
    body.menu-open .sidebar-overlay {
        display: block !important;
    }
    
    /* 5. כפתורים צפים – לא מפריעים */
    .floating-action-buttons {
        bottom: 1rem !important;
        left: 1rem !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .back-to-top {
        bottom: 5rem !important;
        left: 1rem !important;
    }
    
    /* 6. ההדר – לא תופס מקום */
    .site-header {
        position: relative !important;
        width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }
}