/* styles.css */
:root {
    --dark-green: #0A3D2A;
    --light-green: #4ADE80;
    --beige: #F5F0E8;
    --gold: #D4AF77;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-green);
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: green;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark-green);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-green);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--light-green);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--dark-green);
    transition: 0.3s;
}

/* MOBILE MENU */
.mobile-menu {
    display: none;
    position: fixed;
    top: 40px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    z-index: 999;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    transition: all 0.35s ease-in-out;
}

.mobile-menu.active {
    display: flex;
}

/* Стили ссылок внутри мобильного меню */
.mobile-menu a {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--dark-green);
    text-decoration: none;
    padding: 0.2rem 0;
    border-bottom: 1px solid #eee;
    transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
    color: var(--light-green);
}

/* Гамбургер — добавим крестик при открытом меню */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--dark-green);
    border-radius: 2px;
    transition: all 0.35s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Показываем гамбургер на мобильных */
@media (max-width: 992px) {
    .nav {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}

/* HERO */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-subtitle {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2.5rem;
}

.btn-primary {
    display: inline-block;
    background: var(--light-green);
    color: var(--dark-green);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(74,222,128,0.3);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74,222,128,0.4);
}

/* SECTION */
.section {
    padding: 100px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-green);
}


.section,
.services-grid > *,
.portfolio-item,
.advantage,
.price-card {
    opacity: 0;
    transform: translateY(40px);   /* или 40px для более тонкого эффекта */
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.revealed {
    opacity: 1;
    transform: translateY(0);
}


/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s;
}

.service-card:hover {
    transform: translateY(-9px);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.45rem;
    margin-bottom: 1rem;
}

/* PORTFOLIO */
.bg-beige {
    background: var(--beige);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10,61,42,0.85));
    color: white;
    padding: 1.2rem;
    font-weight: 500;
}

/* ADVANTAGES */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.advantage {
    text-align: center;
    transition: transform 0.4s;
}

.advantage:hover {
    transform: translateY(-12px); 
}

.adv-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* PRICING */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.price-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem 2.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.07);
    position: relative;
    transition: all 0.4s ease;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 520px;     
    transition: all 0.4s;   
}

.price-card:hover {
    /* transform: scale(1.03); */
    transform: translateY(-9px);
    border: 3px solid var(--light-green);
    box-shadow: 0 25px 60px rgba(74, 222, 128, 0.18);
    z-index: 2;
}

.price-card.featured {
    border: 3px solid var(--light-green);
    transform: scale(1.05);
}

.price-card.featured {
    border: 3px solid var(--light-green);
    transform: scale(1.05);
    box-shadow: 0 25px 60px rgba(74, 222, 128, 0.18);
    z-index: 2;
}

.price-card > * {
    margin-bottom: 1.4rem;
}

/* Заголовок пакета */
.price-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    min-height: 2.4rem;
}

.price {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-green);
    margin: 1rem 0 2rem;
    min-height: 3.5rem;
}

.price-features {
    list-style: none;
    margin: 0 0 2.5rem 0;
    padding: 0;
    text-align: left;
    flex-grow: 1;
}

.price-features li {
    padding: 0.75rem 0;
    border-top: 1px solid #eee;
}

.price-card .btn-outline,
.price-card .btn-primary {
    margin-top: auto;
    width: 100%;
    padding: 1rem 2rem;
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: white;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

.price {
    font-size: 2.7rem;
    font-weight: 700;
    color: var(--dark-green);
    margin: 1rem 0;
}

.price-features {
    list-style: none;
    margin: 2rem 0;
}

.price-features li {
    padding: 0.7rem 0;
    border-top: 1px solid #eee;
    text-align: left;
}

/* REVIEWS */
.reviews-slider {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
}

.review-slide {
    display: none;
    text-align: center;
    padding: 2rem;
}

.review-slide.active {
    display: block;
}

.review-text {
    font-style: italic;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.stars {
    color: var(--gold);
    font-size: 1.6rem;
}

/* CONTACTS */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: 1.2rem;
}

.contact-info a,
.about-text a {
    color: var(--light-green);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover,
.about-text a:hover {
    text-decoration: underline;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* .contact-form button {
    margin-top: 0.5rem;
    padding: 1.1rem 2rem;
} */

/* ────────────────────────────────────────────────
   Мобильная версия — форма на всю ширину
───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .contacts-grid {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .contact-info {
        /* text-align: center; */
        font-size: 1.05rem;
    }

    .contact-form {
        width: 100%;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form button {
        font-size: 1.05rem;
        padding: 1.15rem 1.3rem;
    }
}

/* FOOTER */
.footer {
    background: var(--dark-green);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav { display: none; }
    .hamburger { display: flex; }
    /* .mobile-menu { display: flex; } */
    
    .hero-title { font-size: 2.8rem; }
    .section { padding: 70px 0; }
    .about-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-card, .portfolio-item, .advantage {
    animation: fadeInUp 0.8s backwards;
}


/* Стили для текста согласия */
.form-consent {
    margin-top: 1.2rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

.form-consent a.consent-link {
    color: var(--light-green);
    text-decoration: underline;
    transition: color 0.2s;
}

.form-consent a.consent-link:hover,
.form-consent a.consent-link:focus {
    color: var(--dark-green);
    text-decoration: none;
}

@media (max-width: 768px) {
    .form-consent {
        font-size: 0.82rem;
        padding: 0 1rem;
    }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 61, 42, 0.7); /* тёмно-зелёный полупрозрачный */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark-green);
}

.modal-icon {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.modal-success .modal-icon { color: var(--light-green); }
.modal-error   .modal-icon { color: #e74c3c; }

.modal-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.modal-content p {
    margin-bottom: 1.8rem;
    color: #555;
}

#modalBtn {
    min-width: 160px;
    display: none;
    margin-top: 15px;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .modal-content { padding: 2rem 1.5rem; }
}

/* Loader */
.loader {
  --dur: 2s;
  margin: auto;
  width: 10em;
  height: auto;
  display: none;
}
.loader__glare-top,
.loader__glare-bottom,
.loader__model,
.loader__motion-thick,
.loader__motion-medium,
.loader__motion-thin,
.loader__sand-drop,
.loader__sand-fill,
.loader__sand-grain-left,
.loader__sand-grain-right,
.loader__sand-line-left,
.loader__sand-line-right,
.loader__sand-mound-top,
.loader__sand-mound-bottom {
  animation-duration: var(--dur);
  animation-timing-function: cubic-bezier(0.83, 0, 0.17, 1);
  animation-iteration-count: infinite;
}
.loader__glare-top {
  animation-name: glare-top;
}
.loader__glare-bottom {
  animation-name: glare-bottom;
}
.loader__model {
  animation-name: loader-flip;
  transform-origin: 12.25px 16.75px;
}
.loader__motion-thick,
.loader__motion-medium,
.loader__motion-thin {
  transform-origin: 26px 26px;
}
.loader__motion-thick {
  animation-name: motion-thick;
}
.loader__motion-medium {
  animation-name: motion-medium;
}
.loader__motion-thin {
  animation-name: motion-thin;
}
.loader__sand-drop {
  animation-name: sand-drop;
}
.loader__sand-fill {
  animation-name: sand-fill;
}
.loader__sand-grain-left {
  animation-name: sand-grain-left;
}
.loader__sand-grain-right {
  animation-name: sand-grain-right;
}
.loader__sand-line-left {
  animation-name: sand-line-left;
}
.loader__sand-line-right {
  animation-name: sand-line-right;
}
.loader__sand-mound-top {
  animation-name: sand-mound-top;
}
.loader__sand-mound-bottom {
  animation-name: sand-mound-bottom;
  transform-origin: 12.25px 31.5px;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(var(--hue), 90%, 10%);
    --fg: hsl(var(--hue), 90%, 90%);
  }
}
/* Animation */
@keyframes loader-flip {
  from {
    transform: translate(13.75px, 9.25px) rotate(-180deg);
  }
  24%,
  to {
    transform: translate(13.75px, 9.25px) rotate(0);
  }
}
@keyframes glare-top {
  from {
    stroke: rgba(255, 255, 255, 0);
  }
  24%,
  to {
    stroke: white;
  }
}
@keyframes glare-bottom {
  from {
    stroke: white;
  }
  24%,
  to {
    stroke: rgba(255, 255, 255, 0);
  }
}
@keyframes motion-thick {
  from {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(0.67turn);
  }
  20% {
    animation-timing-function: cubic-bezier(0.33, 1, 0.67, 1);
    stroke: rgb(32, 32, 32);
    stroke-dashoffset: 141.11;
    transform: rotate(1turn);
  }
  40%,
  to {
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(1.33turn);
  }
}
@keyframes motion-medium {
  from,
  8% {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(0.5turn);
  }
  20% {
    animation-timing-function: cubic-bezier(0.33, 1, 0.67, 1);
    stroke: white;
    stroke-dashoffset: 147.53;
    transform: rotate(0.83turn);
  }
  32%,
  to {
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(1.17turn);
  }
}
@keyframes motion-thin {
  from,
  4% {
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(0.33turn);
  }
  24% {
    animation-timing-function: cubic-bezier(0.33, 1, 0.67, 1);
    stroke: rgb(53, 53, 53);
    stroke-dashoffset: 134.7;
    transform: rotate(0.67turn);
  }
  44%,
  to {
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: 153.94;
    transform: rotate(1turn);
  }
}
@keyframes sand-drop {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 1;
  }
  70%,
  to {
    stroke-dashoffset: -107;
  }
}
@keyframes sand-fill {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 55;
  }
  70%,
  to {
    stroke-dashoffset: -54;
  }
}
@keyframes sand-grain-left {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 29;
  }
  70%,
  to {
    stroke-dashoffset: -22;
  }
}
@keyframes sand-grain-right {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 27;
  }
  70%,
  to {
    stroke-dashoffset: -24;
  }
}
@keyframes sand-line-left {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 53;
  }
  70%,
  to {
    stroke-dashoffset: -55;
  }
}
@keyframes sand-line-right {
  from,
  10% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    stroke-dashoffset: 14;
  }
  70%,
  to {
    stroke-dashoffset: -24.5;
  }
}
@keyframes sand-mound-top {
  from,
  10% {
    animation-timing-function: linear;
    transform: translate(0, 0);
  }
  15% {
    animation-timing-function: cubic-bezier(0.12, 0, 0.39, 0);
    transform: translate(0, 1.5px);
  }
  51%,
  to {
    transform: translate(0, 13px);
  }
}
@keyframes sand-mound-bottom {
  from,
  31% {
    animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1);
    transform: scale(1, 0);
  }
  56%,
  to {
    transform: scale(1, 1);
  }
}