/* =========================
BASE
========================= */
html, body {
  overflow-x: hidden;
  font-family: 'Josefin Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
HERO IMAGE SLIDER
========================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

/* =========================
   CARDS
========================= */
.card-inner {
  transition: transform 0.6s ease;
}

.card-inner:hover {
  transform: scale(1.05);
}

.card-front img {
  transition: filter 0.4s ease, transform 0.4s ease;
}

.service-card:hover .card-front img {
  filter: grayscale(100%);
}

/* =========================
   OVERLAY
========================= */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.5rem;
  pointer-events: none;
}

.service-card:hover .overlay {
  opacity: 1;
  pointer-events: auto;
}

.overlay a {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: underline;
  background-color: rgba(0,0,0,0.4);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}

/* =========================
PORTFOLIO
========================= */
.portfolio-item {
  transition: all 0.3s ease-in-out;
}

.portfolio-item:hover {
  grid-column: span 3;
  grid-row: span 2;
  z-index: 10;
}

.portfolio-rotator {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
}

.portfolio-rotator img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.portfolio-rotator img.active {
  opacity: 1;
}

/* Карточки в portfolio.html (Photo/Retouch/Video) */
.portfolio-card-image {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

.portfolio-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Мягкий градиент снизу вместо сплошной серой заливки —
   держит подпись читаемой, но не "гасит" само фото */
.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0) 70%);
  transition: opacity 0.3s ease;
}

.group:hover .portfolio-card-overlay {
  opacity: 1.15;
}

/* =========================
   CUSTOM BUTTONS
========================= */
.btn-nordic {
  background-color: #1e293b;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-nordic:hover {
  background-color: #94a3b8;
  transform: translateY(-2px);
  color: #ffffff;
}

/* =========================
   WHAT YOU CAN EXPECT SECTION
========================= */

.expect-section {
  background-color: #ffffff;
  padding: 4rem 0;
}

.expect-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.expect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.expect-item {
  display: flex;
  align-items: flex-start;
  text-align: left;
}

.expect-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  margin-right: 1rem;
  flex-shrink: 0;
  color: #374151;
}

.expect-icon svg {
  width: 32px !important;
  height: 32px !important;
  display: block;
}

.expect-item span {
  font-size: 1.125rem;
  color: #1f2937;
  line-height: 1.4;
  padding-top: 2px;
}

@media (min-width: 768px) {
  .expect-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .expect-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nav-link {
  font-size: 1.125rem;
  color: #1f2937;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: #2563eb;
}

.nav-link-mobile {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

@media (max-width: 768px) {
  header img {
    width: 35px;
    height: 35px;
  }
}

/* =========================
   PORTFOLIO TOGGLE (3 POSITIONS)
========================= */
.portfolio-toggle {
  position: relative;
  background-color: #e5e7eb;
  padding: 4px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  width: 380px;
  height: 48px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.toggle-selection-bg {
  position: absolute;
  height: 40px;
  width: 120px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  z-index: 1;
}

.toggle-btn {
  position: relative;
  z-index: 10;
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.3s ease;
  user-select: none;
}

html {
  scrollbar-gutter: stable;
}

/* =========================
   MODAL FIX
========================= */
#modal {
    display: none;
    z-index: 9999 !important;
    position: fixed;
    inset: 0;
}

#modal:not(.hidden) {
    display: flex !important;
}

#closeBtn, #prevBtn, #nextBtn {
    z-index: 10001 !important;
    cursor: pointer;
}

#modalImg {
    z-index: 10000 !important;
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

/* =========================
   COLLAPSIBLE PACKAGE CARDS
   (Services and Add-ons — same accordion behaviour as FAQ:
   each <details> opens/closes independently, no JS needed)
========================= */
.package-card summary {
  list-style: none;
  cursor: pointer;
}

.package-card summary::-webkit-details-marker {
  display: none;
}

.package-card .toggle-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.package-card[open] .toggle-arrow {
  transform: rotate(180deg);
}

.package-card summary h4 {
  transition: color 0.2s ease;
}

.package-card:hover summary h4 {
  color: #2c3e50;
}

/* =========================
   CLIENT REVIEWS CAROUSEL
   ("What Clients Say" section on the homepage)
========================= */
.reviews-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reviews-viewport {
  flex: 1;
  overflow: hidden;
}

.reviews-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.reviews-page {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* было по умолчанию stretch — из-за этого карточки "подрастали" вместе */
}

.review-card {
  box-sizing: border-box;
  padding: 0 0.75rem;
}

.review-card-inner {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 2rem 1.75rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.review-quote-mark {
  font-size: 2.75rem;
  line-height: 1;
  color: #cbd5e1;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: Georgia, 'Times New Roman', serif;
}

.review-card-text {
  font-style: italic;
  color: #374151;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-card-text.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.review-toggle {
  display: none;
  align-self: flex-start;
  margin-top: 0.6rem;
  background-color: #f1f5f9;
  border: none;
  border-radius: 9999px;
  width: 34px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.review-toggle.visible {
  display: inline-flex;
}

.review-toggle:hover {
  background-color: #e2e8f0;
  color: #1e293b;
}

.review-toggle.expanded {
  transform: rotate(90deg);
}

.review-card-name {
  margin-top: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: #1e293b;
}

.reviews-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.reviews-arrow:hover {
  background-color: #1e293b;
  color: #ffffff;
  transform: translateY(-1px);
}

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.reviews-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #cbd5e1;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.reviews-dot.active {
  background-color: #1e293b;
  transform: scale(1.25);
}

/