:root {
    --milky-white: #FAF9F6;
    --glass-bg: rgba(250, 249, 246, 0.4);
    --teal: #008080;
    --teal-light: rgba(0, 128, 128, 0.1);
    --text-dark: #1A2525;
    --text-light: #4A5D5D;
    view-transition-name: none;
}

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

.hidden {
    display: none !important;
}

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

/* Animated SVG Background */
.bg-animation {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--milky-white);
}

.bg-animation svg {
    width: 200%;
    height: 100%;
}

.bg-animation .waves path {
    fill: none;
    stroke: var(--teal);
    stroke-width: 1rem;
    vector-effect: non-scaling-stroke;
    opacity: 0.4;
    animation: drift 25s linear infinite alternate;
}

/* .bg-animation .erzgamma {
    position: absolute;
    top: 0px;
    left: 0px;
}

.bg-animation .erzgamma .star-group {
    transform-origin: 50px 50px;
    transform-box: view-box;
    animation: spin-erzgamma 40s linear infinite; 
}

.bg-animation .erzgamma path {
    fill: none;
    stroke: var(--teal);
    stroke-width: 10px;
    vector-effect: non-scaling-stroke;
    opacity: 0.4;
} */

@keyframes spin-erzgamma {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.bg-animation path:nth-child(2) { animation-direction: alternate-reverse; }
.bg-animation path:nth-child(4) { animation-direction: alternate-reverse; }

@keyframes drift {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-25%) translateY(20%); }
}

/* Reusable Glass Block */
.glass-block {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 128, 128, 0.25);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

h1, h2, h3 {
    color: var(--teal);
    margin-bottom: 1rem;
    font-weight: 500;
}

h1 { font-size: 3.5rem; line-height: 1.1; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; }
p { font-size: 1.1rem; color: var(--text-light); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--teal);
    color: var(--milky-white);
    text-decoration: none;
    border: 1px solid var(--teal);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    font-family: 'Lora', serif;
}

.btn:hover {
    background-color: transparent;
    color: var(--teal);
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateY(3px);
}

/* Section Layouts */
.screen-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 10%;
}

/* Section 1: Introduction */
.hero-content {
    max-width: 800px;
    text-align: center;
}

/* Section 2: Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.service-card {
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--teal);
    background: rgba(250, 249, 246, 0.85);
}

.service-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.service-card-content {
    padding-top: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 5rem;
    flex-grow: 1;
}

/* Section 3: Reviews */
.reviews-container {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.review-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.quote-icon {
    font-size: 4rem;
    color: var(--teal);
    line-height: 0;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.reviewer-name {
    margin-top: 2rem;
    font-style: italic;
    color: var(--teal);
    font-weight: 600;
}

/* Section 4: Footer */
footer {
    background-color: var(--teal);
    color: var(--milky-white);
    padding: 4rem 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

footer h3 {
    color: var(--milky-white);
}

.contact-info {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(0px);
    transition: backdrop-filter 1s ease-out, opacity 1s ease-out;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    view-transition-name: payment-modal;
}

.modal-content:not(:has(#modal-payment.hidden)) {
    max-width: 500px;
}

::view-transition-group(payment-modal) {
    animation-duration: 0.4s;
    animation-timing-function: ease;
}

.modal-content .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--teal);
    cursor: pointer;
    line-height: 1;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

#modal-description,
#modal-payment {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-height: 0;
}

#modal-description {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.modal-description-section {
    overflow-y: auto;
    padding-right: 0.5rem;
    flex: 1;
    min-height: 0;
}

/* Стили для секции отзывов в модальном окне */

.modal-reviews-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: left;
    color: var(--teal);
    border-bottom: 1px solid var(--teal-light);
}

/* Делаем список отзывов скроллируемым */
.modal-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex: 1;
    min-height: 0;
}

.modal-reviews-list::-webkit-scrollbar {
    width: 4px;
}

.modal-reviews-list::-webkit-scrollbar-thumb {
    background-color: var(--teal);
    border-radius: 4px;
}

/* Стили компактной карточки */
.mini-review-card {
    padding: 1.25rem;
    border-radius: 8px !important;
    background: rgba(250, 249, 246, 0.6);
}

.modal-split {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    gap: 2rem;
    overflow: hidden;
}

.mini-quote-icon {
    font-size: 2rem;
    color: var(--teal);
    line-height: 0;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.mini-review-text {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.mini-reviewer-name {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--teal);
    font-weight: 600;
    text-align: right;
}

.mini-reviewer-name a {
    text-decoration: underline;
    font-weight: 700;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.glass-form > div {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.glass-form label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teal);
    font-family: 'Lora', serif;
}

.glass-form input[type="text"],
.glass-form input[type="email"],
.glass-form input[type="tel"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--text-dark);
    background: rgba(250, 249, 246, 0.7);
    border: 1px solid rgba(0, 128, 128, 0.3);
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-form input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--teal);
    border-radius: 0;
    background-color: rgba(250, 249, 246, 0.7);
    display: inline-grid;
    place-content: center;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.glass-form input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s ease-in-out;
  margin-top: -2px;
}

.glass-form input[type="checkbox"]:checked {
  background-color: var(--teal);
}

.glass-form input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

.glass-form input:invalid {
    border-bottom-color: red;
}

.glass-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn:disabled,
.btn[disabled],
.htmx-request .btn {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background-color: rgba(0, 128, 128, 0.5);
}

.discount {
    text-decoration: line-through red 2px;
}

.price {
    position: absolute;
    bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    h1 { font-size: 2.5rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .reviews-container { flex-direction: column; }
    .modal-reviews-section {
        margin-top: 2.5rem;
        padding-top: 1.5rem;
    }
    .modal-split { display: block; }
}

@media (max-width: 600px) {
    .screen-section { padding: 4rem 5%; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-info { flex-direction: column; gap: 1rem; }
    .glass-block { padding: 2rem; }
}