* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    /* margin-left: 15px; */
}

.logo span {
    color: #e74c3c;
}

.logo i {
    color: #e74c3c;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin-right: 20px;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #e74c3c;
}

.phone {
    font-weight: 700;
    color: #e74c3c;
    font-size: 18px;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/header_bg.jpg') no-repeat center center/cover;
    color: white;
    padding: 160px 0 100px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
}

/* Services */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-title p {
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}



ul.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

li.service-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    /* margin-bottom: 20px; */
    text-decoration: none;
    color: #333;
}

li.service-card a {
    text-decoration: none;
    color: #333;
}

li.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

li.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2c3e50;
}



/* Portfolio */
.portfolio {
    background-color: #f5f5f5;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    margin: 0 5px 10px;
    font-size: 16px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
    border-radius: 30px;
}

.filter-btn.active,
.filter-btn:hover {
    color: white;
    background-color: #e74c3c;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(231, 76, 60, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
    text-align: center;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* About */
.about-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.about-list {
    margin: 25px 0;
    list-style: none;
}

.about-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-list i {
    color: #e74c3c;
    margin-right: 10px;
}

.about-stats {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
}

/* Testimonials */
.testimonials {
    background-color: #2c3e50;
    color: white;
}

.testimonials .section-title h2 {
    color: white;
}



.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item a {
    color: white;
    text-decoration: none;
}

.testimonial-image {
    width: 180px;
    height: 180px;
    padding-right: 30px;
    float: left;
}

.testimonial-image>img {
    width: inherit;
    border-radius: 10px;
    border: 3px solid #7f8c8d;
}

.testimonial-header {
    font-weight: 700;
    font-size: 20px;
}

.testimonial-intro {
    font-size: 16px;
    /* font-style: italic; */
    margin-top: 15px;
}



/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 22px;
    margin-bottom: 25px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #e74c3c;
}

.footer-icons {
    display: flex;
    margin-top: 20px;
}

a.yandex-icon > img {
    border-radius: 5px;
    /* overflow: hidden; */
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 14px;
}

.owl-nav {
    font-size: 30px;
    margin-top: 0;
}

.owl-nav button.owl-next {
    float: right;
}

.owl-nav button.owl-prev span,
.owl-nav button.owl-next span {
    border: 1px solid #fff;
    border-radius: 30px;
    padding: 5px 20px 7px 20px;
    margin-top: -50px;
}

article h1,
article h2,
article h3,
article p {
    margin: 30px auto;
}

article h3 a {
    color: #e74c3c;
    text-decoration: none;
}

article p {
    line-height: 30px;
}

article p a {
    color: #e74c3c;
}

article p strong,
article li strong {
    font-weight: 500;
    /* color: #e74c3c; */
}

article table strong {
    font-weight: 600;
}

article img {
    cursor: pointer
}

article img:hover {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    transition: 0.1s
}

article img:not(:hover) {
    transition: 0.1s
}

article img:active {
    -webkit-transform: scale(3);
    -ms-transform: scale(3);
    /* transform: scale(3) translateX(100px); */
    transform: scale(3);
    transition: 0.5s
}

article img:not(:active) {
    transition: 0.5s
}

article img.left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px #ccc;
}

article img.right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px #ccc;
}

article .image-group {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    gap: 1.5rem;
}

article .image-group img {
    box-shadow: 0 1px 3px #ccc;
    /* width: calc((100% - 1.5rem * 2) / 3); */
    width: calc(100% / 4);
}

article img.shadow {
    box-shadow: 0 1px 3px #ccc;
}

article .formula {

    /* padding: 1.5rem;
    font-size: 1rem;
    font-weight: bold; */

    font-family: "Cambria Math", "Times New Roman", serif;
    font-style: italic;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #2c3e50;
    padding: 10px 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;

}

/* Стили для дробей */
article .formula .fraction {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    text-align: center;
    font-size: 0.9em;
    padding: 0 5px;
}

article .formula .numerator {
    border-bottom: 1.5px solid #2c3e50;
    padding: 0 2px;
}

article .formula .denominator {
    padding: 0 2px;
}

/* Стили для степеней и индексов */
article .formula .sup {
    font-size: 0.7em;
    /* vertical-align: super;
    line-height: 0; */
    margin-top: -1rem;
}

article .formula .sub {
    font-size: 0.7em;
    vertical-align: sub;
    line-height: 0;
}


.hidden {
    display: none;
}


/* Контейнер для адаптивности */
.table-container {
    margin: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: auto;
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); */
    /* display: none; */
    box-shadow: 0 1px 3px #ccc;
    border-radius: 8px;
}

/* Основные стили таблицы */
.styled-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 400px;
    background-color: #ffffff;
}

/* Стилизация заголовков */
.styled-table thead tr {
    background-color: #e74c3c;
    color: #ffffff;
    text-align: left;
    font-weight: bold;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
}

/* Чередование цвета строк для читаемости */
.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

/* Последняя строка с закруглением (визуально) */
.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #e74c3c;
}

/* Эффект при наведении курсора */
.styled-table tbody tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
    transition: 0.3s;
}

/* Стили для статусов */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.status.active {
    background-color: #def7ec;
    color: #03543f;
}

.status.bayer {
    background-color: #fde8e8;
    color: #9b1c1c;
}

/* Пример выделения конкретной строки */
.styled-table tbody tr.active-row {
    font-weight: bold;
    color: #009879;
}







/* Mobile Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 40px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transition: right 0.3s;
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 0 0 25px 0;
    }

    .mobile-toggle {
        display: block;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 140px 0 80px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .contact-form {
        padding: 30px 20px;
    }

    article img.left,
    article img.right {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}