*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #2d3033;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ========== UTILITIES ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section__subtitle {
    font-size: 1.2rem;
    color: #ffd000;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section__description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #ffd000;
    color: #2d3033;
    border-color: #ffd000;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: transparent;
    color: #ffd000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border-color: #ffd000;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: #ffd000;
    color: #2d3033;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ========== SKIP LINK ========== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ffd000;
    color: #2d3033;
    padding: 8px 16px;
    z-index: 1001;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    padding: 15px 0;
}

.header.fixed {
    background: #31344e;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

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

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    transition: all 0.3s ease;
}

.header__logo strong {
    color: #ffd000;
}

.header__logo span {
    font-size: 0.9rem;
    display: block;
    font-weight: 400;
}

.header__logo:hover {
    opacity: 0.9;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd000;
    transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.nav__link:hover {
    color: #ffd000;
}

/* Burger Menu */
.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.burger__item {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.burger__item::before,
.burger__item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.burger__item::before {
    top: -8px;
}

.burger__item::after {
    bottom: -8px;
}

.burger.active .burger__item {
    background: transparent;
}

.burger.active .burger__item::before {
    transform: rotate(45deg);
    top: 0;
}

.burger.active .burger__item::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.burger__text {
    display: none;
}

/* ========== INTRO SECTION ========== */
.intro {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #2d3033 0%, #31344e 100%);
    background-image: url('img/Back_fon.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 0 100px;
}

.intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 48, 51, 0.85);
}

.intro__inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.intro__title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.intro__subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.intro__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== WORKS SECTION ========== */
.works {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.works__item {
    flex: 1 0 calc(33.333% - 20px);
    height: 350px;
    font-family: 'Courier New', monospace;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    border-radius: 8px;
}

/* Hover эффект для десктопа */
@media (hover: hover) {
    .works__item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .works__item:hover .works__content {
        opacity: 1;
    }
    
    .works__item:hover .works__hint::after {
        transform: translateX(5px);
    }
}

/* Touch эффект для мобильных (активируется JS) */
.works__item.touched {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.works__item.touched .works__content {
    opacity: 1;
}

.works__item.touched .works__hint::after {
    transform: translateX(5px);
}

/* Активное состояние при нажатии */
.works__item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.works__photo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.works__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(49, 52, 78, 0.95);
    color: #fff;
    opacity: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    font-family: 'Courier New', monospace;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.works__title {
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffd000;
}

.works__list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.works__list li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.works__text {
    font-size: 16px;
    line-height: 1.6;
}

.works__hint {
    font-size: 0.75rem;
    color: #ffd000;
    margin-top: 15px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.works__hint::after {
    content: '→';
    transition: transform 0.3s ease;
}

/* Мобильные оптимизации — убираем hover эффекты */
@media (hover: none) and (pointer: coarse) {
    .works__item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .works__item:hover .works__content {
        opacity: 0;
    }
    
    .works__item:active {
        transform: scale(0.98);
    }
}

/* Адаптив */
@media (max-width: 1300px) {
    .works__item {
        flex: 1 0 calc(50% - 20px);
    }
}

@media (max-width: 767px) {
    .works__item {
        flex: 1 0 100%;
        height: 300px;
    }
    
    .works__title {
        font-size: 20px;
    }
    
    .works__list li {
        font-size: 12px;
    }
}
/* ========== FEATURES SECTION ========== */
.features-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.features__header {
    text-align: center;
    margin-bottom: 60px;
}

.features__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.features__description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.features__item {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.features__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.features__icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.features__icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.features__number {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: #ffd000;
    color: #2d3033;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 20px;
    min-width: 45px;
    text-align: center;
}

.features__titles {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.features__text {
    color: #6c7279;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ========== TEAM SECTION ========== */
.team-section {
    padding: 80px 0;
}

.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.team__item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.team__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.team__photo-wrapper {
    overflow: hidden;
    height: 300px;
}

.team__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team__item:hover .team__photo {
    transform: scale(1.05);
}

.team__info {
    padding: 20px;
}

.team__name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.team__prof {
    color: #ffd000;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team__experience {
    color: #6c7279;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team__credentials {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6c7279;
}

.team__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team__phone,
.team__email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c7279;
    transition: color 0.3s ease;
}

.team__phone:hover,
.team__email:hover {
    color: #ffd000;
}

.team__cta {
    text-align: center;
}

/* ========== CALLBACK SECTION ========== */
.callback-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2d3033 0%, #31344e 100%);
    color: #fff;
}

.callback__inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.callback__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.callback__description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.callback__form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #ffd000;
    box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.callback__agree {
    font-size: 0.8rem;
    color: #6c7279;
    margin-top: 1rem;
}

.callback__agree a {
    color: #ffd000;
    text-decoration: underline;
}

.callback__agree a:hover {
    text-decoration: none;
}

/* ========== FOOTER ========== */

.footer {
    background: #2d3033;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 60px;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer__address p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.footer__address svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.footer__address a {
    color: rgba(255, 255, 255, 0.7);
}

.footer__address a:hover {
    color: #ffd000;
}

.footer__schedule p {
    margin-bottom: 0.5rem;
}

.footer__social {
    display: flex;
    gap: 15px;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer__social-link:hover {
    background: #ffd000;
    transform: translateY(-3px);
}

.footer__social-link:hover svg {
    color: #2d3033;
}

.footer__social-link svg {
    width: 20px;
    height: 20px;
    color: #fff;
    transition: color 0.3s ease;
}

/* Copyright */
.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

.copyright__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.copyright__content a {
    color: rgba(255, 255, 255, 0.7);
}

.copyright__content a:hover {
    color: #ffd000;
}

/* Scroll Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #ffd000;
    color: #2d3033;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ========== MESSAGE TOAST ========== */
.message-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    max-width: 350px;
}

.message-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.message-toast--success {
    background: #28a745;
}

.message-toast--error {
    background: #dc3545;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.works__item,
.features__item,
.team__item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.works__item.animated,
.features__item.animated,
.team__item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .intro__title {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #2d3033;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav.show {
        right: 0;
    }
    
    .nav__link {
        font-size: 1rem;
    }
    
    .burger {
        display: block;
        z-index: 1001;
    }
    
    .works {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .works__item {
        height: 300px;
    }
    
    .features {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .team {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .footer__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }
    
    .copyright__content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .intro {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .intro__title {
        font-size: 2rem;
    }
    
    .intro__subtitle {
        font-size: 1rem;
    }
    
    .intro__buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .intro__buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .works {
        grid-template-columns: 1fr;
    }
    
    .works__item {
        height: 280px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .features__item {
        padding: 20px;
    }
    
    .team {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .team__photo-wrapper {
        height: 250px;
    }
    
    .callback__form {
        padding: 25px;
    }
    
    .callback__title {
        font-size: 2rem;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__address p {
        justify-content: center;
    }
    
    .footer__social {
        justify-content: center;
    }
    
    .message-toast {
        left: 15px;
        right: 15px;
        max-width: calc(100% - 30px);
        text-align: center;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .intro__title {
        font-size: 1.75rem;
    }
    
    .section__title {
        font-size: 1.75rem;
    }
    
    .works__title {
        font-size: 1.5rem;
    }
    
    .features__title {
        font-size: 1.2rem;
    }
    
    .team__name {
        font-size: 1.2rem;
    }
    
    .callback__title {
        font-size: 1.75rem;
    }
    
    .callback__form {
        padding: 20px;
    }
    
    .form-control {
        padding: 10px 12px;
    }
}

/* ========== DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .features-section {
        background: #1a1a1a;
    }
    
    .features__item {
        background: #2d2d2d;
    }
    
    .team__item {
        background: #2d2d2d;
    }
    
    .team__credentials {
        background: #1a1a1a;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .form-control:focus {
        border-color: #ffd000;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header,
    .footer,
    .callback-section,
    .scroll-top,
    .burger {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .intro {
        min-height: auto;
        padding: 20px 0;
    }
    
    .intro::before {
        display: none;
    }
    
    .works__item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus {
    outline: 2px solid #ffd000;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid #ffd000;
    outline-offset: 2px;
}