/* search.css */
/* -------------------------------------------------*/
/*  --- SynaptikCMS Custom search function by Dorian FICHOT ---  */
/* -------------------------------------------------*/

/* ── Search icon in nav ── */
.search-icon svg {
  margin-top: 3px;
  stroke: var(--search-primary);
  transition: transform 0.3s ease;
}
.search-icon a:hover svg {
  transform: scale(1.2);
}

/* ────────────────────────────────────────────────
   OVERLAY
   Full-screen fixed container.
   position:fixed makes it the positioning context
   for #close-search (absolute) and .search-bar
   (absolute when centred).
   Becomes flex column when active so .search-results
   can fill remaining height once bar has moved up.
──────────────────────────────────────────────── */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--search-bg-darker);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

/* ────────────────────────────────────────────────
   CLOSE BUTTON
   Always anchored top-right, never moves.
──────────────────────────────────────────────── */
#close-search {
  position: absolute;
  top: 20px;
  right: 50px;
  border: 1px solid white;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 5px;
  line-height: 0.6;
  background-color: var(--search-primary-dark);
  border-radius: var(--search-border-radius-sm);
  transition: background-color 0.2s ease;
  z-index: 2;
}
#close-search:hover {
  background-color: var(--search-primary);
}

/* ────────────────────────────────────────────────
   SEARCH BAR  (input + filter checkboxes)

   DEFAULT — no results:
     position:absolute, centred in the overlay via
     top:50% + translateY(-50%).

   WITH RESULTS (.has-results on overlay):
     position:relative → re-enters the flex column
     at the top. padding-top keeps it clear of the
     close button. The transition on top + transform
     drives the visible slide-up animation.
──────────────────────────────────────────────── */
.search-bar {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 0 15%;
  box-sizing: border-box;
  transform: translateY(-50%);
  transition: top 0.6s cubic-bezier(0.16, 1, 0.3, 1),
  transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.search-overlay.has-results .search-bar {
  position: relative;
  top: 50px;
  transform: translateY(0);
  padding-bottom: 16px;
  margin-bottom: 40px;
  transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
  transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Input field ── */
.search-input-container {
  position: relative;
  margin-bottom: 16px;
}

#search-input {
  width: 100%;
  padding: 12px 44px 12px 15px;
  border: 3px solid var(--search-primary);
  border-radius: 5px;
  background-color: var(--search-bg-accent);
  color: var(--search-text-main);
  font-size: 1.4rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}
#search-input:focus {
  outline: none;
  border-color: var(--search-primary-light);
  box-shadow: none;
}

/* ── Clear (×) button inside input ── */
.search-clear-btn {
  position: absolute;
  right: 15px;
  top: 15%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 22px;
  text-align: center;
  font-size: 18px;
  background: var(--search-primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  display: none;
  transition: background-color 0.2s ease;
}
.search-clear-btn:hover {
  background-color: var(--search-primary-dark);
}

/* ── Filter checkboxes ── */
.search-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 10px 15px;
  background-color: #1819187a;
  border-radius: 5px;
  color: var(--search-text-main);
}
.search-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ccc;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 0;
}
.search-options input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--search-bg-main);
  border-radius: 3px;
  background-color: #191d18;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}
.search-options input[type="checkbox"]:checked {
  background-color: var(--search-primary);
}
.search-options input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ────────────────────────────────────────────────
   RESULTS PANEL
   flex:0 by default — takes zero height, invisible.
   With .has-results: flex:1 fills all remaining
   height below the bar; overflow-y:auto scrolls
   independently without moving the bar above.
   Opacity delayed so bar finishes sliding first.
──────────────────────────────────────────────── */
.search-results {
  flex: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 15%;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease 0.3s;
}

.search-overlay.has-results .search-results {
  flex: 1;
  opacity: 1;
  pointer-events: auto;
  padding-top: 20px;
  padding-bottom: 20px;
}

.search-results::-webkit-scrollbar { width: 12px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb {
  background: var(--search-primary-dark);
  border-radius: 2px;
}

/* ── Loading indicator ── */
.search-loading {
  color: #aaa;
  padding: 20px 0;
  font-size: 0.9rem;
}

/* ── Results count ── */
.results-count {
  margin-bottom: 20px;
  color: #aaa;
  font-size: 0.9rem;
}

/* ── Section headings ── */
.result-type-heading {
  margin: 25px 0 15px;
  color: var(--search-result-heading);
  font-size: 2rem;
  border-bottom: 1px solid #a5a5a5;
  padding-bottom: 8px;
}
.result-title-heading {
  margin: 0 0 15px;
  color: white;
  font-size: 1.5rem;
}
.result-title-heading a { color: var(--search-primary-light); }
.result-title-heading a:hover { color: var(--search-primary); }

/* ── Individual result card ── */
.search-result-item {
  margin-bottom: 15px;
  padding: 15px;
  background-color: var(--search-bg-accent);
  border-radius: 5px;
  display: flex;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.search-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background-color: var(--search-bg-main);
}
.search-result-item.has-image {
  padding-left: 120px;
  min-height: 100px;
}

/* ── Thumbnail ── */
.result-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100%;
  overflow: hidden;
}
.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.search-result-item:hover .result-image img { transform: scale(1.05); }

/* ── Result body ── */
.result-content { flex: 1; }
.result-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 8px;
}
.result-type.article { background-color: #489e64; color: white; }
.result-type.page    { background-color: #e6972f; color: white; }
.result-type.project { background-color: #3f82c5; color: white; }

.search-result-item h4 { margin: 0 0 8px; font-size: 1.6rem; }
.search-result-item h4 a {
  color: #eee;
  text-decoration: none;
  transition: color 0.2s ease;
}
.search-result-item h4 a:hover { color: var(--search-primary-dark); }

.result-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--search-text-main);
  line-height: 1.4;
}

/* ── Highlight matched text ── */
.highlight {
  background-color: #fcf04c;
  padding: 2px 3px;
  border-radius: 3px;
  font-weight: bold;
  color: black;
}

/* ── Empty / error states ── */
.no-results, .error {
  padding: 30px;
  text-align: center;
  background-color: var(--search-bg-darker);
  border-radius: 5px;
  color: #aaa;
}
.error { color: #e57373; }

/* ────────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────────── */
@media (max-width: 768px) {
  #close-search {
    top: 12px;
    right: 12px;
    font-size: 28px;
  }

  .search-bar {
    padding: 0 16px;
  }
  .search-overlay.has-results .search-bar {
    padding-top: 60px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-results {
    padding: 0 16px;
  }
  .search-overlay.has-results .search-results {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .search-options {
    flex-direction: column;
    gap: 10px;
  }

  .search-result-item.has-image {
    padding-left: 15px;
    padding-top: 130px;
  }
  .result-image {
    width: 100%;
    height: 120px;
  }
}
/* shortcodes.css */
/* ==========================================================================
   Shortcodes — SynaptikCMS
   ========================================================================== */

/* ── [toc] ─────────────────────────────────────────────────────────────────── */
.sc-toc {
  display: inline-block;
  min-width: 220px;
  max-width: 100%;
  background-color: var(--bg-darker, #161815);
  border: 1px solid #333;
  border-left: 3px solid var(--color-primary, #4fa75c);
  border-radius: var(--border-radius-sm, 4px);
  padding: 14px 18px;
  margin: var(--space-md, 20px) 0;
}

.sc-toc::before {
  content: 'Sommaire';
  display: block;
  font-family: var(--font-headings, 'Saira Extra Condensed', sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary, #4fa75c);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2d28;
}

.sc-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-toc li a {
  font-size: 0.88rem;
  color: var(--text-main, #eee);
  text-decoration: none;
  opacity: 0.8;
  transition: color var(--transition-fast, 0.2s ease),
              opacity var(--transition-fast, 0.2s ease);
}

.sc-toc li a:hover {
  color: var(--color-primary-light, #61ce70);
  opacity: 1;
}

.sc-toc .sc-toc-sub {
  padding-left: 14px;
  position: relative;
}

.sc-toc .sc-toc-sub::before {
  content: '\2013';
  position: absolute;
  left: 4px;
  color: var(--color-primary, #4fa75c);
  opacity: 0.5;
  font-size: 0.75rem;
  line-height: 1.6;
}
.sc-toc .sc-toc-sub a {
  font-size: 0.82rem;
}

/* ── [callout] ─────────────────────────────────────────────────────────────── */
.sc-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--border-radius-sm, 4px);
  border-left: 4px solid;
  margin: var(--space-md, 20px) 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.sc-callout-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  line-height: 1.6;
}
.sc-callout-body {
  flex: 1;
  min-width: 0;
  color: var(--text-main, #666);
}
.sc-callout-body p:first-child { margin-top: 0; }
.sc-callout-body p:last-child  { margin-bottom: 0; }
.sc-callout-info    { background-color: rgba(79,138,167,.12); border-color: var(--color-secondary,  #4f8aa7); }
.sc-callout-warning { background-color: rgba(192,86,86,.12);  border-color: var(--color-warning,    #c05656); }
.sc-callout-tip     { background-color: rgba(79,167,92,.12);  border-color: var(--color-primary,    #4fa75c); }
.sc-callout-danger  { background-color: rgba(192,86,86,.18);  border-color: #9b2020; }

/* ── [quote] ───────────────────────────────────────────────────────────────── */
.sc-quote {
  border-left: 4px solid var(--color-primary, #4fa75c);
  margin: var(--space-lg, 30px) 0;
  padding: 20px;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main, #777);
  /* opacity: 0.9; */
  background: #00000029;
  max-width: 700px;
}

.sc-quote p:first-child { margin-top: 0; }
.sc-quote p:last-child  { margin-bottom: 0; }
.sc-quote footer {
  margin-top: 10px;
  font-style: normal;
  font-size: var(--font-size-xs, 0.7em);
  color: var(--text-secondary, #666);
  font-family: var(--font-headings, 'Saira Extra Condensed', sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── [button] ──────────────────────────────────────────────────────────────── */
.sc-btn {
  display: inline-block;
  padding: var(--space-sm, 10px) var(--space-md, 20px);
  border-radius: var(--border-radius-sm, 4px);
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast, 0.2s ease),
              color var(--transition-fast, 0.2s ease),
              transform .1s ease;
  margin: var(--space-xs, 5px) 0;
}

.sc-btn:active { transform: scale(0.97); }
.sc-btn-primary            { background-color: var(--color-primary, #4fa75c);   color: var(--text-main, #eee); border: none; }
.sc-btn-primary:hover      { background-color: var(--color-primary-light, #61ce70); color: #fff; }
.sc-btn-secondary          { background-color: var(--color-secondary, #4f8aa7); color: var(--text-main, #eee); border: none; }
.sc-btn-secondary:hover    { background-color: #3a7090; color: #fff; }
.sc-btn-outline            { background-color: transparent; color: var(--color-primary, #4fa75c); border: 2px solid var(--color-primary, #4fa75c); }
.sc-btn-outline:hover      { background-color: var(--color-primary, #4fa75c); color: var(--text-main, #eee); }

/* ── Grid wrappers ─────────────────────────────────────────────────────────── */
.sc-articles-grid,
.sc-projects-grid {
  margin: var(--space-md, 20px) 0;
}
/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sc-toc { display: block; }
}

@media (max-width: 480px) {
  .sc-articles-grid { grid-template-columns: 1fr; }
}

/* ── Callout title (from :::type Title syntax) ───────────────────── */
.sc-callout-title {
  margin: 0 0 4px;
  font-size: .85em;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .75;
}
/* gallery-layout.css */
/* ============================================================
   COLLAPSIBLE SECTIONS (jusqu'à 4 niveaux imbriqués)
   ============================================================ */
.c-col {
  --c-color: #60a5fa;
  --c-bg: rgba(96, 165, 250, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
  background: var(--c-bg);
}

.c-col>.c-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  /* background:transparent; */
  background: rgba(255, 255, 255, .03);
  border: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background .2s ease;
  box-sizing: border-box
}

.c-col>.c-head:hover {
  background: rgba(255, 255, 255, .07);
}

.c-col>.c-head .c-icon {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

.c-col>.c-head .c-title {
  flex: 1;
  font-weight: 600;
  color: var(--c-color);
  line-height: 1.3;
}

/* ── Chevron  ──────────────────────────────────────────────
   ─────────────────────────────────────────────────────────── */
.c-col>.c-head .c-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0;
  /* hide the literal ▼ character */
  color: transparent;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.c-col>.c-head .c-chevron::before {
  content: "";
  display: block;
  /* in-flow inside the flex parent → auto-centred */
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--c-color);
}

.c-col.open>.c-head .c-chevron {
  transform: rotate(180deg);
}

/* ── Body animation ───────────────────────────────────────────
   ─────────────────────────────────────────────────────────── */
.c-col>.c-body {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 14px;
  opacity: 0;
  transform: translateY(-6px);
  /* closing transition — snappier */
  transition:
    max-height .25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity .2s ease,
    transform .2s ease,
    padding .2s ease;
}

.c-col.open>.c-body {
  max-height: 5000px;
  /* large enough for any content */
  padding: 6px 14px 14px;
  opacity: 1;
  transform: translateY(0);
  /* opening transition — slightly slower + tiny delay for opacity/translate */
  transition:
    max-height .4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity .3s ease .06s,
    transform .3s ease .06s,
    padding .25s ease;
}

.c-col.open>.c-body p {
  font-size: 16px;
  line-height: 1.4;
  margin: 5px;
}

/* Niveaux — tailles et indentation décroissantes */
.c-col[data-level="1"]>.c-head {
  padding: 14px 16px;
}

.c-col[data-level="1"]>.c-head .c-title {
  font-size: 20px;
}

.c-col[data-level="2"] {
  margin: 8px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}

.c-col[data-level="2"]>.c-head {
  padding: 11px 13px;
}

.c-col[data-level="2"]>.c-head .c-title {
  font-size: 18px;
}

.c-col[data-level="3"] {
  margin: 6px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border-color: transparent;
}

.c-col[data-level="3"]>.c-head {
  padding: 9px 11px;
}

.c-col[data-level="3"]>.c-head .c-title {
  font-size: 16px;
}

.c-col[data-level="4"] {
  margin: 5px 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border-color: transparent;
}

.c-col[data-level="4"]>.c-head {
  padding: 7px 10px;
}

.c-col[data-level="4"]>.c-head .c-title {
  font-size: 16px;
}

.c-toggle-bar {
  display: flex;
  gap: 8px;
  margin-left: 20px;
}

.c-toggle-bar button {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: var(--bg-darker);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s ease, background .15s ease;
}

.c-toggle-bar button:hover {
  opacity: 1;
  background: var(--bg-accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--color-border-tertiary);
}

td {
  padding: 10px 14px;
  vertical-align: top;
  border-bottom: 0.5px solid var(--color-border-tertiary);
  color: var(--color-text-primary);
  line-height: 1.6;
}

tr:last-child td {
  border-bottom: none;
}

.cat {
  font-weight: 500;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
}

.sym {
  background: #ffd93d22;
  color: #92740a;
}

.para {
  background: #e1f5ee;
  color: #085041;
}

.note {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* ============================================================
   TAB GROUPS (regroupent plusieurs sections de niveau 1)
   ============================================================ */
.tab-group {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  margin: 5px 0;
  overflow: hidden;
  background: var(--bg-darker);
}

.tab-group .tabs {
  display: flex;
  gap: 2px;
  padding: 0 8px 0;
  background: rgba(0, 0, 0, .2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-group .tabs::-webkit-scrollbar {
  height: 4px;
}

.tab-group .tab-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-bottom: none;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-top: 10px;
  background: rgba(0, 0, 0, .2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: .55;
  transition: opacity .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.tab-group .tab-btn:hover {
  opacity: .85;
}

.tab-group .tab-btn.active {
  opacity: 1;
  background: var(--bg-darker);
  border-color: rgba(255, 255, 255, .08);
  color: var(--tab-color, var(--color-primary));
}

.tab-group .tab-btn .t-icon {
  font-size: 16px;
  line-height: 1;
}

/* Direct children .c-col become tab panels */
.tab-group>.c-col {
  border: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
}

.tab-group>.c-col>.c-head {
  display: none;
}

/* Tab panels: always block (max-height/opacity controlled below) */
.tab-group>.c-col>.c-body {
  display: block;
  padding: 18px;
  /* reset the collapsible animation for tab panels — always fully open */
  max-height: none;
  overflow: visible;
  opacity: 1;
  transform: none;
  transition: none;
}

/* Before JS init: show only first panel. After init: show .tab-active */
.tab-group:not(.tab-initialized)>.c-col~.c-col {
  display: none;
}

.tab-group.tab-initialized>.c-col {
  display: none;
}

.tab-group.tab-initialized>.c-col.tab-active {
  display: block;
  animation: tabPanelIn .25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes tabPanelIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------- */
/* Masonry Gallery Styles */
/* ----------------------- */
.gallery-masonry {
  display: block;
  width: 100%;
  margin: 0 auto;
}

.masonry-item {
  width: calc(33.333% - 10px);
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background-color: #212720;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: opacity 0.3s ease;
}

.masonry-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.masonry-item:hover img {
  opacity: 0.8;
}

.masonry-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 0.9em;
  transform: translateY(100%);
  transition: all 0.3s ease-in-out;
  opacity: 0;
}

.masonry-item:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------- */
/*     Justified Gallery Styles      */
/* --------------------------------- */
/* Justified Gallery Hover Effects Only */
.justified-gallery>a,
.justified-gallery>div {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* Keep this to contain image hover effects */
}

/* Image transition */
.justified-gallery>a>img,
.justified-gallery>div>img {
  border-radius: 5px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover effect for the container */
.justified-gallery>a:hover,
.justified-gallery>div:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  border-radius: 5px;
}

/* Hover effect for the image */
.justified-gallery>a:hover>img,
.justified-gallery>div:hover>img {
  opacity: 0.85;
}

/* Caption transition only - no positioning changes */
.justified-gallery>a>.caption,
.justified-gallery>div>.caption {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(100%);
}

/* Show caption on hover */
.justified-gallery>a:hover>.caption,
.justified-gallery>div:hover>.caption {
  opacity: 1;
  transform: translateY(0);
}

/* Hide default captions */
.justified-gallery>.jg-entry>.jg-caption,
.justified-gallery .jg-caption,
.jg-caption {
  display: none !important;
}

.justified-gallery .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 0.9em;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease-in-out;
  border-radius: 0 0 5px 5px;
}

.justified-gallery a:hover .caption {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------- */
/* Carousel Gallery Styles */
/* ----------------------- */

.gallery-carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  max-width: 800px;
  height: 450px;
  overflow: hidden;
  border-radius: 8px;
  background-color: #191d18;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item.active {
  opacity: 1;
  z-index: 5;
}

.carousel-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px;
  text-align: center;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-control:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control-prev {
  left: 15px;
}

.carousel-control-next {
  right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
  background-color: transparent;
  border-top: 3px solid white;
  border-right: 3px solid white;
  display: inline-block;
}

.carousel-control-prev-icon {
  transform: rotate(-135deg);
}

.carousel-control-next-icon {
  transform: rotate(45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: auto;
  grid-gap: var(--space-sm);
  position: relative;
  width: 100%;
}

.gallery-image {
  position: relative;
  border-radius: 5px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  background-color: #212720;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  overflow: hidden;
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.gallery-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition-normal);
}

.gallery-image:hover img {
  opacity: 0.8;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--text-main);
  padding: var(--space-sm);
  text-align: center;
  font-size: var(--font-size-sm);
  transform: translateY(100%);
  transition: all var(--transition-normal);
  opacity: 0;
}

.gallery-image:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
  .masonry-item {
    width: calc(50% - 10px);
  }

  .gallery-carousel {
    height: 400px;
  }

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

  .gallery-image,
  .gallery-image img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .masonry-item {
    width: 100%;
  }

  .gallery-carousel {
    height: 300px;
  }
