/* ---------------------------------------------------------------
   Components — reusable UI blocks
--------------------------------------------------------------- */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-10);
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--fs-14);
  line-height: 1;
  color: var(--color-white);
  background: var(--brand);
  border: 1px solid var(--brand);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

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

.btn .btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: filter .2s ease;
}

.btn:hover .btn__icon,
.btn:focus-visible .btn__icon {
  filter: brightness(0) invert(1);
}

/* Outlined variant — used for "Visos paslaugos", "Į galeriją" */
.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
  padding: 13px 27px;
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--brand);
  color: var(--color-white);
}

/* Accent yellow variant — used for CTA "Užklausos forma" */
.btn--accent {
  background: var(--accent);
  color: var(--color-blue-14);
  border-color: var(--accent);
  padding: 13px 28px;
  font-weight: var(--font-weight-bold);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: #b8dd00;
  border-color: #b8dd00;
}

.btn--accent:hover .btn__icon,
.btn--accent:focus-visible .btn__icon {
  filter: none;
}

/* Small phone-number chip in the nav */
.btn--chip {
  padding: 10px 20px;
  font-size: var(--fs-13);
}

/* ---------- Badges / tags ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: 5px 11px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  font-size: var(--fs-11);
  color: var(--accent);
  line-height: 1;
}

/* ---------- Card (services, projects, features) ---------- */

.card {
  background: var(--color-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* Shared card lift used by the services carousel and project cards. */
.service-card,
.project-card,
.gallery-card {
  transition: transform .3s ease, box-shadow .3s ease;
}

.project-card__overlay,
.gallery-card__overlay {
  transition: background .35s ease;
}

.project-card__content,
.gallery-card__content {
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.project-card__hover-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-height: 0;
  margin-top: -18px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition:
    max-height .4s cubic-bezier(.22, .61, .36, 1),
    margin-top .4s cubic-bezier(.22, .61, .36, 1),
    opacity .25s ease,
    transform .4s cubic-bezier(.22, .61, .36, 1);
}

.project-card__meta {
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--color-blue-88);
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px -6px rgba(10, 15, 61, 0.16);
}

.project-card:hover,
.project-card:focus-visible,
.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(10, 15, 61, 0.18);
}

.project-card:hover .project-card__overlay,
.project-card:focus-visible .project-card__overlay,
.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-visible .gallery-card__overlay {
  background: linear-gradient(0deg, rgba(10, 15, 61, 0.98) 0%, rgba(10, 15, 61, 0.36) 72%, rgba(10, 15, 61, 0.12) 100%);
}

.project-card:hover .project-card__hover-details,
.project-card:focus-visible .project-card__hover-details,
.gallery-card:hover .project-card__hover-details,
.gallery-card:focus-visible .project-card__hover-details {
  max-height: 22px;
  margin-top: -8px;
  opacity: 1;
  transform: translateY(0);
}

.service-card:focus-visible,
.project-card:focus-visible,
.gallery-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (hover: none) {
  .project-card__hover-details {
    max-height: 22px;
    margin-top: -8px;
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .project-card,
  .gallery-card,
  .project-card__overlay,
  .gallery-card__overlay,
  .project-card__content,
  .gallery-card__content,
  .project-card__hover-details {
    transition: none;
  }
}

/* Feature card (dark surface, blurred glass look) */
.feature-card {
  background: var(--color-white-07);
  border: 1px solid var(--color-white-10);
  border-radius: var(--radius-lg);
  padding: 29px 23px;
  display: flex;
  flex-direction: column;
  gap: 7.2px;
  color: var(--text-on-dark);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-card__icon img {
  width: 28px;
  height: 28px;
}

/* This source asset includes its own 44px icon tile. Rendering it at the
   wrapper size keeps its inner people glyph visually equal to the other
   28px source icons. */
.feature-card__icon img[src$="icon-specialists.svg"] {
  width: 44px;
  height: 44px;
}

.feature-card__icon img[src$="icon-adjustments.svg"] {
  width: 22px;
  height: 22px;
}

.feature-card__title {
  margin-top: 8.8px;
  font-size: var(--fs-15);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
}

.feature-card__body {
  font-size: var(--fs-13);
  line-height: 1.65;
  color: var(--color-blue-88);
}

/* ---------- Accordion / FAQ ---------- */

.accordion {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.accordion__item {
  border-bottom: 1px solid var(--border-subtle);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-20);
  padding: 20px 0;
  text-align: left;
  font-size: var(--fs-15);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.accordion__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xl);
  background: var(--color-grey-97);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-18);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  transition: background-color .2s ease, color .2s ease, transform .25s ease;
}

.accordion__item[open] .accordion__icon,
.accordion__item.is-open .accordion__icon {
  background: var(--brand);
  color: var(--color-white);
  transform: rotate(45deg);
}

.accordion__panel {
  font-size: var(--fs-14);
  line-height: 1.75;
  color: var(--text-muted);
  /* Animate open/close via max-height. Content is always in the DOM
     (JS keeps the item mounted); [open] toggles the height. */
  max-height: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transition: max-height .35s ease, padding .3s ease, opacity .25s ease;
}

.accordion__item[open] .accordion__panel {
  max-height: 800px;
  padding: 0 0 20px;
  opacity: 1;
}

/* Remove default disclosure marker */
.accordion__item summary {
  list-style: none;
  cursor: pointer;
}
.accordion__item summary::-webkit-details-marker {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .accordion__panel { transition: none; }
}

/* ---------- Carousel (used on homepage "Mūsų paslaugos") ----------
   Progressive-enhancement pattern: works as a horizontally-scrollable
   list without JS (native swipe / touchpad scroll / trackpad).
   With JS, the prev/next buttons scroll one slide at a time. */

.carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.carousel__viewport {
  --carousel-shadow-gutter: var(--carousel-gap, 18px);
  /* Extend equally to both sides so card shadows remain visible without
     revealing part of the next slide on desktop and tablet. */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--carousel-shadow-gutter);
  scroll-behavior: smooth;
  scrollbar-width: none;              /* Firefox */
  -ms-overflow-style: none;           /* IE / old Edge */
  /* Keep the cards in their original position while giving the compact
     hover shadow enough room on every side of the scroll container. */
  padding: 24px 0 44px var(--carousel-shadow-gutter);
  margin: -24px calc(0px - var(--carousel-shadow-gutter)) -40px;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;                      /* WebKit */
}

.carousel__track {
  display: flex;
  width: calc(100% - var(--carousel-shadow-gutter));
  gap: var(--carousel-gap, 18px);
}

.carousel__track::after {
  content: "";
  flex: 0 0 var(--carousel-shadow-gutter);
  margin-left: calc(0px - var(--carousel-gap, 18px));
}

.carousel__slide {
  flex: 0 0 calc((100% - (var(--carousel-gap, 18px) * 2)) / 3);
  scroll-snap-align: start;
  min-width: 0;
}

.carousel__controls {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-10);
}

.carousel__btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.carousel__btn:hover,
.carousel__btn:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
}

.carousel__btn:hover .carousel__btn-icon,
.carousel__btn:focus-visible .carousel__btn-icon {
  filter: brightness(0) invert(1);
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel__btn-icon {
  width: 16px;
  height: 16px;
}

.carousel__btn--prev .carousel__btn-icon {
  transform: rotate(180deg);
}

/* Responsive slide sizing — 3 on desktop, 2 on tablet, ~1.15 on mobile */
@media (max-width: 1023px) {
  .carousel__slide {
    flex-basis: calc((100% - var(--carousel-gap, 18px)) / 2);
  }
}

@media (max-width: 767px) {
  .carousel__viewport {
    --carousel-shadow-gutter: 20px;
  }
  .carousel__slide {
    flex-basis: 85%;                  /* peek of next card */
  }
  .carousel__controls {
    justify-content: center;
  }
}

/* ---------- Check bullet (used on About "team" list and Kontaktai "karjera") ---------- */

.intro__bullet {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: var(--fs-15);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.intro__bullet img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---------- Placeholder image (used until real photos are dropped in) ---------- */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue-85);
  color: var(--color-grey-59);
  font-size: var(--fs-12);
  min-height: 100%;
  text-align: center;
}

/* Media chosen in wp-admin renders as a cover image filling its container
   (hero slides and backdrops, project/gallery card backgrounds, portraits). */
.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ---------- Form (used on CTA / contact pages later) ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.field__label {
  font-size: var(--fs-13);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.field__input,
.field__textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--color-white);
  font-size: var(--fs-14);
  color: var(--text-primary);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 10, 237, 0.15);
}

.field__textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---------- Shared project modal ---------- */

.gallery-modal {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 900px;
  width: calc(100% - 32px);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 24px 64px rgba(4, 2, 39, 0.3);
}

.gallery-modal::backdrop {
  background: rgba(4, 2, 39, 0.75);
}

.gallery-modal__body {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  height: 480px;
}

.gallery-modal__media {
  position: relative;
  background: linear-gradient(135deg, var(--color-blue-26) 0%, var(--color-blue-16) 100%);
  min-height: 100%;
  overflow: hidden;
}

.gallery-modal__stage {
  position: absolute;
  inset: 0;
}

.gallery-modal__figure {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: var(--fs-13);
  opacity: 0;
  transition: opacity .4s ease;
}

.gallery-modal__figure.is-active {
  opacity: 1;
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease;
  z-index: 2;
}

.gallery-modal__nav:hover,
.gallery-modal__nav:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.gallery-modal__nav--prev { left: 14px; }
.gallery-modal__nav--next { right: 14px; }

.gallery-modal__nav img {
  width: 16px;
  height: 16px;
}

.gallery-modal__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
}

.gallery-modal__nav[hidden],
.gallery-modal__dots[hidden] {
  display: none !important;
}

.gallery-modal__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 3.5px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: width .2s ease, background-color .2s ease;
}

.gallery-modal__dot:hover,
.gallery-modal__dot:focus-visible {
  background: rgba(255, 255, 255, 0.55);
}

.gallery-modal__dot.is-active {
  width: 20px;
  background: var(--color-white);
}

.gallery-modal__details {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  overflow-y: auto;
  min-width: 360px;
}

.gallery-modal__tag {
  display: inline-flex;
  padding: 5px 13px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-pill);
  font-size: var(--fs-11);
  color: var(--brand);
  line-height: 1;
  margin-bottom: 16px;
}

.gallery-modal__title {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.gallery-modal__desc {
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--color-grey-46-2);
  margin-bottom: 28px;
}

.gallery-modal__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-modal__meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-13);
  color: var(--color-grey-46-2);
}

.gallery-modal__meta-row img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.gallery-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: var(--bg-page);
  color: var(--color-blue-10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: var(--font-weight-medium);
  line-height: 1;
  z-index: 3;
  transition: background-color .2s ease;
}

.gallery-modal__close:hover,
.gallery-modal__close:focus-visible {
  background: var(--color-grey-89);
}

@media (max-width: 1023px) {
  .gallery-modal__body {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 90vh;
  }

  .gallery-modal__media { min-height: 240px; }
  .gallery-modal__details { min-width: 0; }
}

@media (max-width: 767px) {
  .gallery-modal__details { padding: 24px; }
}
