/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-accent: #1a1a1a;
  --color-border: #eeeeee;
  --color-btn-bg: #1a1a1a;
  --color-btn-text: #ffffff;
  --color-btn-hover: #333;
  --font: 'Montserrat', sans-serif;
  --max-w: 1100px;
  --section-pad: 90px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Container ─── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Button ─── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-align: center;
}

.btn:hover {
  background: var(--color-btn-hover);
  transform: translateY(-1px);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.hero__image {
  position: relative;
  background: #f5f3f0;
  min-height: 500px;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: blur(12px);
  transition: filter 0.5s ease;
  transform: scale(1.04); /* prevents blur bleeding at the edges */
}

.hero__image img.is-loaded {
  filter: none;
  transform: scale(1);
  transition: filter 0.5s ease, transform 0.5s ease;
}

/* Fallback placeholder when image fails */
.hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f0ede8 0%, #e8e0d5 100%);
  z-index: -1;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 80px;
}

.hero__name {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

/* ─── ABOUT ─── */
.about {
  padding: var(--section-pad) 0;
  background: #fff;
}

.about__text {
  max-width: 70%;
  margin: 0 auto;
  text-align: center;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
}

/* ─── ACCORDION ─── */
.accordion-section {
  padding: 45px 0;
  background: #fff;
}

.accordion-list {
  max-width: 66%;
  margin: 0 auto;
  list-style: none;
}

.accordion-item {
  border-top: 1px solid var(--color-border);
}

.accordion-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: color 0.2s;
}

.accordion-trigger:hover {
  color: #444;
}

.accordion-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.3s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  background: var(--color-btn-bg);
  transform: rotate(45deg);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon svg path {
  stroke: #fff;
}

.accordion-icon svg {
  width: 14px;
  height: 14px;
}

.accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.accordion-body.is-open {
  max-height: 2000px;
}

.accordion-body__inner {
  padding-bottom: 24px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-muted);
}

.accordion-body__inner p {
  margin: 0 0 12px;
}

.accordion-body__inner ul {
  margin: 12px 0 16px;
  padding-left: 22px;
  list-style: disc outside;
}

.accordion-body__inner li {
  margin-bottom: 8px;
}

.accordion-body__inner li:last-child {
  margin-bottom: 0;
}

/* ─── CAROUSEL ─── */
.carousel-section {
  padding: 0;
  background: #fff;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.carousel__track-wrap {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
}

.carousel__slide img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  background: #f8f7f5;
  display: block;
  cursor: zoom-in;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  background: #e8e8e8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel__btn:hover {
  background: #d0d0d0;
}

.carousel__btn--prev {
  left: 0;
}

.carousel__btn--next {
  right: 0;
}

.carousel__btn svg {
  width: 10px;
  height: 18px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 30px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7c7c7;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel__dot.is-active {
  background: #1a1a1a;
  transform: scale(1.2);
}

/* ─── CERTIFICATE MODAL / ZOOM ─── */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.86);
}

.cert-modal.is-open {
  display: flex;
}

.cert-modal__img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s ease, opacity 0.18s ease;
}

.cert-modal__img.is-fading {
  opacity: 0;
}

.cert-modal__img.is-zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

.cert-modal__close,
.cert-modal__zoom {
  position: absolute;
  top: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-modal__close {
  right: 18px;
  font-size: 28px;
  line-height: 1;
}

.cert-modal__zoom {
  left: 18px;
}

.cert-modal__zoom svg {
  width: 18px;
  height: 18px;
}

.cert-modal__zoom .icon-zoom-out { display: none; }
.cert-modal__zoom.is-zoomed .icon-zoom-in  { display: none; }
.cert-modal__zoom.is-zoomed .icon-zoom-out { display: block; }

.cert-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cert-modal__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cert-modal__nav--prev { left: 18px; }
.cert-modal__nav--next { right: 18px; }

.cert-modal__nav svg {
  width: 9px;
  height: 17px;
}

.cert-modal__counter {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #1a1a1a;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.75);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}


/* ─── CTA BLOCK ─── */
.cta-block {
  padding: var(--section-pad) 0;
  background: #fff;
  text-align: center;
}

/* ─── CONTACTS ─── */
.contacts {
  padding: 150px 0;
  background: #fff;
}

.contacts__inner {
  max-width: 66%;
  margin: 0 auto;
  text-align: center;
}

.contacts__heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.contacts__text {
  font-size: 18px;
  line-height: 2;
  color: var(--color-text);
}

.contacts__text strong {
  font-weight: 600;
}

.contacts__social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.contacts__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: opacity 0.2s;
}

.contacts__social a:hover {
  opacity: 0.7;
}

.contacts__social svg {
  width: 48px;
  height: 48px;
}

/* ─── FOOTER ─── */
.footer {
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: #bbb;
  border-top: 1px solid var(--color-border);
}

/* ─── Fade-in animation ─── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .hero__image {
    height: 60vw;
    max-height: 500px;
    min-height: 280px;
  }

  .hero__content {
    padding: 48px 32px;
  }

  .about__text {
    max-width: 90%;
    font-size: 18px;
  }

  .accordion-list {
    max-width: 90%;
  }

  .contacts__inner {
    max-width: 90%;
  }

  .container {
    padding: 0 24px;
  }
}

@media (max-width: 600px) {
  :root {
    --section-pad: 60px;
  }

  .hero__content {
    padding: 40px 24px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .about__text {
    font-size: 16px;
  }

  .accordion-trigger {
    font-size: 16px;
  }

  .contacts__text {
    font-size: 16px;
  }

  .contacts {
    padding: 80px 0;
  }

  .carousel__slide {
    flex: 0 0 200px;
    height: 420px;
  }

  .cert-modal {
    padding: 12px;
  }

  .cert-modal__img.is-zoomed {
    transform: scale(1.5);
  }

}