:root {
    --footer-bg: #2C2C2C;
    --footer-text: #ffffff;
    --footer-link: #8B0000;
    --footer-link-hover: #A52A2A;
    --footer-border: #404040;
    --footer-copyright-bg: #1A1A1A;
}

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
    flex-shrink: 0;
    font-family: 'Roboto', sans-serif;
    position: relative;
    z-index: 5;
    width: 100%;
    padding-top: 25px;
    margin-top: 12% !important;
    padding-top: 40px !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    padding-bottom: 50px !important;
}

.footer-main {
    padding: 2rem 0 1rem;
    position: relative;
}

.footer-bottom {
    background: var(--footer-copyright-bg);
    padding: 1rem 0;
    border-top: 1px solid var(--footer-border);
}

.footer-section h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    position: relative;
    font-family: 'Roboto Slab', serif;
}

.footer-section h5::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--footer-link);
}

.footer-section p {
    color: #ffffff !important;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer-contacts {
    margin-bottom: 1rem;
}

.footer-contacts .contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    width: 100%;
}

.footer-contacts a.contact-item:hover {
    color: var(--footer-link-hover) !important;
}

.footer-contacts .contact-text {
    flex: 1;
    color: var(--footer-text);
    line-height: 1.3;
    font-size: 0.9rem;
}

.footer-icon-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    border: 1px solid var(--footer-border) !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
}

.footer-contact-icon {
    color: #ffffff !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.footer-contacts .contact-item:hover .footer-icon-wrapper {
    background: var(--footer-link) !important;
    border-color: var(--footer-link) !important;
    transform: translateY(-1px);
}

.footer-social {
    margin-top: 1rem;
}

.social-links {
    display: flex;
    gap: 8px;
}

.footer-social-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    border: 1px solid var(--footer-border) !important;
    transition: all 0.3s ease !important;
}

.footer-social-link:hover .footer-social-icon {
    background: var(--footer-link) !important;
    border-color: var(--footer-link) !important;
    transform: translateY(-1px);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.6rem;
}

.footer-nav a {
    color: var(--footer-text) !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: var(--footer-link-hover) !important;
}

.footer-services {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-services li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 12px;
    font-size: 0.9rem;
}

.footer-services li::before {
    content: '▶';
    color: var(--footer-link);
    font-size: 0.6rem;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.footer-services a {
    color: var(--footer-text) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-services a:hover {
    color: var(--footer-link-hover) !important;
}

.copyright {
    text-align: center;
    margin: 0;
    color: #999;
    font-size: 0.85rem;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--footer-link) !important;
    color: white !important;
    border: none;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    display: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex !important;
}

.back-to-top:hover {
    background: var(--footer-link-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: transparent;
    pointer-events: none;
    z-index: -1;
}

.contact-form {
    margin-bottom: 60px !important;
    position: relative;
    z-index: 2;
}

.contact-form ~ .site-footer {
    padding-top: 15px;
}

.contact-form ~ .site-footer::before {
    top: -10px;
    height: 10px;
}

.site-footer *:focus {
    outline-color: var(--footer-link) !important;
}

.site-footer a:focus {
    color: var(--footer-link-hover) !important;
}

@media (max-width: 768px) {
    .footer-main {
        padding: 1.5rem 0 0.8rem;
    }
    
    .footer-bottom {
        padding: 0.8rem 0;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .site-footer {
        padding-top: 30px !important;
    }
    
    .site-footer::before {
        top: -30px;
        height: 30px;
    }
    
    main {
        padding-bottom: 40px !important;
    }
    
    .contact-form {
        margin-bottom: 50px !important;
    }
    
    .contact-form ~ .site-footer {
        padding-top: 12px;
    }
    
    .contact-form ~ .site-footer::before {
        top: -8px;
        height: 8px;
    }
}

@media (max-width: 576px) {
    .footer-main {
        padding: 1rem 0 0.5rem;
    }
    
    .footer-section h5 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .footer-contacts .contact-item {
        margin-bottom: 0.6rem;
    }
    
    .footer-icon-wrapper {
        width: 28px !important;
        height: 28px !important;
        margin-right: 8px !important;
    }
    
    .footer-contact-icon {
        font-size: 0.9rem !important;
    }
    
    .site-footer {
        padding-top: 25px !important;
    }
    
    .site-footer::before {
        top: -25px;
        height: 25px;
    }
    
    main {
        padding-bottom: 35px !important;
    }
    
    .contact-form {
        margin-bottom: 40px !important;
    }
    
    .contact-form ~ .site-footer {
        padding-top: 10px;
    }
    
    .contact-form ~ .site-footer::before {
        top: -5px;
        height: 5px;
    }
}