/* ========================================
   Пекарня Ферма - Landing Page Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-main: #F2F0EC;
    --bg-soft: #F7F2EB;
    --text-main: #2A2D2F;
    --accent: #B88345;
    --accent-hover: #A37238;
    --white: #FFFFFF;
    --choco: #4B2F23;
    --border: #E9E5DF;
    --border-light: #E0D9D2;
    --placeholder: #9E9E9E;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-spacing: 96px;
    --section-spacing-mobile: 64px;
    
    /* Typography */
    --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Shadows */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Section */
.section {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-main);
}

.section--soft {
    background-color: var(--bg-soft);
}

.section--dark {
    background-color: var(--choco);
    color: var(--white);
}

.section__title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 48px;
    line-height: 1.2;
}

.section--dark .section__title,
.section__title--light {
    color: var(--white);
}

.section__content {
    /* Content wrapper */
}

.section__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 24px;
}

.section__text--center {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section__cta {
    text-align: center;
    margin-top: 48px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-base);
    text-align: center;
}

.btn--primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn--secondary {
    background-color: var(--white);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn--secondary:hover {
    background-color: var(--bg-soft);
    border-color: var(--accent);
}

.btn--full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 120px 0 var(--section-spacing);
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-soft) 100%);
    overflow: hidden;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(42, 45, 47, 0.4), rgba(42, 45, 47, 0.6)),
                url('/jpg/hero-bg.jpg') center/cover;
    z-index: 0;
}

.hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero__text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero__title {
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 32px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.about-item {
    text-align: center;
    padding: 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.about-item__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-item__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Assortment Section */
.assortment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.assortment-card {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.assortment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.assortment-card__image {
    margin-bottom: 16px;
}

.assortment-card__placeholder {
    font-size: 64px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 8px;
}

.assortment-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.benefit-card {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-card__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.benefit-card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.benefit-card__text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Segments Section */
.segments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.segment-card {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.segment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.segment-card__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.segment-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

/* Conditions Section */
.conditions-list {
    max-width: 800px;
    margin: 0 auto 48px;
}

.condition-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.condition-item__icon {
    font-size: 32px;
    flex-shrink: 0;
}

.condition-item__text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Cases Section */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.case-card {
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.case-card__title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
}

.case-card__content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.case-card__problem,
.case-card__solution,
.case-card__result {
    margin-bottom: 16px;
}

.case-card__quote {
    margin-top: 24px;
    padding: 20px;
    background: var(--white);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    font-style: italic;
}

.case-card__author {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-weight: 600;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item__image {
    width: 100%;
    height: 250px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item__placeholder {
    color: var(--text-main);
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

/* Contacts Section */
.contacts-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contacts-item {
    margin-bottom: 32px;
}

.contacts-item__icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.contacts-item__text {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 8px;
}

.contacts-item__legal {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--choco);
    color: var(--white);
    padding: 32px 0;
    text-align: center;
}

.footer__text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal__content--quiz {
    max-width: 800px;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

/* Lead Form */
.lead-form {
    width: 100%;
}

.lead-form__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    text-align: center;
}

.lead-form__subtitle {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 32px;
    text-align: center;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font-base);
    color: var(--text-main);
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 131, 69, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--placeholder);
}

.lead-form__hint {
    font-size: 14px;
    color: var(--text-main);
    margin-top: 16px;
    text-align: center;
}

.lead-form__privacy {
    font-size: 12px;
    color: var(--placeholder);
    margin-top: 16px;
    text-align: center;
}

/* Thank You */
.thank-you {
    text-align: center;
}

.thank-you__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.thank-you__text {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 32px;
}

.thank-you__buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-placeholder {
    margin-top: 32px;
    padding: 60px;
    background: var(--bg-soft);
    border-radius: 12px;
    text-align: center;
    color: var(--text-main);
}

/* Quiz */
.quiz {
    width: 100%;
}

.quiz__step {
    display: none;
}

.quiz__step.active {
    display: block;
}

.quiz__header {
    text-align: center;
    margin-bottom: 32px;
}

.quiz__progress {
    font-size: 14px;
    color: var(--placeholder);
    margin-bottom: 8px;
}

.quiz__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 32px;
}

.quiz__options {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.quiz__option {
    padding: 16px;
    background: var(--bg-soft);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz__option:hover {
    border-color: var(--accent);
    background: var(--white);
}

.quiz__option input[type="radio"],
.quiz__option input[type="checkbox"] {
    margin-right: 12px;
}

.quiz__option label {
    cursor: pointer;
    font-size: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.quiz__navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.quiz__summary {
    padding: 24px;
    background: var(--bg-soft);
    border-radius: 8px;
    margin-bottom: 32px;
}

.quiz__summary-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
}

.quiz__summary-item {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
    padding-left: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .section__title {
        font-size: 32px;
    }
    
    .hero__title {
        font-size: 40px;
    }
    
    .assortment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: var(--section-spacing-mobile) 0;
    }
    
    .section__title {
        font-size: 28px;
        margin-bottom: 32px;
    }
    
    .hero {
        min-height: 500px;
        padding: 100px 0 var(--section-spacing-mobile);
    }
    
    .hero__title {
        font-size: 32px;
    }
    
    .hero__subtitle {
        font-size: 18px;
    }
    
    .hero__buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .about-grid,
    .assortment-grid,
    .benefits-grid,
    .segments-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal__content {
        padding: 24px;
        width: 95%;
    }
    
    .quiz__options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

