* {
    padding: 0;
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 18px;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    min-width: 320px;
    background-color: #ffffff;
    --fff: #fff;
    --grey: #7d7777;
    --green: #299f16;
    --blue: #7c7cf9;
    --red: #ff0000;
    --dark: #000;
    --my-box-shadow: 0px 0px 8px 5px rgba(34, 60, 80, 0.2);
    --my-box-shadow-hover: 0px 0px 8px 5px rgba(34, 60, 80, 0.4);
    /*цвет рамки калькулятора*/
    color: var(--dark);
}

/* start menu */
.hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger:hover {
    opacity: 0.8;
}

.hamburger__line {
    width: 30px;
    height: 3px;
    background: var(--dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--red);
}

.hamburger.active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--red);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 100%;
    background: var(--fff);
    transform: translateX(-100%); /* Полностью скрываем за экраном */
    transition: all 0.3s ease;
    z-index: 99;
    padding: 70px 20px 20px;
    box-sizing: border-box; /* Учитываем padding в общей ширине */
    overflow-y: auto; /* Добавляем вертикальную прокрутку */
}

.nav-menu.active {
    transform: translateX(0); /* Показываем меню */
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu ul li a {
    display: block;
    padding: 10px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-menu ul li a:hover {
    background: #f5f5f5;
    padding-left: 15px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 98;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* end menu */

h1 {
    margin-top: 50px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

h1 a {
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

h2 {
    margin-top: 18px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    text-decoration: underline;
}

h3 {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    padding: 30px 0;
}

h4 {
    text-align: left;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
}

sup {
    margin-top: -10px;
    font-size: 10px;
}

sub {
    margin-top: 10px;
    font-size: 10px;
}

.bold{
    font-weight: bold;
}

.text_red{
    color: var(--red);
}

.text_underline{
    text-decoration: underline;
}

.mr-t-30{
    margin-top: 30px;
}

.wrapper {
    max-width: 1350px;
    min-width: 400px;
    margin: 0 auto;
    padding: 0 10px;
}

.txt_content {
    font-size: 16px;
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    line-height: 1.5;
    margin-bottom: 20px;
}

.txt_content_img {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.txt_content_img img {
    width: 180px;
    height: auto;
    margin: 10px;
}

.txt_content .formulas {
    margin: 0 auto;
}   

.txt_content p {
    margin-bottom: 10px;
    font-size: 16px;
}

.txt_content ul{
    padding:0 15px;
}

.txt_content li{
    margin-left: 10px;
    margin-bottom: 10px;
    font-size: 16px;
}

.display_none {
    display: none;
}

/* ГЛАВНАЯ СТРАНИЦА */
.gl_container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.card_container {
    margin: 20px;
    width: 400px;
    padding: 0 5px;
    -webkit-box-shadow: var(--my-box-shadow);
    -moz-box-shadow: var(--my-box-shadow);
    box-shadow: var(--my-box-shadow);
    border-radius: 5px;
}

.card_container:hover {
    -webkit-box-shadow: var(--my-box-shadow-hover);
    -moz-box-shadow: var(--my-box-shadow-hover);
    box-shadow: var(--my-box-shadow-hover);
}

.card_container a {
    text-decoration: none;
}

.card {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px;
}

.card img {
    max-width: 80px;
    max-height: 80px;

}

.card_text {
    padding: 0 10px;
}

.card_text h3 {
    color: var(--blue);
    font-size: 16px;
    font-weight: bold;
}

.card_text p {
    color: var(--dark);
    margin-top: 10px;
    font-size: 14px;
}


/* калькуляторы */
.calculator_container {
    width: 520px;
    margin: 50px auto;
    padding: 10px;
    text-align: center;
    -webkit-box-shadow: var(--my-box-shadow);
    -moz-box-shadow: var(--my-box-shadow);
    box-shadow: var(--my-box-shadow);
    border-radius: 5px;
}


.calculator_form {
    width: 100%;
}

.calculator_image_formulas {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.calculator_image_formulas img {
    max-width: 200px;
    max-height: 150px;

}

.calculator_image_item {
    width: 180px;
    height: auto;
}

/* .formula_img  {
    width: 300px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}


.formula_img img {
    width: 300px;
} */

.calculator_item {
    display: grid;
    /* height: 40px; */
    justify-content: center;
    grid-template-columns: 320px 200px;
    grid-template-rows: 40px;
    margin-bottom: 10px;
}

.calculator_item_txt {
    padding-top: 5px;
    padding-left: 10px;
    font-size: 16px;
    font-weight: bold;
    color: var(--dark);
    text-align: left;
}

.calculator_item_txt_color {
    color: var(--red);
    font-size: 18px;
}

.calculator_item_txt_color_2 {
    color: var(--blue);
    font-size: 18px;
}

.calculator_item_input {
    width: 120px;
    height: 32px;
    border: 1px solid var(--grey);
    border-radius: 5px;
}

.calculator_item_input:hover {
    border-color: var(--red);
}

.calculator_input {
    width: 118px;
    height: 30px;
    text-align: left;
    font-size: 18px;
    border: 0px solid var(--fff);
    border-radius: 5px;
    padding: 10px;
}

.calculator_input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
}


.calculator_button {
    border: 1px solid var(--blue);
    background-color: var(--fff);
    color: var(--blue);
    border-radius: 5px;
    padding: 10px;
    min-height: 20px;
    min-width: 120px;
    cursor: pointer;
    transition: 0.5s;
}

.calculator_button:hover {
    background-color: var(--blue);
    color: var(--fff);
    border-color: var(--blue);
}

.calculator_item_txt_rez {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark);
    text-align: center;
}

.calculator_item_input_rez {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    color: var(--dark);
    text-align: left;
}

.calculator_item_input_rez_many {
    margin: 20px 0 0 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--dark);
    text-align: left;
}

/* формула старт*/
.formulas {
    font-size: 20px;
    color: var(--blue);
    width: 250px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;

}

.fraction {
    display: inline-block;
    vertical-align: middle;
    min-width: 12px;
    margin: 0 3px;

}

.numerator {
    display: block;
    text-align: center;
    border-bottom: 1px solid;
    line-height: 1.1em;
}

.denominator {
    display: block;
    text-align: center;
    line-height: 1.1em;
    margin-top: 5px;
}

.overline {
    text-decoration-line: overline;
}

.radical {
    font-size: 20px;
}

.mt {
    margin-top: 10px;
}

/* формула стоп */

@media screen and (max-width: 600px) {

    .calculator_container {
        width: 310px;
        padding: 0px 10px;
    }

    .calculator_image_formulas {
        flex-direction: column;
        align-items: center;
    }

    .formulas {
        margin-top: 20px;
    }

    .calculator_item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .calculator_item_txt {
        margin-top: 5px;
        padding-left: 0px;
    }

    .calculator_item_input {
        margin: 5px 0;
    }

    .calculator_item_txt_rez {
        margin-top: 20px;
    }

    .calculator_item_input_rez {
        margin-top: 10px;
    }

    .calculator_item_input_rez_many {
        margin: 5px 0;
    }
}