/* ==========================================================================
   9. Footer
   ========================================================================== */

/* ==========================================================================
   Complete Updated Immersive Footer Section Styles
   ========================================================================== */

.immersive-footer {
    position: relative;
    padding: 8rem 0 4rem;
    background-color: #2a2a3a;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

/* Footer Environment Elements */
.footer-environment {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.horizon-glow {
    position: absolute;
    width: 100%;
    height: 15rem;
    top: 0;
    background: linear-gradient(to bottom, 
        rgba(146, 110, 204, 0.15) 0%, 
        rgba(146, 110, 204, 0.05) 40%, 
        transparent 100%);
    z-index: 1;
}

.footer-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15rem;
    display: flex;
    justify-content: space-around;
    z-index: 2;
}

.footer-grid .grid-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(146, 110, 204, 0.3) 0%, transparent 100%);
    transform-origin: top center;
}

.constellation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Updated star styling with new class names */
.footer-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.footer-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border-radius: 50%;
}

.footer-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 5px 1px rgba(146, 110, 204, 0.5);
    animation: footerStarTwinkle var(--twinkle-duration, 3s) infinite alternate var(--twinkle-delay, 0s);
}

@keyframes footerStarTwinkle {
    0% { opacity: 0.3; box-shadow: 0 0 5px 1px rgba(146, 110, 204, 0.3); }
    100% { opacity: 1; box-shadow: 0 0 10px 2px rgba(146, 110, 204, 0.8); }
}

/* Updated star positions with new class names */
.footer-star-1 {
    top: 15%;
    left: 10%;
    --twinkle-duration: 4s;
    --twinkle-delay: 0s;
}

.footer-star-2 {
    top: 25%;
    left: 35%;
    --twinkle-duration: 3s;
    --twinkle-delay: 0.5s;
}

.footer-star-3 {
    top: 10%;
    left: 65%;
    --twinkle-duration: 5s;
    --twinkle-delay: 1s;
}

.footer-star-4 {
    top: 20%;
    left: 85%;
    --twinkle-duration: 4.5s;
    --twinkle-delay: 1.5s;
}

.footer-star-5 {
    top: 30%;
    left: 25%;
    --twinkle-duration: 3.5s;
    --twinkle-delay: 2s;
}

.footer-star-6 {
    top: 35%;
    left: 75%;
    --twinkle-duration: 4.2s;
    --twinkle-delay: 2.5s;
}

.constellation-line {
    position: absolute;
    background: linear-gradient(90deg, 
        rgba(146, 110, 204, 0) 0%, 
        rgba(146, 110, 204, 0.3) 50%, 
        rgba(146, 110, 204, 0) 100%);
    height: 1px;
    transform-origin: left center;
    animation: constellationFade 5s infinite alternate;
}

.line-1 {
    width: 15rem;
    top: 15%;
    left: 10%;
    transform: rotate(30deg);
    animation-delay: 0s;
}

.line-2 {
    width: 10rem;
    top: 25%;
    left: 35%;
    transform: rotate(-15deg);
    animation-delay: 1s;
}

.line-3 {
    width: 12rem;
    top: 10%;
    left: 65%;
    transform: rotate(45deg);
    animation-delay: 2s;
}

.line-4 {
    width: 8rem;
    top: 30%;
    left: 25%;
    transform: rotate(60deg);
    animation-delay: 3s;
}

@keyframes constellationFade {
    0% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

/* Back to Top Button */
.back-to-top-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.back-to-top {
    position: relative;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #706d9c, #926ecc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        0 0 0 5px rgba(146, 110, 204, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    border-radius: 50%;
}

.back-to-top svg {
    width: 2.4rem;
    height: 2.4rem;
    fill: white;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.orbit-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    animation: rotateSlow 12s linear infinite;
}

.orbit-circle::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 0 8px rgba(146, 110, 204, 0.2);
}

.back-to-top:hover svg {
    transform: translateY(-3px);
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Main Footer Content */
.footer-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Brand Column */
.brand-column {
    flex: 1;
    min-width: 25rem;
}

.footer-logo {
    margin-bottom: 2rem;
    max-width: 18rem;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

.footer-tagline {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
}

.footer-license {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.license-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-pill);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.license-badge svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: rgba(146, 110, 204, 0.8);
}

.license-badge span {
    font-size: 1.3rem;
    font-weight: var(--weight-medium);
    color: rgba(255, 255, 255, 0.9);
}

/* Footer Navigation */
.footer-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    flex: 2;
}

.footer-column {
    flex: 1;
    min-width: 16rem;
}

.footer-heading {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 4rem;
    height: 2px;
    background: linear-gradient(90deg, rgba(146, 110, 204, 1), rgba(146, 110, 204, 0));
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    transition: all var(--transition-medium);
    position: relative;
    display: inline-block;
    padding-left: 1.5rem;
}

.footer-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background: linear-gradient(135deg, rgba(146, 110, 204, 0.5), rgba(112, 109, 156, 0.5));
    border-radius: 50%;
    transition: all var(--transition-medium);
}

.footer-links a:hover {
    color: white;
    transform: translateX(3px);
}

.footer-links a:hover::before {
    background: linear-gradient(135deg, rgba(146, 110, 204, 1), rgba(112, 109, 156, 1));
    box-shadow: 0 0 8px 2px rgba(146, 110, 204, 0.3);
}

/* Contact Column */
.contact-column {
    flex: 1;
    min-width: 20rem;
}

.contact-info {
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item svg {
    width: 2rem;
    height: 2rem;
    fill: rgba(146, 110, 204, 0.8);
}

.contact-item a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: all var(--transition-medium);
}

.contact-item a:hover {
    color: white;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--main-gradient);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 1;
}

.social-link svg {
    width: 2.2rem;
    height: 2.2rem;
    fill: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
    transition: all var(--transition-medium);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover svg {
    fill: white;
    transform: scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
    transition: color var(--transition-medium);
}

.footer-legal-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
}

.copyright p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.legal-disclaimer {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 80rem;
    margin: 0 auto;
}

/* Quick Action Tools */
.quick-action-tools {
    position: fixed;
    bottom: 9rem; /* Increased to avoid overlap with the new chat button */
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.quick-action-button {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--main-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-medium);
    position: relative;
}

.quick-action-button svg {
    width: 2.4rem;
    height: 2.4rem;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.quick-action-button:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.tool-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 0.8rem 1.2rem;
    background: var(--main-gradient);
    color: white;
    font-size: 1.4rem;
    border-radius: var(--border-radius-md);
    margin-right: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.tool-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.8rem;
    transform: translateY(-50%);
    border-width: 0.8rem 0 0.8rem 0.8rem;
    border-style: solid;
    border-color: transparent transparent transparent #926ecc;
}

.quick-action-button:hover .tool-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .footer-content {
        gap: 3rem;
    }
    
    .footer-navigation {
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
        gap: 4rem;
    }
    
    .brand-column, .contact-column {
        max-width: 100%;
    }
    
    .footer-navigation {
        width: 100%;
    }
    
    .footer-environment {
        height: 30%;
    }
}

@media (max-width: 768px) {
    .immersive-footer {
        padding-top: 6rem;
    }
    
    .footer-navigation {
        flex-direction: column;
        gap: 3rem;
    }
    
    .footer-column {
        width: 100%;
    }
    
    .footer-legal-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .quick-action-tools {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .quick-action-button {
        width: 4.5rem;
        height: 4.5rem;
    }
}

@media (max-width: 576px) {
    .back-to-top-wrapper {
        display: none;
    }
    
    .footer-license {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quick-action-tools {
        flex-direction: row;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}