@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

:root {
  /* Premium elegant theme - now handled by Pug */
  /* --primary: #c5a880; */
  /* --primary-hover: #b3956b; */
  /* --bg-soft: #faf9f8; */

  --text-dark: #2c2c2c;
  --text-light: #555555;
  --bg-light: #ffffff;
  --border: #e6e0d8;
  --radius: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 24px rgba(44, 44, 44, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text-light);
  background-color: var(--bg-light);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 400;
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 50px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--primary);
  margin: 20px auto 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  padding: 120px 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.3), var(--bg-soft)),
    url("../img/header-bg.png") center/cover no-repeat;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.02);
}

.header::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    var(--bg-soft) 100%
  );
  opacity: 0.7;
  pointer-events: none;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}

.header__intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  animation: headerScaleUp 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes headerScaleUp {
  from {
    transform: scale(1.05);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.header__logo {
  max-width: 600px;
  height: auto;
  margin-bottom: 20px;
  animation: fadeInDown 0.8s ease-out;
}

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 45px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(197, 168, 128, 0.3);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--text-dark);
}

.btn--secondary:hover {
  background-color: var(--text-dark);
  color: #fff;
}

.header__contacts {
  display: flex;
  gap: 40px;
  margin: 20px 0;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.contact-block {
  display: flex;
  align-items: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.contact-link:hover {
  color: var(--primary);
}

.contact-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform var(--transition);
}

.contact-link:hover .contact-icon {
  transform: scale(1.1);
}

/* ==========================================================================
   Price List (Tabs)
   ========================================================================== */
.price-list {
  background-color: var(--bg-light);
}

.tabs__header {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  letter-spacing: 1px;
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--text-dark);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
  display: block;
}

/* Sub-tabs inside Price List */
.sub-tabs__header {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.sub-tab-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 10px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.sub-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sub-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.sub-tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.sub-tab-panel.active {
  display: block;
}

/* Price Table layout */
.price-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 40px;
  border-collapse: collapse;
}

.price-table td {
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
  transition: var(--transition);
}

.price-table tr:hover td {
  background-color: var(--bg-soft);
  padding-left: 10px;
  padding-right: 10px;
}

.price-table td:first-child {
  padding-right: 20px;
}

.price-val {
  text-align: right;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.subsection-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 50px 0 25px;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 25px;
  font-style: italic;
}

/* ==========================================================================
   Education (Accordion)
   ========================================================================== */
.education {
  background-color: var(--bg-soft);
}

.education__action {
  text-align: center;
  margin-top: 40px;
}

.accordion {
  max-width: 850px;
  margin: 0 auto 60px;
}

.accordion-item {
  background: var(--bg-light);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.accordion-item:hover {
  box-shadow: var(--shadow-hover);
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 25px 30px;
  text-align: left;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.4s ease;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(-135deg);
  margin-top: 5px;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.accordion-content p,
.accordion-content ul {
  padding: 0 30px 20px;
}

.accordion-content p:first-child {
  padding-top: 10px;
}

.accordion-content ul {
  padding-left: 50px;
  list-style-type: disc;
  list-style-position: inside;
}

.accordion-content li {
  margin-bottom: 10px;
  color: var(--text-light);
}

/* ==========================================================================
   Portfolio Slider
   ========================================================================== */
.portfolio {
  background-color: var(--bg-light);
}

.slider {
  position: relative;
  width: 100%;
}

.slider__container {
  position: relative;
  width: 100%;
}

.slider__wrapper {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--border);
}

.slider__wrapper::-webkit-scrollbar {
  height: 6px;
}

.slider__wrapper::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 10px;
}

.slider__wrapper::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}

.slider__item {
  flex: 0 0 calc(33.333% - 14px);
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

.slider__item img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.slider__item:hover {
  transform: translateY(-5px);
}

.slider__item:hover img {
  transform: scale(1.05);
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.slider__btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-hover);
}

.slider__btn::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  display: block;
}

.slider__btn--prev {
  left: -25px;
}

.slider__btn--prev::after {
  transform: rotate(135deg);
  margin-left: 4px;
}

.slider__btn--next {
  right: -25px;
}

.slider__btn--next::after {
  transform: rotate(-45deg);
  margin-right: 4px;
}

@media (max-width: 1250px) {
  .slider__btn--prev {
    left: 10px;
  }
  .slider__btn--next {
    right: 10px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #1a1a1a;
  color: #fff;
  padding: 80px 0;
}

.footer__container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer__contacts {
  flex: 1;
  max-width: 400px;
}

.footer__title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 30px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__name {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 25px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.footer__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 3px;
  filter: brightness(0) invert(1);
}

.footer__contact-text {
  display: flex;
  flex-direction: column;
}

.footer__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer__contact-text a,
.footer__contact-text span,
.separator {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}

.footer__contact-text a:hover {
  color: var(--primary);
}

.footer__fio {
  margin-top: 40px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.footer__map-wrapper {
  flex: 1;
  width: 100%;
  max-width: 600px;
}

.footer__map {
  width: 100%;
  height: 400px;
  background: #2a2a2a;
  border-radius: var(--radius);
  overflow: hidden;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .slider__item {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .header__contacts {
    flex-direction: column;
    gap: 15px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section {
    padding: 50px 0;
  }

  .price-table td {
    font-size: 14px;
  }

  .price-table tr:hover td {
    background-color: transparent;
    padding-left: 0;
    padding-right: 0;
  }

  .accordion-header {
    font-size: 16px;
    padding: 20px;
  }

  .footer__container {
    flex-direction: column-reverse; /* Map forms the top on mobile */
    align-items: center;
  }

  .footer__contacts,
  .footer__map-wrapper {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .slider__item {
    flex: 0 0 100%;
  }
}
