/*
 * Theme styles for the Luxury Interiors site
 *
 * The layout was crafted to mirror the structure of an upscale interior design studio,
 * with a minimalist aesthetic and warm accents. Responsiveness is achieved via
 * CSS Grid, Flexbox and media queries. To maximize Lighthouse scores, no
 * external font files are loaded; instead, system fonts are used throughout.
 */

/* CSS reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* Use a deep charcoal for primary text to improve contrast */
    color: var(--secondary);
    line-height: 1.6;
    /* Off‑white background gives a luxe, warm feel */
    background-color: var(--light);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    /* Use a classic serif for headings to evoke sophistication */
    font-family: 'Georgia', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--secondary);
}

/* Variables for easy colour management */
:root {
    /* Colour palette inspired by the Dkor Interiors reference site.  
       Shades of green and warm neutrals convey a feeling of luxury and calm. */
    --primary: #5b7754;    /* deep muted green for buttons and highlights */
    --secondary: #333333;  /* dark grey for primary text */
    --light: #f9f8f6;      /* off‑white background for pages */
    --accent: #7b9470;     /* lighter green used on hover states */
    --muted: #f2f0ed;      /* very light grey for section backgrounds */
    --border: #dcd8cf;     /* soft beige for subtle borders */
}

/* Utility classes */
.container {
    width: min(90%, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--light);
}
.primary-btn:hover,
.primary-btn:focus {
    background-color: var(--accent);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary);
}
.secondary-btn:hover,
.secondary-btn:focus {
    background-color: var(--primary);
    color: var(--light);
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

nav {
    display: flex;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: auto;
}

.nav-list li a {
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--secondary);
    transition: color 0.3s;
}
.nav-list li a:hover,
.nav-list li a:focus {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--light);
    text-align: center;
    padding: 2rem 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Slightly lighter overlay for improved legibility without darkening images excessively */
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
}

.hero .buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #555;
    font-size: 1rem;
}

/* Services Section */
.services {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.service-card {
    background-color: var(--light);
    padding: 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.service-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary);
}
.service-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--secondary);
}
.service-card p {
    font-size: 0.95rem;
    color: #555;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background-color: var(--muted);
}
.project-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: var(--light);
    padding: 1rem;
    transition: transform 0.3s;
    transform: translateY(100%);
}
.project-card:hover .project-info {
    transform: translateY(0);
}
.project-info h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}
.project-info p {
    font-size: 0.9rem;
}

/* About Section */
.about {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-content img {
    flex: 1 1 45%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.about-text {
    flex: 1 1 45%;
}
.about-text h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--secondary);
}
.about-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #555;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--light);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background-color: var(--muted);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.testimonial-card .quote {
    font-style: italic;
    margin-bottom: 1rem;
    color: #444;
}
.testimonial-card .author {
    font-weight: 600;
    color: var(--secondary);
}

/* Contact Section */
.contact {
    background-color: var(--muted);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}
.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--secondary);
    background-color: var(--light);
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact form button {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: #222;
    color: #ddd;
    padding: 2rem 0 1rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}
.footer-about,
.footer-contact,
.footer-social {
    flex: 1 1 250px;
}
.footer-about h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}
.footer-about p {
    color: #bbb;
    font-size: 0.9rem;
}
.footer-contact h4,
.footer-social h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #fff;
}
.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.footer-contact a {
    color: #bbb;
}

.social-links {
    display: flex;
    gap: 0.5rem;
}
.social-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    transition: background-color 0.3s;
}
.social-icon:hover {
    background-color: rgba(255,255,255,0.2);
}
.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #777;
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-list {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--light);
        flex-direction: column;
        width: 200px;
        border: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }
    nav.open .nav-list {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .menu-toggle {
        display: flex;
    }
    nav {
        position: relative;
    }
    .nav-list li {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-list li a {
        width: 100%;
        display: block;
    }
}

@media (max-width: 600px) {
    .about-content {
        flex-direction: column;
    }
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-contact,
    .footer-social {
        margin-top: 1rem;
    }
}
/* ====== Блок "Обо мне" (2 колонки) ====== */
.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem; /* расстояние между колонками */
  flex-wrap: wrap; /* для адаптива */
}

/* Левая колонка — текст */
.about-text {
  flex: 1 1 50%;
  min-width: 320px;
}

/* Правая колонка — изображение */
.about-content img {
  flex: 1 1 45%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Заголовок и абзацы внутри текста */
.about-text h3 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--secondary);
}

.about-text p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ====== Адаптив ====== */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    order: 2;
    width: 100%;
  }

  .about-content img {
    order: 1;
    width: 100%;
    margin-bottom: 2rem;
  }
}
/* ====== ABOUT: двухколоночная сетка ====== */
/* Важно: если у тебя уже есть .about-content — удали/закомментируй его старые правила,
   чтобы не конфликтовали (мы используем .about-grid). */

.about-grid {
  /* Двухколоночная сетка на десктопе */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;                 /* расстояние между колонками */
  align-items: center;         /* вертикальное выравнивание */
}

/* Левая колонка — текст */
.about-text h3 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: var(--secondary);
}

.about-text p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Правая колонка — изображение */
.about-media img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;         /* мягкие углы */
  box-shadow: 0 12px 28px rgba(0,0,0,0.10); /* деликатная тень */
  object-fit: cover;
}

/* ====== Адаптив ====== */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr; /* одна колонка */
    text-align: left;           /* можно center, если хочешь */
  }
  .about-media {
    order: -1;                  /* фото сверху на планшетах/мобилках */
    margin-bottom: 1rem;
  }
}

/* Мелкие улучшения типографики блока */
.section-intro {
  max-width: 72ch;              /* комфортная ширина строки */
}
/* ====== Блок "Кто за проектом" — уменьшить фото ====== */
.portfolio-grid .project-card img {
  width: 60%;              /* делаем меньше ширину */
  max-width: 400px;        /* ограничиваем максимум */
  margin: 0 auto;          /* центрируем */
  display: block;
  border-radius: 10px;
}

/* Для выравнивания всей карточки по центру */
.portfolio-grid .project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

/* На мобильных вернуть на всю ширину */
@media (max-width: 768px) {
  .portfolio-grid .project-card img {
    width: 100%;
    max-width: none;
  }
}
/* ===== HERO: белый текст поверх фонового изображения ===== */
.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero a,
.hero .btn {
  color: #fff !important;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4); /* улучшает читаемость на фоне */
}

.hero .primary-btn {
  background-color: var(--primary);
  color: #fff !important;
}
.hero .primary-btn:hover {
  background-color: var(--accent);
}
/* ===============================
   CONTACT PAGE MOBILE ADAPTATION
   =============================== */

/* базовая структура: контакт + форма */
.contact .about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* колонки — рядом на десктопе */
.contact .about-content > div {
  flex: 1 1 48%;
}

/* адаптив под мобильные устройства */
@media (max-width: 768px) {
  .contact .about-content {
    flex-direction: column;
    gap: 2.5rem;
  }

  .contact .about-content > div {
    flex: 1 1 100%;
    padding: 0;
  }

  /* форма */
  .contact-form input,
  .contact-form textarea {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
  }

  .contact-form label {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .contact-form .btn {
    width: 100%;
    font-size: 1.05rem;
    padding: 1rem;
  }

  /* контакты */
  .contact .about-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
  }

  .contact .about-content p {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* секция CTA (внизу) */
  .cta-section {
    padding: 2.5rem 1.2rem !important;
  }

  .cta-section h3 {
    font-size: 1.3rem !important;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .cta-section .btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* для очень маленьких экранов */
@media (max-width: 480px) {
  .contact-form input,
  .contact-form textarea {
    font-size: 0.95rem;
  }

  .contact .about-content h3 {
    font-size: 1.15rem;
  }

  .cta-section h3 {
    font-size: 1.2rem !important;
  }
}
/* ---- CONTACT: строгие мобильные оверрайды (поверх всего) ---- */

/* 1) Базовый стек для контактов на мобильном: одна колонка */
@media (max-width: 768px) {
  /* если в разметке есть .contact + .about-content — складываем в столбик */
  .contact .about-content {
    display: block !important;          /* перебиваем предыдущие flex/grid */
  }
  .contact .about-content > * {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1.25rem 0 !important;
  }

  /* 2) Сама форма: поля и кнопки на всю ширину, удобные тап-зоны */
  .contact .contact-form,
  .contact-form {
    display: block !important;
    max-width: 100% !important;
  }
  .contact-form .form-group,
  .contact form .form-group {
    width: 100% !important;
  }
  .contact-form input,
  .contact-form textarea {
    width: 100% !important;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
  }
  .contact-form .btn,
  .contact form button {
    width: 100% !important;
    font-size: 1.05rem;
    padding: 1rem;
    margin-top: .5rem;
  }

  /* 3) Тексты и заголовки блока контактов */
  .contact .about-content h3 { 
    font-size: 1.25rem !important; 
    margin-bottom: .8rem; 
  }
  .contact .about-content p { 
    font-size: 1rem !important; 
    line-height: 1.5; 
  }
}

/* 4) Очень маленькие экраны */
@media (max-width: 480px) {
  .contact-form input,
  .contact-form textarea { font-size: 0.95rem !important; }
  .contact .about-content h3 { font-size: 1.15rem !important; }
}
