/* ==========================================================================
   main.css — Astra + Gutenberg (organized, deduped, effects preserved)

   Goals:
   - Keep your current visuals/behaviors.
   - Remove duplicated “highlight” CSS by centralizing it.
   - Keep ONEPAGE “optional whole-item highlight” truly optional (commented).
   - Keep caption SVG mask version.
========================================================================== */

/* ========================================================================== */
/* 01) BASE — Scrollbar                                                        */
/* ========================================================================== */

* {
  scrollbar-color: #1e1e1e #ffffff;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  height: 50px;
  background-color: #1e1e1e;
  background-clip: content-box;
  border: 2px solid transparent;
}

::-webkit-scrollbar-track-piece {
  background-color: #fafafa;
}


.wpml-ls-slot-4, .wpml-ls-slot-4 a, .wpml-ls-slot-4 a:visited {
    background-color: transparent !important;
}

/* ========================================================================== */
/* 02) WORDPRESS / GUTENBERG — Quote block                                     */
/* ========================================================================== */

/* Cache the selector once for readability */
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center) {
  position: relative;

  /* Portrait frame proportions */
  min-height: 720px;
  max-width: 420px;
  padding: 2rem;
  margin: 4rem 0;

  /* Frame */
  border: 3px solid #1a1f2a;
  border-left: none; /* Reset Astra default */
  border-radius: 2px;
  background: transparent;

  /* Reset Astra defaults */
  quotes: none;
}

/* Remove Astra quote icon */
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center)::before {
  content: none !important;
}

/* Optional subtle opening quote mark */
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center)::after {
  content: "“";
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  font-size: 3.5rem;
  line-height: 1;
  font-style: normal;
}

/* Quote text */
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center) p {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  left: 2rem;

  margin: 0;

  /* Editorial typography */
  font-size: clamp(1.05rem, 1vw + 0.9rem, 1.35rem);
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
}

/* Citation stays under text */
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center) cite,
.wp-block-quote:not(.has-text-align-right):not(.has-text-align-center)
  .wp-block-quote__citation {
  position: absolute;
  bottom: 0.75rem;
  left: 2rem;

  font-size: 0.8rem;
  font-style: normal;
  opacity: 0.6;
}

/* ========================================================================== */
/* 03) WORDPRESS / GUTENBERG — Image captions (SVG mask icon)                  */
/* ========================================================================== */

figcaption.wp-element-caption {
  display: block !important;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  /* IMPORTANT: if you keep opacity here, it will also fade the arrow.
     Prefer using color with alpha instead (see note below). */
  color: rgba(0, 0, 0, 0.75);
}

figcaption.wp-element-caption::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.35em;
  vertical-align: -0.05em;

  background-color: #000; /* always black */
  opacity: 1;

  -webkit-mask: url("/wp-content/uploads/2026/01/fav.svg") no-repeat center / contain;
          mask: url("/wp-content/uploads/2026/01/fav.svg") no-repeat center / contain;
}


/* ========================================================================== */
/* 04) ASTRA — Theme tweaks                                                    */
/* ========================================================================== */

.ast-article-single figure,
.ast-article-single img:not(figure img) {
  box-shadow: none;
}

.social-show-label-true .ast-builder-social-element {
  padding: 0;
}

/* ========================================================================== */
/* 05) EFFECTS — Shared highlight “engine” (deduped)                           */
/* ========================================================================== */

/* Core highlight styling (reused by links, titles, etc.) */
:where(
    a:not(.custom-logo-link),
    .project-card__title,
    .onepage-related__title
  ) {
  padding: 3px;
  margin: -3px;

  background-image: linear-gradient(
    var(--ast-global-color-1),
    var(--ast-global-color-1)
  );
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 100% 0;

  transition: background-size 0.3s ease, background-position 0.3s ease;

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Keep multi-line behavior consistent on titles */
:where(.project-card__title, .onepage-related__title) {
  display: inline;
}

/* Hover behavior for normal links (self-hover) */
a:not(.custom-logo-link):hover,
a:not(.custom-logo-link):focus-visible {
  background-size: 100% 100%;
  background-position: 0 0;
}

/* ========================================================================== */
/* 06) COMPONENT — Project card (remove link highlight; highlight only title)  */
/* ========================================================================== */

a.project-card__link:not(.custom-logo-link),
a.project-card__link:not(.custom-logo-link):hover,
a.project-card__link:not(.custom-logo-link):focus-visible {
  background-image: none !important;
  background-size: 0 0 !important;
  background-position: 0 0 !important;
}

.project-card__link:hover .project-card__title,
.project-card__link:focus-visible .project-card__title,
.project-card:hover .project-card__title {
  background-size: 100% 100%;
  background-position: 0 0;
}

/* ========================================================================== */
/* 07) COMPONENT — ONEPAGE related (remove link highlight; highlight title)    */
/* ========================================================================== */

/* Remove global link highlight from related links */
.onepage-related__item a:not(.custom-logo-link),
.related-projects__item a:not(.custom-logo-link) {
  background-image: none !important;
  background-size: 0 0 !important;
  background-position: 0 0 !important;
}

/* Correct hover / focus trigger → title */
.onepage-related__item:hover .onepage-related__title,
.onepage-related__item:focus-within .onepage-related__title,
.related-projects__item:hover .onepage-related__title,
.related-projects__item:focus-within .onepage-related__title {
  background-size: 100% 100%;
  background-position: 0 0;
}

/* OPTIONAL: Highlight WHOLE RELATED ITEM instead of title
   (Uncomment if needed; keep title-highlight above or remove it if redundant)
*/
.onepage-related__item,
.related-projects__item {
  display: inline-block;
  padding: 3px;

  background-image: linear-gradient(
    var(--ast-global-color-1),
    var(--ast-global-color-1)
  );
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 100% 0;

  transition: background-size 0.3s ease, background-position 0.3s ease;

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.onepage-related__item:hover,
.onepage-related__item:focus-within,
.related-projects__item:hover,
.related-projects__item:focus-within {
  background-size: 100% 100%;
  background-position: 0 0;
}


/* ========================================================================== */
/* 08) COMPONENT — Off-canvas latest post block                                */
/* ========================================================================== */

.menu-item-latest-magazine,
.menu-item-latest-project {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.offcanvas-latest-post {
  display: block;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

/* Header */
.offcanvas-latest-post__header {
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Layout */
.offcanvas-latest-post__link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: flex-start;

  text-decoration: none;
  color: inherit;
}

/* Thumbnail */
.offcanvas-latest-post__thumb img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

/* Text content */
.offcanvas-latest-post__title {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.offcanvas-latest-post__meta {
  margin-bottom: 4px;
  font-size: 12px;
  opacity: 0.7;
}

.offcanvas-latest-post__excerpt {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.85;
}

/* Hover effect */
.offcanvas-latest-post__link:hover .offcanvas-latest-post__title {
  text-decoration: underline;
}

/* Mobile safety */
@media (max-width: 480px) {
  .offcanvas-latest-post__title {
    font-size: 14px;
  }
}

/* Hide off-canvas latest post on desktop */
@media (min-width: 921px) {
  .menu-item-latest-magazine,
  .menu-item-latest-project {
    display: none !important;
  }
}




/* ========================================================================== */
/* 9) WPML SMALLER SUB MENU                                */
/* ========================================================================== */




nav ul[class*="menu"] li.wpml-ls-menu-item ul.sub-menu,
nav ul[class*="menu"] li.wpml-ls-menu-item ul.sub-menu li a {
  width: auto;
  min-width: 30px;
}



