@font-face {
    font-family: 'Lexend';
    src: url('../fonts/lexend/Lexend-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lexend';
    src: url('../fonts/lexend/Lexend-Bold.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/roboto/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Back to top */

.back-to-top {
    position: fixed;
    bottom: 15px;
    right: 20px;
    z-index: 1000;
    padding: 15px;
    border: none;
    background-color: rgb(242 118 102);
    color: #fff;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.back-to-top img {
    width: 20px;
    height: 20px;
}

.back-to-top.show {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: rgb(199, 95, 82);
}

.kerndigital,
.kerndigital a {
    font-size: 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all .3s ease;
}

.kerndigital a:hover {
    color: rgba(255, 255, 255, 0.9);

    transition: all .3s ease;

}

a {
    transition: all .3s ease;
}

a:hover {
    transition: all .3s ease;
}

body {
    font-family: 'Lexend', sans-serif !important;
    font-style: normal;
    color: rgb(69 69 69);
    padding: 0;
    margin: 0;
    cursor: default;
}

/* Затемнение фона */
body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
    /* ниже mobile-menu (1000) */
}

/* Блокировка прокрутки */
body.menu-open {
    overflow: hidden;
}

main {
    padding: 40px 0;
    min-height: 50vh;

}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

p {
    margin: 0;
}

img {
    margin: 0;
}


canvas {
    touch-action: none;
    background-color: #fff;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

.main-color {
    color: #69b0ac;
}

.second-color {
    color: rgb(242 118 102);
}

.third-color {
    color: rgb(69 69 69);
}

.btn {
    padding: 6px 20px;
    font-size: 20px;
    font-family: 'Lexend', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    border: 1px solid #69b0ac;
    background-color: #69b0ac;
    color: #fff;
    transition: all 0.3s;
    text-decoration: unset;
    align-items: center;
    justify-content: center;
    display: inline-flex;
    text-align: center;

    max-width: 320px;
    width: 100%;
    box-sizing: border-box;
}

.btn:hover {
    border: 1px solid rgb(242 118 102);
    background-color: rgb(242 118 102);
    transition: all 0.3s ease;
    transform: scale(1.03);
    cursor: pointer;
}

.btn.login {
    width: auto;
}

.title {
    text-transform: uppercase;
}

header {
    /* background-color: #69b0ac; */
    padding: 10px 0;
    /* position: sticky;
    top: 0;
    z-index: 90000; */
    width: 100%;
    transition: all 0.3s ease;

}

footer {
    background-color: #69b0ac;
    padding: 100px 0;
}

footer p {
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
}

.logo {
    width: 140px;
    margin-right: 20px;
}

.alert {
    padding: 10px;
    background-color: rgb(105 176 173);
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.alert.read_write {
    background-color: rgb(210 236 234);
    color: rgb(69 69 69);
}

.alert.read_write.mobile {
    display: none;
}

.alert-error {
    background-color: rgb(242 118 102);
}

.menu-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu {
    list-style: none;
    display: flex;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    /* color: rgb(69 69 69); */
    color: #fff;
    align-items: center;
    width: 100%;
}

.menu .item {
    position: relative;
    line-height: 39px;
    transition: all 0.3s ease;
    border-right: 1px solid rgb(69 69 69);
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Убираем разделитель у последнего элемента */
.menu .item:last-child {
    border-right: none;
}

.menu .item.active {
    background-color: #69b0ac;
}

.menu .item.active a {
    color: #fff;
}

.menu a {
    text-decoration: none;
    color: rgb(69 69 69);
    width: 100%;
    display: block;
    padding: 0 15px;
}

.menu .btn {
    display: flex;
}

.menu .item:hover {
    background-color: rgb(242 118 102);
    color: #fff;
    transition: all 0.3s ease;
}

.menu .item:hover .link {
    color: #fff;
}

.menu .has-submenu {
    position: relative;
    display: block;
    padding: 0 15px;
}

.menu .has-submenu:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    background: #f3f5f7;
    /* color: rgb(69 69 69); */
    color: #fff;
    padding: 0;
    top: 100%;
    left: 0;
    z-index: 10;
    list-style: none;
    text-transform: none;
    min-width: 100%;
    /* 👈 гарантирует, что submenu не меньше ширины родителя */
}

.submenu .sublink {
    /* color: rgb(69 69 69); */
    color: #fff;
}

.submenu .active {
    background-color: #69b0ac;
}

.submenu li {
    white-space: nowrap;
    transition: all 0.3s ease;
    border-top: 1px solid rgb(69 69 69);
}

.submenu li:first-child {
    border-top: none;
}

.submenu li:hover {
    background-color: rgb(242 118 102);
}

.submenu li:hover .sublink {
    color: #fff;
}


/* Бургер-кнопка */
.mobile-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    font-size: 3em;
    z-index: 1001;
    cursor: pointer;
    color: rgb(242 118 102);

    background-color: #f8f8f8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    /* по желанию */

}

.mobile-toggle.close {
    display: none;
}

/* Выезжающее меню */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100%;
    background: #f8f8f8;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 20px;
    transition: right 0.3s ease-in-out;
    align-items: center;
}

/* При открытии */
.mobile-menu.open {
    right: 0;
    display: flex;
}

/* Кнопка закрытия */
.mobile-close {
    font-size: 3em;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    color: rgb(242 118 102);
    background-color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    /* по желанию */

}

.mobile-menu .menu {
    font-weight: bold;
    color: #69b0ac;
    font-size: 20px;
}

.mobile-menu .menu .link {
    color: #69b0ac;
}

.mobile-menu .menu .item {
    border-right: unset;
    line-height: 50px;
}

.mobile-menu .submenu {
    position: static;
    display: block !important;
    background: unset;
    font-weight: normal;
}

.mobile-menu .submenu li {
    border-top: unset;
}

.mobile-menu .submenu .active {
    background-color: unset;
}

.mobile-menu .submenu li:hover {
    background-color: unset;
    color: rgb(242 118 102);
}

.mobile-menu .submenu li:hover .sublink {
    /* color: rgb(69 69 69); */
    color: #fff;
}

/* .mobile-menu .submenu li .sublink:hover {
    color: rgb(242 118 102);
} */

.mobile-menu .submenu .active .sublink {
    color: rgb(242 118 102) !important;
}


.mobile-menu .menu .item:hover {
    background-color: unset;
    color: rgb(242 118 102);
}

.mobile-menu .menu .item:hover.has-submenu {
    color: #69b0ac;

}

.mobile-menu .menu .item:hover .link {
    color: rgb(242 118 102);
}

.mobile-menu .menu .item.active {
    background-color: unset;
    color: rgb(242 118 102);
}

.mobile-menu .menu .item.active .link {
    color: rgb(242 118 102);
}


.letter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.letter-grid.alphabet {
    max-width: 900px;
    margin: 0 auto;
}

.letter-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 34px;
    padding: 18px 10px !important;
    text-transform: unset !important;
    width: 100px;
}

.letter-type-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    padding-top: 80px;
}

.letter-type-group.round {
    padding-top: 0;
}

.letter-type-group .svg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.letter-type-group .svg-container svg,
.fox-plus-dog .svg-container svg {
    width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
}

#uppercase-letters .letter-type-group .svg-container svg {
    max-height: 230px;
}


.letter-type-group .title {
    padding: 10px 0;
    text-align: center;
    width: 100%;
}

.letter-type-group.round .title {
    background-color: #fff2cc;

}

.letter-type-group.tall .title {
    background-color: #d2f0ff;

}

.letter-type-group.medium .title {
    background-color: #ffd6e7;

}

.letter-type-group.pointy .title {
    background-color: #dcffe4;
}

.letter-type-group.straight .title {
    background-color: #f0e6ff;

}

.letter-type-group.half-round .title {
    background-color: #e1cbae;

}

.letter-sound-pair {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.letter-sound-pair .btn:hover {
    border: 1px solid #14726e;
    background-color: #14726e;
}

.letter-sound-pair.a .btn,
.letter-sound-pair.e .btn,
.letter-sound-pair.i .btn,
.letter-sound-pair.o .btn,
.letter-sound-pair.u .btn,
.letter-sound-pair.y .btn {
    border: 1px solid #f27666;
    background-color: #f27666;
}

.letter-sound-pair.a .btn:hover,
.letter-sound-pair.e .btn:hover,
.letter-sound-pair.i .btn:hover,
.letter-sound-pair.o .btn:hover,
.letter-sound-pair.u .btn:hover,
.letter-sound-pair.y .btn:hover {
    border: 1px solid #8f3327;
    background-color: #8f3327;
}


.letter-sound-pair.y .letter-pair.btn {
    border: 1px solid #cb0d0d;
    background-color: #cb0d0d;
}

.letter-sound-pair.y .letter-pair.btn:hover {
    border: 1px solid #820404;
    background-color: #820404;
}


.main-wrap {
    display: flex;
    flex-direction: column;
    gap: 50px;
    background-color: #f9f9f9;
    padding: 40px;
}

hr {
    border: 2px solid #dedede;
    width: inherit;
}

.main-content p {
    text-align: center;
}

.letter-group {
    display: flex;
    gap: 50px;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.letter-item-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.letter-item-wrap p,
.letter-item-wrap h3 {
    font-size: 24px;
}

.letter-item {
    display: flex;
    gap: 40px;
    align-items: flex-end;
    width: 100%;
    justify-content: space-evenly;
    flex-wrap: wrap;

}

.letter-item h2 {
    text-align: center;
}

.letter-item .content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.capitalize {
    text-transform: capitalize;
}

.subtitle {
    font-size: 24px;
}

.letter-item svg,
.letter-item canvas {
    width: 280px;
    height: 320px;
}

.letter-navigation {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;

}

.letter-navigation .btn {
    width: fit-content;
    /* padding: 6px 10px; */
}

.letter-navigation .btn span {
    text-transform: none !important;
    margin-left: 10px;
}

.letter-item .btn {
    width: 100%;
}

.letter-similar-list {
    display: flex;
    flex-direction: column;
    gap: 30px;

}

.other-types-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.other-types-list .title {
    text-decoration: none;
    font-weight: bold;
    color: rgb(69 69 69);
    padding: 10px 20px;
    width: auto;

}

.other-types-list .letter-type-group {
    padding: 0 !important;
}

/*  */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #cccccc;
    border-radius: 0;
    background-color: #fff;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover {
    font-family: inherit !important;
    font-size: 14px !important;
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 0s ease-in-out 0s;
    color: #000 !important;
}

input:-moz-autofill {
    font-family: inherit !important;
    font-size: 14px !important;
    box-shadow: 0 0 0px 1000px white inset;
}

input,
select,
.select2-container .select2-selection--single {
    height: 32px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #69b0ac;
    box-shadow: 0 0 0 1px #69b0ac;
    outline: none;
}

.select2-container {
    width: inherit !important;
}

.select2-container--default .select2-selection--single,
.select2-dropdown {
    border-radius: 0;
    border: 1px solid #cccccc;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #69b0ac;
}


.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form hr {
    width: 100%;
}

.syllables-grid {
    display: flex;
    gap: 20px;
    justify-content: space-evenly;

}

.syllable-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.syllable-card .example-word {
    font-size: 28px;
}

.syllable-card .syllable-image {
    border: 1px solid #cccccc;
    border-radius: 100%;
}

.syllable-card .transcription {
    font-size: 30px;
    color: #c20000;
}

.example-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-list ul {
    margin: 0;
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.example-list ul li {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.example-list ul li span {
    color: #858585;
}

.example-list .btn {
    width: fit-content;
    padding: 6px 0;
}


.examples-list {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
}

.example-item .content-top,
.example-item .content-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.example-item h3,
.example-item p {
    font-size: 28px;
}

.example-item img {
    max-width: 150px;
}

.transcription {
    font-family: Arial, sans-serif;
}

.example-item .transcription {
    width: 100%;
    padding: 5px 0;
    display: block;
    text-align: center;
}

.examples-container {
    display: flex;
    gap: 50px;
    flex-direction: column;
}

.group-frame {
    border: 2px solid #cccccc;
    padding: 20px 0 50px;
    background: #fff;
}

.frame-title {
    text-align: center;
    text-transform: lowercase;
    font-size: 30px;
}

.frame-title hr {
    border: 1px solid #cccccc;
}

.example-items {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.examples-container .example-item {
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 50px;
}

.examples-container .example-item .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.examples-container .example-item svg {
    width: 500px;
    height: auto !important;
}

.examples-container .example-item .svg-container .btn {
    max-width: 100%;
}

.examples-container .example-item .svg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.examples-container .example-item .btn {
    padding: 6px;
}

.login-logout-wrap .btn {
    padding: 6px;
}

.login-logout-wrap.mobile {
    display: none;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.login-form form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 260px;
}

.input-laber-wrap {
    gap: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.input-laber-wrap.checkbox {
    flex-direction: row;
}

/* Admin panel */

.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Обёртка для прокрутки */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
}

/* Таблица */
.table {
    width: 100%;
    border-collapse: collapse;
    /* min-width: 800px; */
    background-color: white;
    font-size: 0.95rem;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f9f9f9;
    color: #444;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    color: #333;
}

/* Кнопки */
.table td.buttons,
.table th.buttons {
    white-space: nowrap;
    width: 200px;
}

.table td.buttons .btn.edit {
    margin-bottom: 10px;
}

.table td.fixed,
.table th.fixed {
    min-width: 100px;
}


.table td.table-title,
.table th.table-title {
    min-width: 170px;
    width: 200px;
}


.btn.delete {
    background-color: #454545;
    border: 1px solid #454545;
    color: white;
}

.btn.delete:hover {
    background-color: #333;
    border-color: #333;
}

/* Ссылки */
.table .letter-title {
    font-size: 1.8rem;
    text-decoration: none;
}

.table .letter-title:hover {
    color: #69b0ac;
}

/* Изображения */
.table img {
    width: auto;
    display: block;
}

.delete-letter-form {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.filter-form {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-end;
}

.filter-form.vocabulary .form-group-pair {
    width: 100%;
}

.filter-form .btn {
    max-width: 200px;
}

.form-group-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.media {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
}

.media .content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wrap-path {
    word-break: break-all;
    white-space: normal;
}

.edit-delete-pair {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.password-help ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.example-link {
    border: 2px solid #fff;
    margin: 0;
    padding: 0;
    display: flex;
}

.example-link:hover,
.example-link:checked {
    border: 2px solid #69b0ac;
}


#lowercase-letters,
#uppercase-letters,
#two-letters-one-sound,
#key-words,
#english-alphabet,
#other-types,
#fox-plus-dog {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

#letters-by-types,
#lowercase-letters,
#uppercase-letters,
#two-letters-one-sound,
#bl-blends,
#word-families,
#basic-english {
    padding-bottom: 40px;
}

#english-alphabet {
    align-items: center;
}

#fox-plus-dog .main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#lowercase-letters .letter-type-group h2,
.other-types-list.small a {
    text-transform: lowercase !important;
}

.fox-plus-dog .svg-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 40px;
}

.footer-login {
    display: flex;
    justify-content: flex-end;
}

footer .content {
    display: grid;
    grid-template-columns: 300px 300px auto;
    gap: 40px;
}

footer a {
    color: rgba(255, 255, 255, 0.5);
    transition: all .3s ease;
}

footer a:hover {
    color: rgb(255, 255, 255);
    transition: all .3s ease;
}

footer .logo {
    width: 180px;
}

footer .logo img {
    width: 100%;
}

.social-icon {
    width: 60px;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: #fff;
}

.links .list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 20px;
    justify-content: space-around;
    height: 100%;
}

.links .list a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

footer hr {
    border: 1px solid rgb(255 255 255 / 22%);
    margin: 40px 0;
    width: 100%;
}

#fox-plus-dog img {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#letters-by-types {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

#letters-by-types img {
    width: 100%;
    max-width: 700px;
}

#bl-blends a,
#word-families a,
#basic-english a {
    text-decoration: none;
}

.mobile-gap {
    display: none;
}