/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

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

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.mobile-menu-button {
    display: block;
}

.menu-icon, .close-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.desktop-nav {
    display: none;
}

.mobile-menu {
    padding: 0.5rem 0;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

.mobile-cta {
    margin: 0.5rem 1rem;
    text-align: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 3rem 0 6rem;
    position: relative;
}

.hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content {
    max-width: 48rem;
    padding: 0 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.hero-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--white);
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.hero-cta:hover {
    background-color: var(--gray-100);
}

.arrow-icon {
    margin-left: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

.hero-image {
    margin-top: 2rem;
    max-width: 100%;
}

.lawyer-image {
    width: 360px;
    height: 360px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.hero-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background-color: #f9fafb;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Quiz Form Section */
.quiz-section {
    padding: 3rem 0 6rem;
}

.quiz-container {
    max-width: 48rem;
    margin: 0 auto;
}

.quiz-form {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 1.5rem;
}

.quiz-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 0.8rem;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s ease-in-out;
    width: 20%; /* Initial width for step 1 */
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.form-step-content h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.radio-option:hover {
    background-color: var(--gray-50);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-custom {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--white);
    border-radius: 50%;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-prev, .btn-next, .btn-submit {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-prev {
    background-color: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-prev:hover:not(:disabled) {
    background-color: var(--gray-50);
}

.btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next, .btn-submit {
    background-color: var(--primary);
    color: var(--white);
    border: none;
}

.btn-next:hover:not(:disabled), .btn-submit:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.btn-next:disabled, .btn-submit:disabled {
    background-color: var(--primary-light);
    opacity: 0.7;
    cursor: not-allowed;
}

.chevron-icon, .check-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-prev .chevron-icon {
    margin-right: 0.5rem;
}

.btn-next .chevron-icon, .btn-submit .check-icon {
    margin-left: 0.5rem;
}

/* Success Message */
.success-icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon .check-icon {
    width: 2rem;
    height: 2rem;
    color: var(--white);
}

#form-success h2 {
    margin-bottom: 0.5rem;
}

#form-success p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.telegram-button:hover {
    background-color: var(--primary-dark);
}

.message-icon {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

.reset-button {
    display: block;
    margin: 1rem auto 0;
    padding: 0.5rem 1rem;
    background-color: var(--white);
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
    cursor: pointer;
}

.reset-button:hover {
    background-color: var(--gray-50);
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

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

.step-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.step-icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

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

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
}

.testimonials-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.testimonial-author {
    margin-left: 1rem;
}

.testimonial-author h3 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.testimonial-author p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.testimonial-text {
    color: var(--gray-700);
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.faq-container {
    max-width: 48rem;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: var(--white);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    font-size: 1.125rem;
    align-items: center;
    width: 100%;
    padding: 1rem;
    text-align: left;
    background-color: var(--white);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: var(--gray-50);
}

.faq-question span {
    font-weight: 500;
    color: var(--gray-900);
}

.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-500);
    transition: transform 0.2s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1rem 1rem;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    color: var(--gray-600);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    text-align: center;
    padding: 1.5rem;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.contact-method h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-method a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-cta {
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--gray-800);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3, .footer-links h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-info p {
    color: var(--gray-300);
    margin-bottom: 1rem;
    max-width: 32rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--gray-300);
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--white);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--gray-400);
}

/* International Telephone Input Customization */
.iti {
    width: 100%;
}

.iti__flag-container {
    z-index: 10;
}

/* Responsive Styles */
@media (min-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .quiz-form {
        padding: 2rem;
    }
    
    .testimonials-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
    
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
    
    .hero-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hero-content {
        text-align: left;
        padding-right: 2rem;
    }
    
    .hero-image {
        margin-top: 0;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-methods {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .lawyer-image {
        width: 300px;
        height: 300px;
    }
    
    .steps-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .testimonials-container {
        grid-template-columns: repeat(3, 1fr);
    }
}