/* ============================================
   SDC — Сумська Девелоперська Компанія
   Clean static version
   ============================================ */

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

:root {
  --color-primary: #3366cc;
  --color-primary-dark: #2854a8;
  --color-primary-light: #5788eb;
  --color-navy: #000a77;
  --color-text: #3e587e;
  --color-text-light: rgba(255, 255, 255, 0.9);
  --color-dark: #1a1a2e;
  --color-white: #ffffff;
  --color-bg: #f8f9fc;
  --color-border: #e5e7eb;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;

  --header-height: 80px;
  --container-width: 1200px;
  --section-padding: 100px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn--outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn--outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--light {
  background: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-white);
  font-size: 16px;
  padding: 16px 40px;
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.9);
}

.btn--sm {
  padding: 10px 24px;
  font-size: 14px;
  margin-top: 16px;
}

.btn__arrow {
  font-size: 1.2em;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  height: var(--header-height);
}

.header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header__logo img {
  height: 44px;
  width: auto;
}

.header__nav {
  flex: 1;
}

.header__nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header__nav-list a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-dark);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.header__nav-list a:hover,
.header__nav-list a.active {
  color: var(--color-primary);
  background: rgba(51, 102, 204, 0.06);
}

.header__phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.header__phone-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.7;
}

.header__phone-number {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.01em;
}

.header__phone-number:hover {
  color: var(--color-primary);
}

.header__burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 101;
  flex-shrink: 0;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  position: absolute;
  left: 10px;
}

.header__burger span:nth-child(1) {
  top: 13px;
}

.header__burger span:nth-child(2) {
  top: 21px;
}

.header__burger span:nth-child(3) {
  top: 29px;
}

.header__burger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 21px;
}

.header__burger.active span:nth-child(2) {
  opacity: 0;
}

.header__burger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 21px;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--header-height) + 40px) 24px 60px;
  max-width: var(--container-width);
  margin: 0 auto;
  gap: 60px;
}

.hero__content {
  flex: 1;
  max-width: 600px;
}

.hero__subtitle {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero__desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 40px;
}

.hero__stats {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__stat-label {
  font-size: 14px;
  color: var(--color-text);
  opacity: 0.8;
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-navy);
}

.hero__kbu-logo {
  margin-top: 4px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */

.section-divider {
  display: block;
  width: 100%;
  height: 40px;
  position: absolute;
  left: 0;
  right: 0;
}

.section-divider--top {
  top: -1px;
}

.section-divider--bottom {
  bottom: -1px;
  transform: rotate(180deg);
}

/* ============================================
   HISTORY
   ============================================ */

.history {
  position: relative;
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: var(--color-white);
}

.history__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  align-items: start;
}

.history__title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
}

.highlight {
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 8px;
  background: rgba(252, 86, 86, 0.4);
  border-radius: 4px;
  z-index: -1;
}

.history__intro {
  color: var(--color-text-light);
  font-size: 16px;
  line-height: 1.8;
}

.history__intro p + p {
  margin-top: 12px;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.values__item {
  padding: 4px 0;
}

.values__item h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.values__item p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.history__cta {
  text-align: center;
  margin-top: 48px;
}

/* ============================================
   DOCUMENTS
   ============================================ */

.documents {
  padding: var(--section-padding) 0;
  background: var(--color-white);
}

.documents__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.documents__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-navy);
  margin-bottom: 20px;
}

.documents__title .highlight::after {
  background: rgba(21, 118, 255, 0.15);
}

.documents__info p {
  font-size: 16px;
  line-height: 1.8;
  margin-top: 12px;
}

/* Tabs */

.tabs__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.tabs__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 12px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.tabs__btn:hover {
  background: var(--color-bg);
}

.tabs__btn.active {
  color: var(--color-primary);
  background: rgba(51, 102, 204, 0.06);
  border-left-color: var(--color-primary);
}

.tabs__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-bg);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.tabs__btn.active .tabs__num {
  background: var(--color-primary);
  color: var(--color-white);
}

.tabs__pane {
  display: none;
}

.tabs__pane.active {
  display: block;
}

.tabs__pane img {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-height: 500px;
  width: auto;
}

/* ============================================
   PROJECTS
   ============================================ */

.projects {
  position: relative;
  padding: var(--section-padding) 0;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: var(--color-white);
  text-align: center;
}

.projects__heading {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 20px;
}

.projects__subheading {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto;
}

/* Individual project */

.project {
  padding: 80px 0;
}

.project__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.project--reverse .project__layout {
  direction: rtl;
}

.project--reverse .project__text {
  direction: ltr;
}

.project--reverse .project__image {
  direction: ltr;
}

.project__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.project__desc {
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 32px;
}

.project__image img {
  border-radius: 20px;
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.project-divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
  padding: 80px 0 60px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact__item--center {
  text-align: center;
}

.contact__label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  opacity: 0.7;
}

.contact__value {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.7;
}

.contact__value a {
  transition: color 0.2s;
}

.contact__value a:hover {
  color: var(--color-primary);
}

.contact__divider {
  width: 1px;
  height: 60px;
  background: var(--color-border);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 32px 0;
  background: var(--color-bg);
  text-align: center;
}

.footer__copy {
  font-size: 14px;
  color: var(--color-text);
  opacity: 0.7;
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */

.mobile-nav-overlay {
  display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .header__nav {
    display: none;
  }

  .header__phone {
    display: none;
  }

  .header__burger {
    display: block;
  }

  /* Mobile nav */
  .header__nav.mobile-open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    z-index: 100;
    padding: 16px 24px;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

  .header__nav.mobile-open .header__nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .header__nav.mobile-open .header__nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .header__nav.mobile-open .header__nav-list li:last-child {
    border-bottom: none;
  }

  .header__nav.mobile-open .header__nav-list a {
    font-size: 17px;
    padding: 18px 16px;
    border-radius: 0;
  }

  /* Hero */
  .hero {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
    gap: 40px;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image img {
    max-width: 80%;
    margin: 0 auto;
  }

  /* History */
  .history__header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .values {
    grid-template-columns: 1fr 1fr;
  }

  /* Documents */
  .documents__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Projects */
  .project__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project--reverse .project__layout {
    direction: ltr;
  }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .contact__item {
    align-items: center;
  }

  .contact__item--center {
    text-align: center;
  }

  .contact__divider {
    width: 100%;
    height: 1px;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 60px;
    --header-height: 64px;
  }

  .header__logo img {
    height: 36px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 24px);
  }

  .hero__stats {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .hero__stat {
    align-items: center;
    text-align: center;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .values {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tabs__btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .tabs__pane img {
    max-height: 350px;
  }

  .project {
    padding: 48px 0;
  }

  .project__image img {
    border-radius: 12px;
  }
}

/* ============================================
   PROJECT DETAIL PAGE
   ============================================ */

.project-detail {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
}

.project-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 24px;
  transition: opacity 0.2s;
}

.project-detail__back:hover {
  opacity: 0.7;
}

.project-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

.project-detail__hero {
  margin-bottom: 48px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
}

.project-detail__hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 560px;
  object-fit: cover;
}

.project-detail__info {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}

.project-detail__description p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
}

.project-detail__specs {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 28px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  font-size: 14px;
  color: var(--color-text);
  opacity: 0.7;
  flex-shrink: 0;
}

.spec-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
  text-align: right;
}

.project-detail__gallery-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 24px;
}

.project-detail__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/2;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  padding: 12px;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 2;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

.lightbox__close {
  top: 16px;
  right: 24px;
  font-size: 48px;
}

.lightbox__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
}

.lightbox__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
}

@media (max-width: 1024px) {
  .project-detail__info {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .project-detail {
    padding-top: calc(var(--header-height) + 20px);
  }

  .project-detail__hero {
    border-radius: 12px;
    margin-bottom: 32px;
  }

  .project-detail__gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox__prev,
  .lightbox__next {
    font-size: 36px;
  }
}
