/* ============================================================
   Страница «Репетитор» — использует переменные из base.css,
   ничего не переопределяет глобально.
   ============================================================ */

.tutor-page {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--page-text-color);
}

.tutor-page h1,
.tutor-page h2,
.tutor-page h3 {
    font-family: "CourierCyrPS-Bold", monospace;
    color: var(--page-text-color);
    font-weight: 700;
}

/* Полноширинные секции внутри .page-layout (компенсируем его padding: 20px 50px) */
.tutor-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: calc(100% + 100px);
    margin-left: -50px;
    margin-right: -50px;
    padding: 64px 50px;
}


.subjects-illustration-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.subjects-illustration {
    width: 256px;
    height: 256px;
    background-image: url('/icons/subjects-illustration-icon.svg');
}


.tutor-container {
    max-width: 1080px;
    margin: 0 auto;
}

.tutor-section-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.tutor-section-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: var(--page-text-color);
    margin-bottom: 36px;
}

/* ---------- Кнопки ---------- */


.contacts-line {
    display: flex;
    gap: 10px;
}

.contacts-line-bottom {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tutor-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--accent-color);
    color: var(--accent-text-color);
    text-decoration: none;
    font-family: "CourierCyrPS", "Courier", monospace;
    font-size: 16px;
    padding: 14px 26px;
    border-radius: var(--common-border-radius);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    width: 140px;
}

.tutor-contact-button:hover {
    background-color: var(--strong-highlight-color);
    color: var(--highlight-text-color);
}

.tutor-contact-button:focus-visible {
    outline: 2px solid var(--page-text-color);
    outline-offset: 3px;
}

.tutor-contact-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
}

.tutor-contact-button-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.tutor-contact-button-outline:hover {
    background-color: var(--highlight-color);
    color: var(--highlight-text-color);
}

/* ---------- Hero ---------- */

.hero-section {
    padding-top: 15px;
    background-color: var(--page-color);
    background-image:
        linear-gradient(var(--light-border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--light-border-color) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: center top;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}


.hero-eyebrow {
    font-family: "CourierCyrPS", "Courier", monospace;
    color: var(--accent-color);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 40px;
    line-height: 1.25;
    margin-bottom: 18px;
}

.hero-title .underline-mark {
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

.hero-title .underline-mark svg {
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 10px;
    overflow: visible;
}

.hero-title .underline-mark svg path {
    stroke: var(--strong-highlight-color);
    stroke-width: 5;
    fill: none;
    stroke-linecap: round;
}

.hero-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--page-text-color);
    max-width: 520px;
    margin-bottom: 28px;
}

.hero-stats {
    display: flex;
    gap: 28px;
    margin: 28px 0 32px 0;
    flex-wrap: wrap;
}

.hero-stat-number {
    font-family: "CourierCyrPS-Bold", "Courier", monospace;
    font-size: 24px;
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1.1;
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted-color);
}

/* Фото-заглушка */

.hero-photo-wrap {
    position: relative;
    min-width: 200px;
}

.hero-photo-placeholder {
    aspect-ratio: 3 / 4;
    background-color: var(--card-background-color);
    border: 2px dashed var(--light-border-color);
    border-radius: var(--common-border-radius);
    display: block;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.hero-photo-placeholder img {
    border-radius: var(--common-border-radius);
}

.hero-photo-tag {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: var(--strong-highlight-color);
    color: var(--strong-highlight-text-color);
    font-family: "CourierCyrPS", "Courier", monospace;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    transform: rotate(3deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* ---------- Направления (предметы) ---------- */

.subjects-section {
    background-color: var(--card-background-color);
}


.subjects-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    justify-content: center;
}

.goals-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 640px;
    margin: 12px 0px 32px 0px;
}

.goals-list li {
    position: relative;
    padding-left: 36px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--page-text-color);
    margin-left: 10px;
}

.goals-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--highlight-color);
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subjects-aim {
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 640px;
    padding: 4px 0px;
}

.subjects-aim-icon {
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--strong-highlight-color);
    color: var(--strong-highlight-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.subjects-aim p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--page-text-color);
}

/* ---------- Отзывы -----------*/

.reviews-grid {
    column-count: 3;
    column-gap: 24px;
}

.review-card {
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
    break-inside: avoid;
}

.review-card img {
    width: 100%;
    display: block;
    border-radius: 14px;
}

/* ---------- Прайс-лист ---------- */

.price-section {
    background-color: var(--card-background-color);
}

.price-table-wrap {
    background-color: var(--page-color);
    border: 1px solid var(--light-border-color);
    border-radius: var(--common-border-radius);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}


.price-container {
    width: 100%;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.price-table th {
    text-align: left;
    font-family: "CourierCyrPS-Bold", "Courier", monospace;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--accent-text-color);
    background-color: var(--accent-color);
    padding: 14px 20px;
}

.price-table td {
    padding: 16px 20px;
    border-top: 1px solid var(--light-border-color);
    font-size: 16px;
    line-height: 1.5;
    color: var(--page-text-color);
}

.price-table tr:nth-child(even) td {
    background-color: var(--light-highlight-color);
}

.price-value {
    font-family: "CourierCyrPS", "Courier", monospace;
    font-weight: 700;
    color: var(--accent-color);
    white-space: nowrap;
}


/* ---------- FAQ ---------- */

.faq-section {
    background-color: var(--page-color);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--light-border-color);
    border-radius: var(--common-border-radius);
    background-color: var(--card-background-color);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-family: inherit;
    color: var(--page-text-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.faq-question-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: transform var(--transition-fast);
}

.faq-item[data-open="true"] .faq-question-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-fade);
}

.faq-answer p {
    padding: 0 22px 20px 22px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main-color);
}

/* ---------- Финальный CTA ---------- */

.final-cta-section {
    background-color: var(--strong-highlight-color);
    text-align: center;
}

.final-cta-section h2 {
    color: var(--strong-highlight-text-color);
}

.final-cta-section p {
    color: var(--strong-highlight-text-color);
    max-width: 480px;
    margin: 12px auto 28px auto;
    font-size: 15px;
    opacity: 0.9;
}

.final-cta-section .tutor-contact-button {
    background-color: var(--accent-text-color);
    color: var(--accent-color);
}

.final-cta-section .tutor-contact-button:hover {
    background-color: var(--page-color);
}


@media (max-width: 900px) {
    .hero-grid {
        gap: 15px;
    }

    .hero-photo-placeholder {
        max-height: 45vh;
    }
}

@media (max-width: 800px) {
    .hero-title {
        font-size: 28px;
    }

    .tutor-section-title {
        font-size: 22px;
    }


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

    .hero-photo-wrap {
        order: -1;
        margin: 0 auto;
    }
    
    .subjects-section {
        justify-content: flex-start;
    }


    .subjects-illustration-wrap {
        display: none;
    }


    .subjects-container {
        display: block;
        width: 100%;
    }


    .tutor-section {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
        padding: 40px 20px;
    }
}



@media (max-width: 1000px) {
    .reviews-grid {
        column-count: 2;
    }
}


@media (max-width: 650px) {
    .reviews-grid {
        column-count: 1;
    }
}



@media (prefers-reduced-motion: reduce) {
    .telegram-fab,
    .subject-card,
    .faq-answer,
    .tutor-contact-button,
    .faq-question-icon {
        transition: none;
    }
}