/* TABS */
.tabs {
    display: flex;
    position: sticky;
    top: 0;
    background-color: rgb(255, 255, 255);
    z-index: 10;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 4px 8px;
    margin-right: 4px;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid var(--primary-body-color);
    font-size: 14px;
}

.tab-button.active {
    background-color: var(--secondary-note-color);
    color: var(--primary-body-color);
}

.tab-content {
    display: block;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.tab-content.active {
    display: block;
    visibility: visible;
    height: auto;
    overflow: visible;
}

.button-exercises::before {
    content: "";
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    background-image: url("/assets/images/icons/test.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.button-lesson::before {
    content: "";
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    background-image: url("/assets/images/icons/lesson.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* --- END TABS --- */

.grammar-overview {
    margin-bottom: 20px;
}

.grammar-title {
    font-size: 40px;
}

.grammar-subtitle {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.grammar-paragraph {
    margin-bottom: 10px;
}

.grammar-timeline-title {
    margin-bottom: 40px;
}

.grammar__example-title {
    margin-bottom: 6px;
}

.timeline-image {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.grammar-timeline-examples {
    text-align: center;
}

.grammar-header {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-text-color);
    box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur-radius) var(--shadow-color);
}

.letter-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--grammar-table-border-color);
    color: var(--primary-text-color);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    padding: 0 4px;
}

.grammar-section-title {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
}

.grammar__content-rule {
    margin-bottom: 20px;
}

.grammar-list {
    counter-reset: list-counter;
    list-style: none;
    padding: 0;
    margin: 0;
}

.grammar-list li {
    position: relative;
    margin: 14px 0;
    padding-left: 54px;
}

.grammar-list li::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--primary-border-color);
    box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur-radius) var(--shadow-color);
    border-radius: 4px;
    content: "";
}

.grammar-examples-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.grammar__example {
    padding: 20px;
    /* Внутренние отступы */
}

.grammar__example-item {
    margin-bottom: 8px;
}

.grammar__example p {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.checkbox {
    width: 14px;
    height: 14px;
    border: 2px solid #2a7e89;
    border-radius: 50%;
    /* делает элемент кругом */
    margin-right: 10px;
    flex-shrink: 0;
    background-color: var(--primary-text-color);
}

.grammar-marker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.grammar-marker {
    background-color: var(--primary-body-color);
    color: var(--primary-text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.grammar-section__table {
    width: 100%;
    margin: 20px 0;
}

.grammar-section__table-header {
    text-transform: uppercase;
}

.grammar-section__table-cell {
    padding: 12px 28px 12px 0;
    text-align: left;
    vertical-align: top;
    font-size: 1rem;
    color: #333;
}

.grammar-section__example {
    margin-bottom: 15px;
}

.grammar-section__verb {
    font-weight: bold;
    color: var(--primary-body-color);
}

.grammar-section__negation,
.grammar-section__question {
    font-weight: bold;
}

.grammar-section__rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: bold;
}

.grammar-section__pronoun {
    margin-right: 10px;
}

.grammar-section__verb {
    font-weight: bold;
}

/*  ------- PRESENT SIMPLE --------  Контейнер для временной шкалы ------- */
.timeline {
    position: relative;
    width: 100%;
    margin-bottom: 50px;
    padding-bottom: 20px;
}

.line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-body-color);
}

.crosses {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    width: 70px;
}

.cross {
    width: 28px;
    height: 28px;
    position: relative;
}

.cross::before,
.cross::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-body-color);
}

.cross::before {
    transform: rotate(45deg);
}

.cross::after {
    transform: rotate(-45deg);
}

.labels {
    display: flex;
    justify-content: space-between;
    position: absolute;
    margin-top: 30px;
    width: 100%;
}

.label {
    text-align: center;
    font-weight: bold;
    background-color: var(--primary-bg-color);
    color: var(--primary-text-color);
    width: 83px;
    border-radius: 5px;
    padding: 6px 0;
}

.past {
    left: 0;
}

.present {
    margin-left: auto;
    margin-right: auto;
}

.future {
    right: 0;
}

.grammar-examples {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 30px;
}

.grammar-examples th,
.grammar-examples td {
    border: 1px solid var(--primary-border-color);
    padding: 8px;
    text-align: left;
}

.grammar-examples th {
    background-color: #f4f4f4;
}

.marker-en {
    color: var(--primary-body-color);
    font-weight: bold;
}

.marker-en-phonetic {
    color: var(--grammar-phonetic-color);
    font-weight: bold;
}

/* ---------- EXAMPLE ------------ */
.grammar-section__description {
    margin-bottom: 15px;
    font-size: 16px;
}

.grammar-example-situation {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 20px;
}

.grammar-example__image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.grammar-example__text {
    flex: 1;
}

.grammar-example__list {
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}


/* -------- TABLE -------- */
.table-scroll {
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

/* Кастомная полоса прокрутки Для Chrome / Safari / Edge */
.table-scroll::-webkit-scrollbar {
    height: 16px;
    /* высота горизонтальной полосы */
}

.table-scroll::-webkit-scrollbar-track {
    background-color: #ececec;
    /* фон дорожки */
    border-radius: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background-color: #ff8884;
    /* сам ползунок */
    border-radius: 4px;
}


/* END Кастомная полоса прокрутки */

.grammar-example__table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--grammar-table-color);
    color: #fffae4;
    margin-bottom: 10px;
}

.grammar-example__table td {
    padding: 10px 10px 10px 20px;
    border-bottom: 1px solid var(--grammar-table-border-color);
    max-width: 300px;
}


.grammar-example__table tr:last-child td {
    border-bottom: none;
}

.grammar-example__table td:first-child {
    border-right: 1px solid var(--grammar-table-border-color);
    text-align: center;
}

.grammar-example__table td:nth-child(2) {
    font-weight: bold;
    border-right: 1px solid var(--grammar-table-border-color);
    text-align: center;
}

.grammar-example__table td:nth-child(3) {
    border-right: 1px solid var(--grammar-table-border-color);
    text-align: center;
}

.grammar-example__table td:last-child {
    text-align: left;
}

/* -------- MARKERS --------- */
.grammar-audio-icon {
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.grammar-image {
    max-width: 320px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.grammar-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.image-container {
    width: 420px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.header-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.grammar-list__item {
    margin-bottom: 40px;
    margin-top: 20px;
}

.grammar__list-item--list {
    margin-top: 10px;
}

.grammar-example__text-box {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.grammar-example__text-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.exercises-example-word {
    color: var(--grammar-alphabet-color);
}

.grammar-rule-block {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: var(--note-color);
}

.grammar-rule-block-title,
.grammar__block-list-item {
    margin-bottom: 10px;
}

.grammar__block-list {
    list-style-type: disc;
    padding-left: 20px;
}

.grammar__block-list-exception {
    list-style-type: none;
    padding-left: 0;
}

.line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-border-color);
    transform: translateY(-50%);
}

.highlight .bar {
    position: absolute;
    top: 50%;
    left: 33%;
    width: 33%;
    height: 6px;
    background: var(--primary-body-color);
    transform: translateY(-50%);
    border-radius: 3px;
}

.labels {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.label {
    width: 33%;
    text-align: center;
    color: var(--primary-text-color);
}

.label.present {
    font-weight: bold;
}

/* ------ ALPHABET & PHONETICS PAGE ------ */
.grammar-alphabet-section {
    margin-bottom: 100px;
}

.grammar-alphabet,
.grammar-phonetics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.alphabet-card {
    width: 160px;
    height: 260px;
    background-color: var(--primary-text-color);
    border-radius: 10px;
    box-shadow: var(--shadow-offset-x) var(--shadow-offset-y) var(--shadow-blur-radius) var(--shadow-color);
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.phonetic-consonant-sounds,
.phonetic-vowel-sounds,
.phonetic-diphthong {
    margin-top: 50px;
    margin-bottom: 50px;
}

.phonetic-card {
    width: 240px;
    height: 320px;
}

.alphabet-card:hover {
    transform: translateY(-3px);
}

.alphabet-card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.phonetic-card-front {
    gap: 10px;
}

.alphabet-letter {
    font-size: 48px;
    font-weight: bold;
    color: var(--grammar-phonetic-color);
}

.phonetic-letter {
    color: var(--grammar-phonetic-color);
    line-height: 1.2;
}

.phonetic-example-word {
    font-size: 18px;
}

.alphabet-transcription {
    color: var(--grammar-alphabet-color);
    font-size: 16px;
}

.phonetic-description {
    font-size: 14px;
}

.alphabet-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-top: 10px;
}

.alphabet-example {
    font-size: 18px;
    font-weight: 500;
    color: var(--grammar-alphabet-color);
    margin-top: 10px;
}

/* ---- PRONOUN ----- */
.grammar-translation-weight {
    font-weight: normal;
}

.grammar-singular-plural {
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.grammar-example__table--pronoun td:nth-child(1) {
    text-align: left;
}

/* ---- ЛАМПОЧКА ИКОНКА ----- */
.with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

#bulb-icon {
    width: 30px;
    height: 30px;
}

/* ------- ПРАВИЛА ЧТЕНИЯ СТРАНИЦА ------- */
.audio-transcription {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.grammar-audio-icon-transcription {
    margin-right: 4px;
}

.letter-reading {
    color: var(--grammar-phonetic-color);
    font-size: 44px;
    font-weight: bold;
}

.grammar-example__table--reading td:nth-child(2) {
    font-weight: 400;
}

.grammar-example__table--reading td:nth-child(4) {
    text-align: center;
}