* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-blue: #3a328d;
    --dark-red: #b51e28;
    --gradient-1: linear-gradient(135deg, #3a328d 0%, #b51e28 100%);
    --gradient-2: linear-gradient(135deg, #b51e28 0%, #3a328d 100%);
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease;
}

.site-logo {
    width: 339px;
    height: 155px;
    object-fit: contain;
    max-width: 100%;
    height: auto;
}

/* Hero Section */
.hero {
    background: var(--gradient-1);
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('hero-bg.jpg') center/cover;
    opacity: 0.3;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-service {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    margin: 10px;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--dark-red);
    color: white;
    box-shadow: 0 5px 15px rgba(181, 30, 40, 0.4);
}

.btn-primary:hover {
    background: #d42835;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(181, 30, 40, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--dark-blue);
}

.btn-service {
    background: var(--gradient-1);
    color: white;
    margin-top: 20px;
}

.btn-service:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(58, 50, 141, 0.6);
}

/* Sections */
section {
    padding: 20px 10px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Services */
.services {
    background: #f8f9fa;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
    animation: fadeIn 1s ease;
}

.service-item.reverse {
    flex-direction: row-reverse;
}

.service-image {
    flex: 1;
    height: 400px;
    background: var(--gradient-2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.service-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-image:hover::before {
    opacity: 1;
}

.service-content {
    flex: 1;
}

.service-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-blue);
}

.service-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

/* Certificates */
.certificates {
    background: white;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cert-item {
    flex: 1;
    height: 400px;
    background: var(--gradient-2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.cert-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.cert-item:hover::before {
    opacity: 1;
}

.cert-item:hover {
    transform: scale(1.05);
}

.cert-item.large {
    grid-column: span 1;
}

.cert-item.full {
    grid-column: span 2;
    height: 500px;
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.cert-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
    color: white;
}

.cert-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.cert-content p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Guarantees - new design */
.guarantees {
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), rgba(0,0,0,0)) , var(--gradient-1);
    color: white;
    position: relative;
    overflow: hidden;
}

.guarantees::before, .guarantees::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12), rgba(58,50,141,0));
    filter: blur(40px);
    z-index: 0;
}

.guarantees::before { top: -120px; left: -80px; }
.guarantees::after { bottom: -140px; right: -60px; }

.guarantees-wrapper {
    position: relative;
    z-index: 1;
}

.guarantees-heading {
    text-align: center;
    margin-bottom: 50px;
}

.guarantees-title {
    font-size: 2.6rem;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 3px 10px rgba(0,0,0,0.45);
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    animation: titlePulse 4s ease-in-out infinite;
}

.guarantees-subtitle {
    max-width: 780px;
    margin: 0 auto;
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    line-height: 1.7;
}

@keyframes titlePulse {
    0% { text-shadow: 0 3px 10px rgba(0,0,0,0.45); }
    50% { text-shadow: 0 6px 18px rgba(0,0,0,0.6); }
    100% { text-shadow: 0 3px 10px rgba(0,0,0,0.45); }
}

.new-guarantees {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.guarantee-card {
    position: relative;
    padding: 26px 22px 24px;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
}

.guarantee-card::after {
    content: '';
    position: absolute;
    inset: -40% 30%;
    background: radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0));
    transform: rotate(25deg);
    opacity: 0.6;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.guarantee-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.35);
}

.guarantee-card:hover::after {
    opacity: 0.9;
    transform: rotate(10deg);
}

.guarantee-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.25);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.guarantee-icon {
    font-size: 1.4rem;
}

.guarantee-card h3 {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 12px;
}

.guarantee-card p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-size: 1rem;
}

/* Quiz Section */
.quiz-section {
    padding: 10px 10px;
    background: #f8f9fa;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* Центровка стартовой кнопки и компактный прямоугольник */
.quiz-start-center {
    position: relative;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.quiz-start-center .btn-primary {
    width: 100%;
    max-width: 720px;
    min-width: 280px;
    justify-content: center;
}

/* Анимация фона под кнопкой */
.quiz-start-center::after {
    content: '';
    position: absolute;
    inset: 18% 10%;
    background: linear-gradient(120deg,
        rgba(58,50,141,0.16),
        rgba(181,30,40,0.14),
        rgba(58,50,141,0.16));
    filter: blur(16px);
    animation: flowBG 6s ease-in-out infinite;
    z-index: 0;
    border-radius: 22px;
}
.quiz-start-center > * { position: relative; z-index: 1; }

@keyframes flowBG {
    0% { transform: translateX(-8%) translateY(0); opacity: 0.8; }
    50% { transform: translateX(8%) translateY(-4%); opacity: 1; }
    100% { transform: translateX(-8%) translateY(0); opacity: 0.8; }
}

/* Анимация привлечения внимания */
.pulse-card {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(58,50,141,0.25), 0 0 0 0 rgba(181,30,40,0.2); }
    50% { box-shadow: 0 0 0 12px rgba(58,50,141,0.08), 0 0 0 22px rgba(181,30,40,0.05); }
    100% { box-shadow: 0 0 0 0 rgba(58,50,141,0.0), 0 0 0 0 rgba(181,30,40,0.0); }
}

.quiz-question {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-question h2 {
    font-size: 1rem;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.quiz-question .quiz-step {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #777;
}

.quiz-options {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.quiz-option-image {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.quiz-option-btn {
    padding: 20px;
    border: 3px solid var(--dark-blue);
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quiz-option-btn:hover {
    background: var(--gradient-1);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(58, 50, 141, 0.3);
}

.quiz-option-btn.selected {
    background: var(--gradient-1);
    color: white;
    border-color: var(--dark-red);
}

.quiz-option-btn img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.quiz-option-btn span {
    font-size: 1.2rem;
    font-weight: bold;
}

.quiz-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.quiz-btn {
    padding: 15px 25px;
    border: 2px solid var(--dark-blue);
    border-radius: 10px;
    background: white;
    color: var(--dark-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
}

.quiz-btn:hover {
    background: var(--gradient-1);
    color: white;
    transform: translateY(-3px);
}

.quiz-btn.selected {
    background: var(--gradient-1);
    color: white;
}

.quiz-next {
    width: 100%;
    padding: 20px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.quiz-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(58, 50, 141, 0.4);
}

.quiz-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-input-group {
    margin-bottom: 20px;
}

.quiz-input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--dark-blue);
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Прогресс-бар */
.quiz-progress {
    width: 100%;
    height: 10px;
    background: #ececf5;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
}

.quiz-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

/* Checkbox */
.form-checkbox, .quiz-checkbox {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form-checkbox input[type="checkbox"],
.quiz-checkbox input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label,
.quiz-checkbox label {
    cursor: pointer;
    line-height: 1.5;
    margin: 0;
}

.form-checkbox a,
.quiz-checkbox a {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.exit-modal {
    max-width: 900px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    z-index: 1001;
}

.modal-close:hover {
    color: var(--dark-red);
}

.modal-content h2 {
    color: var(--dark-blue);
    margin-bottom: 30px;
    text-align: center;
}

.modal-content form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--dark-blue);
    border-radius: 10px;
    font-size: 1rem;
}

/* Fixed Phone Button */
.phone-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 999;
    animation: phonePulse 2s infinite;
    text-decoration: none;
}

.service-img-mobile {
    display: none;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

@keyframes phonePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .site-logo { width: 250px; max-width: 90%; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .service-item, .service-item.reverse { flex-direction: column; }
    .service-image { width: 100%; }
    .cert-item { width: 100%; }
    .cert-grid { grid-template-columns: 1fr; }
    .cert-item.full { grid-column: span 1; }
    .guarantees-grid { grid-template-columns: 1fr; }
    .quiz-option-image { grid-template-columns: 1fr; }
    .quiz-buttons { grid-template-columns: repeat(2, 1fr); }
    .phone-fixed { display: flex; }
    .service-image {
        background-image: none !important; /* фон не нужен, используем <img> */
        height: auto;
        padding: 0;
    }
    .service-img-mobile {
        display: block;
    }
}

@media (min-width: 769px) {
    .phone-fixed { display: none; }
}