/* ==========================================================================
   FOOTER STYLES - Flexible Multi-Column Layout
   ========================================================================== */

/* Main Footer */
.site-footer {
    background: var(--footer-bg, #ffffff);
    color: var(--footer-text, #6b7280);
    margin-top: 60px;
    border-top: 1px solid var(--footer-border, #e5e7eb);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Main Section */
.footer-main {
    padding: 50px 0 40px;
}

/* Dynamic Grid based on column count */
.footer-grid {
    display: grid;
    gap: 40px;
    align-items: start;
    grid-template-columns: repeat(3, 1fr); /* Default: 3 equal columns */
}

/* 2 Columns: Logo wider */
.site-footer.footer-cols-2 .footer-grid {
    grid-template-columns: 2fr 1fr;
}

/* 3 Columns: Logo wider, 2 equal columns */
.site-footer.footer-cols-3 .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
}

/* 4 Columns: Logo wider, 3 equal columns */
.site-footer.footer-cols-4 .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* Footer Columns */
.footer-column {
    min-width: 0;
}

/* Branding Column */
.footer-branding-column {
    text-align: left;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    max-width: 180px;
}

.footer-logo img {
    max-height: 60px;
    width: auto;
}

.footer-site-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--footer-heading, #1f2937);
    margin: 0;
}

.footer-site-name a {
    color: inherit;
    text-decoration: none;
}

.footer-site-name a:hover {
    color: var(--footer-link, #14b8a6);
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--footer-text, #6b7280);
    margin: 0;
    max-width: 350px;
}

/* Contact Info */
.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--footer-text, #6b7280);
}

.footer-contact-item .contact-icon {
    font-size: 1rem;
    min-width: 20px;
}

.footer-contact-item a {
    color: var(--footer-link, #14b8a6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-item a:hover {
    color: var(--footer-heading, #ffffff);
    text-decoration: underline;
}

/* Custom HTML Section */
.footer-custom-html {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--footer-text, #6b7280);
}

.footer-custom-html a {
    color: var(--footer-link, #14b8a6);
}


/* Column Title */
.footer-column-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--footer-heading, #1f2937);
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: var(--footer-link, #14b8a6);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-menu a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* HTML Content in Column */
.footer-html-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-html-content a {
    color: var(--footer-link, #14b8a6);
    text-decoration: none;
}

.footer-html-content a:hover {
    text-decoration: underline;
}

.footer-html-content ul,
.footer-html-content ol {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.footer-html-content li {
    margin-bottom: 8px;
}

/* Placeholder text */
.footer-placeholder {
    color: var(--footer-text);
    opacity: 0.6;
    font-style: italic;
}

/* Social Links Row */
.footer-social-row {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--footer-border, #374151);
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--footer-border, #374151);
    border-radius: 50%;
    color: var(--footer-text, #9ca3af);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: var(--footer-accent, #14b8a6);
    color: #ffffff;
    transform: translateY(-3px);
}

.footer-social-link svg {
    width: 18px;
    height: 18px;
}

/* Footer Bottom Bar */
.footer-bottom {
    background: var(--footer-accent, #14b8a6);
    color: #ffffff;
    padding: 20px 0;
}

.footer-bottom-content {
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    margin: 0 0 5px;
}

.footer-copyright a {
    color: #ffffff;
    text-decoration: underline;
}

.footer-disclaimer {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--footer-accent, #14b8a6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.arrow-up {
    font-size: 1.5em;
    line-height: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .footer-cols-4 .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-cols-4 .footer-branding-column {
        grid-column: 1 / -1;
    }
    
    .footer-cols-3 .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-cols-3 .footer-branding-column {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 40px;
    }
    
    .footer-main {
        padding: 40px 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .footer-branding-column {
        text-align: center;
    }
    
    .footer-branding {
        align-items: center;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .footer-logo {
        margin: 0 auto;
    }
    
    .footer-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .footer-menu li {
        margin-bottom: 0;
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
    
    .footer-disclaimer {
        font-size: 0.75rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-copyright,
    .footer-disclaimer {
        font-size: 0.75rem;
    }
    
    .footer-menu a {
        font-size: 0.875rem;
    }
    
    .footer-column-title {
        font-size: 0.9rem;
    }
}
