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

/* =============================================
   FOOTER BASE STYLES
   ============================================= */
.footer {
    background: linear-gradient(135deg, var(--bg-dark), var(--secondary-light));
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="rgba(212,175,55,0.1)"/><circle cx="80" cy="80" r="1.5" fill="rgba(212,175,55,0.08)"/><circle cx="50" cy="30" r="1" fill="rgba(212,175,55,0.06)"/><circle cx="70" cy="50" r="1.2" fill="rgba(212,175,55,0.09)"/><circle cx="30" cy="70" r="0.8" fill="rgba(212,175,55,0.07)"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.footer > .container {
    position: relative;
    z-index: 2;
}

/* =============================================
   FOOTER SECTIONS
   ============================================= */
.footer-about,
.footer-links,
.footer-services,
.footer-contact {
    margin-bottom: 2rem;
}

.footer-title {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* =============================================
   FOOTER ABOUT SECTION
   ============================================= */
.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
    z-index: -1;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.social-link i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* =============================================
   FOOTER LISTS
   ============================================= */
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.75rem;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.25rem;
}

.footer-list a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.footer-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-list a:hover::before {
    opacity: 1;
}

/* =============================================
   CONTACT INFO
   ============================================= */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-item i {
    color: var(--primary-color);
    margin-right: 1rem;
    margin-top: 0.25rem;
    font-size: 1rem;
    min-width: 16px;
}

.contact-item span {
    flex: 1;
}

/* =============================================
   FOOTER DIVIDER
   ============================================= */
.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 3rem 0 2rem;
    border-width: 1px;
}

/* =============================================
   FOOTER BOTTOM
   ============================================= */
.footer-bottom-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

.footer-bottom-links span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.back-to-top:focus {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 991.98px) {
    .footer {
        padding: 3rem 0 2rem;
    }
    
    .footer-about,
    .footer-links,
    .footer-services,
    .footer-contact {
        margin-bottom: 2.5rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    .footer-title::after {
        width: 40px;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .footer {
        padding: 2.5rem 0 1.5rem;
    }
    
    .footer-about,
    .footer-links,
    .footer-services,
    .footer-contact {
        margin-bottom: 2rem;
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-about p {
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .social-link i {
        font-size: 1rem;
    }
    
    .footer-list a {
        font-size: 0.85rem;
        padding-left: 1rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .contact-item i {
        font-size: 0.9rem;
        margin-right: 0.75rem;
    }
    
    .footer-bottom-text,
    .footer-bottom-links {
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .footer-title::after {
        width: 30px;
    }
    
    .footer-about p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .social-links {
        gap: 0.375rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-link i {
        font-size: 0.9rem;
    }
    
    .footer-list a {
        font-size: 0.8rem;
        padding-left: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .contact-item {
        font-size: 0.8rem;
        margin-bottom: 0.625rem;
        line-height: 1.5;
    }
    
    .contact-item i {
        font-size: 0.8rem;
        margin-right: 0.625rem;
        min-width: 14px;
    }
    
    .footer-divider {
        margin: 2rem 0 1.5rem;
    }
    
    .footer-bottom-text p,
    .footer-bottom-links a {
        font-size: 0.75rem;
    }
    
    .back-to-top {
        bottom: 0.75rem;
        right: 0.75rem;
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* =============================================
   DARK MODE SUPPORT
   ============================================= */
@media (prefers-color-scheme: dark) {
    .footer {
        background: linear-gradient(135deg, var(--gray-900), var(--bg-dark));
    }
    
    .footer::before {
        opacity: 0.2;
    }
}

/* =============================================
   HIGH CONTRAST MODE
   ============================================= */
@media (prefers-contrast: high) {
    .footer {
        background-color: var(--black);
        color: var(--white);
    }
    
    .footer-title {
        color: var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 0.5rem;
    }
    
    .footer-title::after {
        display: none;
    }
    
    .social-link {
        border: 2px solid var(--primary-color);
    }
    
    .footer-list a {
        color: var(--white);
        border-left: 3px solid var(--primary-color);
        padding-left: 0.75rem;
    }
    
    .footer-list a:hover {
        background-color: var(--primary-color);
        color: var(--black);
    }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .footer,
    .social-link,
    .footer-list a,
    .back-to-top,
    .footer-bottom-links a {
        transition: none;
    }
    
    .footer::before {
        animation: none;
    }
    
    .social-link:hover,
    .footer-list a:hover,
    .back-to-top:hover {
        transform: none;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .footer {
        background-color: var(--white) !important;
        color: var(--black) !important;
    }
    
    .footer::before {
        display: none;
    }
    
    .social-links,
    .back-to-top {
        display: none;
    }
    
    .footer-title {
        color: var(--black) !important;
        border-bottom: 1px solid var(--black);
    }
    
    .footer-list a,
    .contact-item {
        color: var(--black) !important;
    }
}