﻿*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #1e2152;
  --bgf: #44466f;
  --bg2: #161944;
  --bg2f: rgb(22, 25, 68, 0.7);
  --bg3: #272b62;
  --pink: #ff4cff;
  --pink2: #f0338a;
  --white: #ffffff;
  --gray: #9aa3bf;
  --pad: clamp(10px, 2vw, 24px);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--white);
  display: flex;
  flex-direction: column;
  font-size: clamp(0.3rem, 1vh + 0.29rem, 5rem);
  line-height: 1.5;
  font-weight: 500;
}

/* ═══════════════ LAYOUT WRAPPER ═══════════════ */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

@media (min-aspect-ratio: 1 / 1) {
  :root {
    --max-w: calc(100vh * 1200 / 950);
  }
}

@media (max-aspect-ratio: 1 / 1) {
  :root {
    --max-w: 60vh;
  }
}

/* ═══════════════ HEADER ═══════════════ */
header {
  background: var(--bgf);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  z-index: 10;
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(6px, 0.8vh, 14px);
  padding-bottom: clamp(6px, 0.8vh, 14px);
  gap: clamp(4px, 0.8vw, 20px);
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-link svg,
.logo-link img {
  height: clamp(0.2rem, 2.5vh + 0.3rem, 4rem);
  width: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 20px);
  flex-shrink: 0;
}

.lang-btn,
.btn-gallery {
  background: none;
  border: none;
  color: var(--gray);
  font-size: clamp(0.2rem, 1vh + 0.2rem, 4rem);
  font-weight: 500;
  cursor: pointer;
  padding: clamp(2px, 0.3vh, 6px) clamp(3px, 0.4vw, 12px);
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s;
}
body:not(.touch) .lang-btn:hover,
body:not(.touch) .btn-gallery:hover {
  color: var(--pink);
}
body.touch .lang-btn:active,
body.touch .btn-gallery:active {
  color: var(--pink);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  transition: color 0.2s;
}
body:not(.touch) .icon-btn:hover {
  color: var(--pink);
}
body.touch .icon-btn:active {
  color: var(--pink);
}
.icon-btn svg {
  width: clamp(0.3rem, 1vh + 0.75rem, 5rem);
  height: auto;
}

/* ═══════════════ MAIN ═══════════════ */
main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── ABOUT ── */
.about {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.about .wrap {
  padding-top: clamp(6px, 1vh, 20px);
  padding-bottom: clamp(6px, 1vh, 20px);
}
.about p {
  color: var(--gray);
}
.about h1,
.about h2 {
  color: var(--gray);
  font-weight: normal;
}
.about p + p {
  margin-top: clamp(2px, 0.3vh, 6px);
}

/* ── SERVICES ── */
.services {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.services .wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: clamp(6px, 1vh, 20px);
  padding-bottom: clamp(6px, 1vh, 20px);
}
.services-title {
  font-size: clamp(0.2rem, 1vh + 0.2rem, 4rem);
  /* font-size: clamp(0.3rem, 1vh + 0.29rem, 5rem); */
  /* font-size: clamp(0.1rem, 1.5vh + 0.1rem, 10rem); */
  font-weight: 600;
  letter-spacing: 0.5px;
  /* letter-spacing: 1.4px; */
  text-transform: uppercase;
  color: var(--pink);
  text-align: left;
  /* flex-shrink: 0; */
  margin-bottom: clamp(4px, 0.6vh, 16px);
}

/* ── CONTACT ── */
.contact-section {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: clamp(0.2rem, 1vh + 0.2rem, 4rem);
  /* font-size: clamp(0.1rem, 1.35vh + 0.1rem, 7rem); */
}
.contact-section .wrap {
  display: flex;
  justify-content: space-between;
  padding-top: clamp(6px, 1vh, 20px);
  padding-bottom: clamp(6px, 1vh, 20px);
  gap: clamp(8px, 1.2vw, 30px);
}
.contact-label {
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  /* color: var(--pink); */
  margin-bottom: clamp(2px, 0.3vh, 6px);
}
.contact-block p {
  color: var(--gray);
  line-height: 1.65;
}
.contact-block a {
  color: var(--gray);
  text-decoration: none;
}
.contact-block a:hover {
  color: var(--white);
}
.kontaktai-block {
  text-align: left;
}
.rekvizitai-block {
  text-align: left;
}

/* ── FOOTER ── */
footer {
  font-size: clamp(0.2rem, 1vh + 0.135rem, 4rem);
  flex-shrink: 0;
  background: var(--bg2);
  text-align: center;
  color: var(--gray);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
footer .wrap {
  padding-top: clamp(4px, 0.5vh, 10px);
  padding-bottom: clamp(4px, 0.5vh, 10px);
}

/* ═══════════════ SERVICE POPUP ═══════════════ */
.popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
.popup-backdrop.open {
  display: block;
  pointer-events: none;
}
@media (max-width: 768px) {
  .popup-backdrop.open {
    pointer-events: auto;
  }
}

.popup {
  position: fixed;
  background: var(--bg3);
  border-radius: clamp(8px, 1vw, 14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: clamp(8px, 1vh, 16px) clamp(10px, 1.2vw, 18px) 
    clamp(10px, 1.2vh, 18px);
  z-index: 201;
  width: clamp(100px, 30vw, 350px);
  max-height: 55dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.88);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out,
    visibility 0s 0.15s;
}
.popup.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: none;
  visibility: visible;
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out,
    visibility 0s;
}

.popup-title {
  /* font-size: clamp(0.1rem, 1.5vh + 0.1rem, 10rem); */
  font-weight: 600;
  /* letter-spacing: 1.2px; */
  text-transform: uppercase;
  color: var(--pink);
  flex-shrink: 0;
  letter-spacing: 0.5px;
  margin-bottom: clamp(6px, 0.8vh, 14px);
}
.popup-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}
.popup-category + .popup-category {
  margin-top: clamp(8px, 1vh, 18px);
}
.popup-cat-title {
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: clamp(4px, 0.5vh, 10px);
}
.popup-list {
  list-style: none;
  padding-left: 2px;
}
.popup-list li {
  color: var(--gray);
  padding: clamp(2px, 0.2vh, 4px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ═══════════════ GALLERY OVERLAY ═══════════════ */
.gallery-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.gallery-overlay.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.gallery-overlay-header {
  position: relative;
  background: var(--bg2);
  padding: clamp(6px, 0.8vh, 14px) clamp(10px, 1.5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.gallery-overlay-title {
  /* font-size: clamp(0.3rem, 1vh + 0.35rem, 5rem); */
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
}
.gallery-overlay-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: clamp(5px, 1.7vh + 0.3rem, 80rem);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

body:not(.touch) .gallery-overlay-close:hover {
  color: var(--pink);
}
body.touch .gallery-overlay-close:active {
  color: var(--pink);
}

.gallery-scroll {
  flex: 1;
  overflow-y: auto;
  padding: clamp(6px, 1vw, 16px);
  -webkit-overflow-scrolling: touch;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(4px, 0.6vw, 12px);
}

@media (min-aspect-ratio: 1 / 1) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-aspect-ratio: 9 / 30) {
  /* min and max swapped ↑ */
  .gallery-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-aspect-ratio: 9 / 18) and (min-aspect-ratio: 9 / 30) {
  /* min and max swapped ↑ */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-aspect-ratio: 9 / 11) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-aspect-ratio: 9 / 6) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-aspect-ratio: 9 / 2) {
  .gallery-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: clamp(4px, 0.6vw, 10px);
  overflow: hidden;
  background: var(--bg2);
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s, opacity 0.3s;
  will-change: transform;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
@media (min-width: 600px) {
  .gallery-item img {
    object-position: center;
  }
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 24px);
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 100%;
  max-height: 90dvh;
  border-radius: clamp(4px, 0.5vw, 8px);
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: clamp(8px, 1.5vh, 20px);
  right: clamp(10px, 1.5vw, 24px);
  background: none;
  border: none;
  color: var(--gray);
  font-size: clamp(5px, 3.5vh + 0.6rem, 90rem);
  line-height: 1;
  cursor: pointer;
  z-index: 401;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

body:not(.touch) .lightbox-close:hover {
  color: var(--pink);
}
body.touch .lightbox-close:active {
  color: var(--pink);
}

.lightbox-close.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: clamp(4px, 1vw, 16px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: clamp(22px, 3vw, 42px);
  line-height: 1;
  width: clamp(30px, 5vh, 80px);
  height: clamp(38px, 6vh, 100px);
  border-radius: clamp(4px, 0.5vw, 10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    opacity 0.2s;
  padding: 0;
  user-select: none;
  z-index: 401;
  opacity: 0;
  pointer-events: none;
}
.lightbox-prev.open,
.lightbox-next.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-next {
  left: auto;
  right: clamp(4px, 1vw, 16px);
}
body:not(.touch) .lightbox-prev:hover,
body:not(.touch) .lightbox-next:hover {
  background: rgba(232, 24, 110, 0.12);
  border-color: var(--pink);
  color: var(--pink);
}
body.touch .lightbox-prev:active,
body.touch .lightbox-next:active {
  background: rgba(232, 24, 110, 0.12);
  border-color: var(--pink);
  color: var(--pink);
}
.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.2;
  pointer-events: none;
}

button,
.lang-btn,
.btn-gallery,
.gallery-item,
.gallery-item img,
.gallery-overlay-close,
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════ ICONS GRID — ASPECT RATIO LAYOUTS ═══════════════ */

/* Default (landscape: width > height) */
.icons-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "a c d"
    "b c e";
  gap: clamp(6px, 0.8vw, 20px);
}
.svc-btn {
  background: var(--bgf);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: clamp(6px, 0.8vw, 14px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1px, 3vh, 80px);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
  overflow: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.svc-btn:hover,
.svc-btn:active,
.svc-btn.hover-active {
  background: rgba(232, 24, 110, 0.12);
  border-color: rgba(232, 24, 110, 0.4);
  transform: scale(1.03);
}
.svc-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}
.svc-btn:nth-child(1) {
  grid-area: a;
}
.svc-btn:nth-child(2) {
  grid-area: b;
}
.svc-btn--wide {
  grid-area: c;
  grid-column: auto;
}
.svc-btn:nth-child(4) {
  grid-area: d;
}
.svc-btn:nth-child(5) {
  grid-area: e;
}

/* Portrait (height > width) */
@media (aspect-ratio: 1 / 1) and (orientation: portrait),
  (max-aspect-ratio: 1 / 1) {
  .icons-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1.5fr 1fr;
    grid-template-areas: none;
  }
  .svc-btn:nth-child(1) {
    grid-area: auto;
  }
  .svc-btn:nth-child(2) {
    grid-area: auto;
  }
  .svc-btn--wide {
    grid-area: auto;
    grid-column: 1 / -1;
  }
  .svc-btn:nth-child(4) {
    grid-area: auto;
  }
  .svc-btn:nth-child(5) {
    grid-area: auto;
  }
  .svc-btn {
    padding: clamp(1px, min(1.5vw, 0.6vh), 40px);
  }
}
