html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px; /* Щоб блоки не ховалися під закріплену шапку */
  overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #fefcf8;
  color: #1e1e2a;
  line-height: 1.5;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #ece8e0;
}

::-webkit-scrollbar-thumb {
  background: #9b7b5c;
  border-radius: 10px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

h1, h2, h3, .logo {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #2c2b28;
}

@media (min-width: 768px) {
  h1 {
    margin-bottom: 1.5rem;
  }
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: #6b6a6a;
  max-width: 700px;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #2c2b28;
  color: white;
  padding: 14px 28px;
  border-radius: 48px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  width: 100%; /* На мобільних кнопка на всю ширину */
}

@media (min-width: 480px) {
  .btn {
    width: auto; /* Повертаємо нормальну ширину на більших екранах */
  }
}

@media (min-width: 768px) {
  .btn {
    padding: 12px 28px;
    font-size: 1rem;
  }
}

.btn-outline {
  background: transparent;
  border: 1px solid #2c2b28;
  color: #2c2b28;
}

.btn-outline:hover {
  background: #2c2b28;
  color: white;
}

.btn:active {
  transform: scale(0.96);
}

header {
  padding: 16px 0;
  border-bottom: 1px solid #ece8e0;
  background-color: rgba(254,252,248,0.95);
  position: sticky;
  top: 0;
  z-index: 100;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
}

@media (min-width: 768px) {
  header {
    padding: 24px 0;
  }
}

.nav-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  color: #1e1e2a;
}

@media (min-width: 768px) {
  .logo {
    font-size: 1.8rem;
  }
}

.logo span {
  font-weight: 400;
  color: #9b7b5c;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .nav-links {
    gap: 2rem;
  }
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #2c2b28;
  transition: color 0.2s;
  font-size: 0.9rem;
  padding: 8px 0;
  display: inline-block;
}

@media (min-width: 768px) {
  .nav-links a {
    font-size: 1rem;
  }
}

.hero {
  padding: 40px 0 50px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .hero {
    padding: 70px 0 80px 0;
    flex-direction: row;
    gap: 48px;
  }
}

.hero-content {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-content {
    text-align: left;
  }
}

.hero-badge {
  background: #e9e2d8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #5e4b3c;
}

@media (min-width: 768px) {
  .hero-badge {
    margin-bottom: 1.2rem;
  }
}

.hero-badge i {
  font-size: 0.75rem;
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

@media (min-width: 768px) {
  .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 520px;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

@media (min-width: 480px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
    width: auto;
  }
}

@media (min-width: 768px) {
  .hero-buttons {
    justify-content: flex-start;
  }
}

.hero-image {
  flex: 1;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
  .hero-image {
    border-radius: 32px;
  }
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.about {
  padding: 50px 0;
  background-color: #f9f7f2;
  border-radius: 32px;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .about {
    padding: 70px 0;
    border-radius: 48px;
    margin: 30px 0;
  }
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .about-grid {
    flex-direction: row;
    gap: 48px;
    align-items: center;
  }
}

.about-text {
  flex: 1.2;
  text-align: center;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .about-text {
    text-align: left;
    padding: 0;
  }
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #2e2d2b;
}

@media (min-width: 768px) {
  .about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
  }
}

.about-sign {
  margin-top: 1.2rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #9b7b5c;
}

@media (min-width: 768px) {
  .about-sign {
    font-size: 1.2rem;
  }
}

.about-photo {
  flex: 0.8;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 25px -10px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
  .about-photo {
    border-radius: 28px;
  }
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.portfolio {
  padding: 50px 0 60px;
}

@media (min-width: 768px) {
  .portfolio {
    padding: 60px 0 80px;
  }
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 32px;
  }
}

.gallery-item {
  border-radius: 20px;
  overflow: hidden;
  background-color: #f0ede8;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px -6px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  .gallery-item {
    border-radius: 24px;
  }
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

@media (min-width: 768px) {
  .gallery-item img {
    height: 280px;
  }
}

.gallery-item:active img {
  transform: scale(1.02);
}

.gallery-caption {
  padding: 14px 16px;
  background: white;
}

@media (min-width: 768px) {
  .gallery-caption {
    padding: 16px 18px;
  }
}

.gallery-caption h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .gallery-caption h3 {
    font-size: 1.2rem;
  }
}

.gallery-caption p {
  color: #6b6a6a;
  font-size: 0.85rem;
}

.services {
  background: #ffffff;
  padding: 50px 0;
  border-top: 1px solid #ece8e0;
  border-bottom: 1px solid #ece8e0;
}

@media (min-width: 768px) {
  .services {
    padding: 70px 0;
  }
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 480px) {
  .services-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .services-grid {
    gap: 32px;
    margin-top: 40px;
  }
}

.service-card {
  flex: 1;
  min-width: auto;
  background: #fefcf8;
  padding: 28px 20px;
  border-radius: 28px;
  text-align: center;
  transition: all 0.25s;
  border: 1px solid #ece4da;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

@media (min-width: 480px) {
  .service-card {
    min-width: calc(50% - 10px);
  }
}

@media (min-width: 768px) {
  .service-card {
    min-width: 220px;
    padding: 32px 24px;
    border-radius: 32px;
  }
}

.service-card:active {
  transform: scale(0.98);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  color: #9b7b5c;
}

@media (min-width: 768px) {
  .service-icon {
    font-size: 2.5rem;
    margin-bottom: 18px;
  }
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
}

.service-card p {
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .service-card p {
    font-size: 0.95rem;
  }
}

.contact {
  padding: 50px 0;
}

@media (min-width: 768px) {
  .contact {
    padding: 70px 0;
  }
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: #f9f7f2;
  border-radius: 32px;
  padding: 32px 24px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .contact-wrapper {
    flex-direction: row;
    gap: 48px;
    border-radius: 48px;
    padding: 48px 40px;
  }
}

.contact-info {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .contact-info {
    text-align: left;
  }
}

.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
  }
}

.contact-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .contact-detail {
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
}

.contact-detail i {
  font-size: 1.2rem;
  width: 28px;
  color: #9b7b5c;
}

@media (min-width: 768px) {
  .contact-detail i {
    font-size: 1.4rem;
    width: 32px;
  }
}

.contact-detail span {
  font-size: 0.9rem;
  word-break: break-word;
}

@media (min-width: 768px) {
  .contact-detail span {
    font-size: 1rem;
  }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
}

@media (min-width: 768px) {
  .social-links {
    justify-content: flex-start;
    gap: 24px;
    margin-top: 32px;
  }
}

.social-links a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #4a4a47;
  transition: color 0.2s;
  padding: 8px;
}

@media (min-width: 768px) {
  .social-links a {
    flex-direction: row;
    gap: 8px;
    padding: 0;
  }
}

.social-links a i {
  font-size: 1.4rem;
}

@media (min-width: 768px) {
  .social-links a i {
    font-size: 1.3rem;
  }
}

.social-links a span {
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .social-links a span {
    font-size: 0.9rem;
  }
}

.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .contact-form {
    gap: 20px;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd6cc;
  border-radius: 32px;
  font-family: 'Inter', sans-serif;
  background: white;
  transition: 0.2s;
  font-size: 16px; /* 16px запобігає зуму на iOS Safari */
  -webkit-appearance: none;
}

@media (min-width: 768px) {
  .contact-form input,
  .contact-form textarea {
    padding: 14px 18px;
    font-size: 1rem;
  }
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #9b7b5c;
  box-shadow: 0 0 0 3px rgba(155,123,92,0.15);
}

.contact-form button {
  background: #2c2b28;
  border: none;
  width: 100%;
  padding: 14px 24px;
  border-radius: 48px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}

@media (min-width: 768px) {
  .contact-form button {
    width: fit-content;
    padding: 12px 32px;
    font-size: 1rem;
    min-height: auto;
  }
}

.contact-form button:active {
  transform: scale(0.97);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin-top: 12px;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 28px;
  display: none;
  text-align: center;
}

@media (min-width: 768px) {
  .form-status {
    font-size: 0.9rem;
  }
}

.form-status.success {
  background: #d4edda;
  color: #155724;
  display: block;
}

.form-status.error {
  background: #f8d7da;
  color: #721c24;
  display: block;
}

footer {
  background: #1e1e2a;
  color: #cfcfcf;
  padding: 40px 0 28px;
  text-align: center;
  margin-top: 20px;
}

@media (min-width: 768px) {
  footer {
    padding: 48px 0 32px;
    margin-top: 40px;
  }
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .footer-links {
    gap: 28px;
    margin-bottom: 24px;
  }
}

.footer-links a {
  color: #e0dbd1;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px;
}

@media (min-width: 768px) {
  .footer-links a {
    font-size: 0.9rem;
    padding: 0;
  }
}

footer p {
  opacity: 0.8;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  footer p {
    font-size: 0.9rem;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .about, .portfolio, .services, .contact {
  animation: fadeUp 0.5s ease-out;
}

.required-field {
  position: relative;
}

.required-field .required-star {
  color: #c62828;
  font-size: 0.8rem;
  margin-left: 4px;
}

.burger-menu {
  display: block;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #1e1e2a;
  cursor: pointer;
}

.close-menu, .mobile-socials, .mobile-only {
  display: none;
}

body.no-scroll {
  overflow: hidden; 
}

@media (min-width: 768px) {
  .burger-menu {
    display: none;
  }
  .nav-menu-wrapper {
    display: flex;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .nav-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #fefcf8;
    display: flex;
    flex-direction: column;
    padding: 80px 24px 40px;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1000;
  }

  .nav-menu-wrapper.active {
    right: 0;
  }

  .close-menu {
    display: block;
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #1e1e2a;
    cursor: pointer;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 24px 0;
    border-bottom: 1px solid #ece8e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
  }

  .mobile-only {
    display: block;
    font-size: 0.9rem;
    color: #9b7b5c;
  }

  .mobile-socials {
    display: flex;
    gap: 24px;
    margin-top: auto;
    padding-top: 30px;
  }

  .mobile-socials a {
    color: #1e1e2a;
    font-size: 1.6rem;
    text-decoration: none;
    transition: color 0.2s;
  }
}