/* Основні змінні кольорів */
:root {
    --navy: #0A2540;
    --deep-blue: #1A365D;
    --gold: #D4AF37;
    --light-gold: #F4E5B8;
    --cream: #FAF8F3;
    --white: #FFFFFF;
    --gray: #64748B;
    --light-gray: #E2E8F0;
}

/* Скидання стилів */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--navy);
    background: var(--cream);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo span {
    color: var(--gold);
}

.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========== BURGER MENU ========== */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: none;
    border: none;
}

.burger-menu span {
    width: 28px;
    height: 3px;
    background: var(--navy);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ========== HERO SECTION ========== */
.hero {
    padding: 150px 3rem 100px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--deep-blue) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.3;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    position: relative;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text h1 span {
    color: var(--gold);
    display: block;
}

.hero-text p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    animation: slideInLeft 0.8s ease-out 0.4s both;
    min-width: 280px;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
    background: #E5C248;
}

.cta-secondary {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    margin-top: 1rem;
    min-width: 280px;
    text-align: center;
}

.cta-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
    background: #E5C248;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-card h3 {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* ========== SERVICES SECTION ========== */
.services {
    padding: 100px 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.service-item {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gold), var(--deep-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

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

.service-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.service-item p {
    color: var(--gray);
    line-height: 1.8;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
    padding: 100px 3rem;
    background: var(--white);
}

.steps-container {
    max-width: 1400px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 5rem;
}

.step {
    position: relative;
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gold), #E5C248);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    font-family: 'Playfair Display', serif;
}

.step h3 {
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.step p {
    color: var(--gray);
}

/* ========== CONTACT PAGE ========== */
.contact-page {
    padding: 150px 3rem 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--navy);
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 2.5rem;
    padding-left: 3rem;
    position: relative;
}

.contact-item::before {
    content: '●';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 1.5rem;
}

.contact-item h3 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ========== FORM PAGE ========== */
.form-page {
    padding: 150px 3rem 100px;
    max-width: 900px;
    margin: 0 auto;
}

.form-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 1rem;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.7rem;
    color: var(--navy);
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--cream);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.submit-button {
    width: 100%;
    padding: 1.3rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

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

.back-button {
    flex: 1;
    padding: 1.3rem;
    background: var(--light-gray);
    color: var(--navy);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.back-button:hover {
    background: #cbd5e1;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

/* ========== DOCUMENT PREVIEW ========== */
.document-preview {
    background: var(--white);
    padding: 3rem;
    border: 2px solid var(--light-gray);
    border-radius: 15px;
    font-family: 'Times New Roman', serif;
    line-height: 1.8;
    color: #000;
}

.document-preview h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    text-transform: uppercase;
}

.document-preview p {
    margin-bottom: 1rem;
    text-align: justify;
}

.document-preview .doc-field {
    font-weight: bold;
    color: var(--navy);
}

.document-preview .signature-block {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
}

/* ========== PAYMENT OPTIONS ========== */
.payment-option {
    background: var(--white);
    border: 2px solid var(--light-gray);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: var(--gold);
    background: var(--cream);
    transform: translateX(5px);
}

.payment-option.selected {
    border-color: var(--gold);
    background: var(--light-gold);
}

/* ========== FOOTER ========== */
footer {
    background: var(--navy);
    color: var(--white);
    padding: 4rem 3rem 2rem;
    margin-top: 100px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--gold);
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2rem;
}

/* Красная рамка для полей с ошибкой */
input.error,
textarea.error {
    border: 1px solid red;
}

/* ========== MULTI STEP FORM (COURT FORM) ========== */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 20px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--light-gray);
    z-index: 0;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
    z-index: 1;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-indicator .step-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.step-indicator.completed .step-number {
    background: var(--deep-blue);
    border-color: var(--deep-blue);
    color: var(--white);
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray);
    text-align: center;
    max-width: 120px;
}

.step-indicator.active .step-label {
    color: var(--navy);
    font-weight: 600;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 2rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.info-box {
    background: var(--cream);
    padding: 1.2rem;
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.preview-section {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--gold);
}

.preview-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.preview-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: var(--gray);
}

.preview-value {
    color: var(--navy);
}

.text-editor {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    background: var(--cream);
    resize: vertical;
}

.text-editor:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 100px 2rem 2rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

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

    .nav-links a {
        display: block;
        padding: 1.2rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-links a::after {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .hero {
        padding: 120px 1.5rem 60px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h1 span {
        display: inline;
    }

    .hero-text p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .cta-button,
    .cta-secondary {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-width: 100%;
        width: 100%;
        display: block;
    }

    .cta-buttons {
        width: 100%;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    .services {
        padding: 60px 1.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

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

    .service-item {
        padding: 2rem;
    }

    .service-item h3 {
        font-size: 1.4rem;
    }

    .how-it-works {
        padding: 60px 1.5rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .step {
        padding: 1.5rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .contact-page {
        padding: 120px 1.5rem 60px;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .form-page {
        padding: 120px 1.5rem 60px;
    }

    .form-container {
        padding: 2rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .document-preview {
        padding: 1.5rem;
    }

    .document-preview h3 {
        font-size: 1.1rem;
    }

    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    /* Multi-step form mobile adjustments */
    .progress-bar {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0 10px;
    }

    .step-indicator {
        flex: 0 0 calc(25% - 1rem);
    }

    .step-indicator .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 80px;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .preview-item {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    .text-editor {
        min-height: 200px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .hero-text h1 {
        font-size: 1.7rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .contact-info h2 {
        font-size: 1.7rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

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

/* Overlay for mobile menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}