/*--------------------------------------------------------------
# AuthorPro Footer Architecture
# Description: Pure Vanilla CSS for Multi-Column Footer Widgets,
#              Responsive Widget Grid, Copyright Bar, and Back to Top
--------------------------------------------------------------*/

/* =============================================================
   1. Footer Container & Backgrounds
   ============================================================= */
.authorpro-site-footer,
.authorpro-footer,
footer.site-footer,
#colophon {
    width: 100%;
    background-color: var(--authorpro-color-white);
    border-top: 1px solid var(--authorpro-color-slate-200);
    padding-bottom: 2rem;
    position: relative;
    z-index: 10;
    transition: background-color var(--authorpro-transition-base), border-color var(--authorpro-transition-base);
}

.authorpro-footer-wrapper {
    padding-top: 4rem;
}

.authorpro-footer-wrapper.authorpro-footer-no-widgets {
    padding-top: 2rem;
}

/* =============================================================
   2. Footer Widget Grid (1 to 4 Columns Responsive)
   ============================================================= */
.authorpro-footer-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .authorpro-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .authorpro-footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Auto-adapt when fewer widget areas are active */
    .authorpro-footer-grid.cols-1 {
        grid-template-columns: 1fr;
    }

    .authorpro-footer-grid.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .authorpro-footer-grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .authorpro-footer-grid.cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.authorpro-footer-col,
.authorpro-footer-widget-col,
.footer-widget-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* =============================================================
   3. Footer Widgets Styling
   ============================================================= */
.authorpro-footer-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.authorpro-footer-widget:last-child {
    margin-bottom: 0;
}

.authorpro-footer-widget-title,
.authorpro-footer-col h2,
.authorpro-footer-col h3,
.authorpro-footer-widget h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--authorpro-color-slate-900);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    margin-top: 0;
    line-height: 1.3;
}

.authorpro-footer-widget p {
    font-size: 0.875rem;
    color: var(--authorpro-color-slate-500);
    line-height: 1.6;
    margin: 0;
}

.authorpro-footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.authorpro-footer-widget li {
    font-size: 0.875rem;
    color: var(--authorpro-color-slate-500);
    margin: 0;
}

.authorpro-footer-widget a {
    color: var(--authorpro-color-slate-600);
    text-decoration: none;
    transition: color var(--authorpro-transition-base);
}

.authorpro-footer-widget a:hover {
    color: var(--authorpro-color-brand-600);
}

/* =============================================================
   4. Copyright & Bottom Bar
   ============================================================= */
.authorpro-footer-bottom,
.authorpro-copyright-bar {
    border-top: 1px solid var(--authorpro-color-slate-200);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .authorpro-footer-bottom,
    .authorpro-copyright-bar {
        flex-direction: row;
    }
}

.authorpro-footer-bottom.no-border,
.authorpro-copyright-bar.no-border {
    border-top: none;
    padding-top: 0;
}

.authorpro-copyright,
.authorpro-copyright-text {
    color: var(--authorpro-color-slate-500);
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}

@media (min-width: 768px) {
    .authorpro-copyright,
    .authorpro-copyright-text {
        text-align: left;
    }
}

.authorpro-powered-by,
.authorpro-footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--authorpro-color-slate-500);
}

.authorpro-powered-by a,
.authorpro-footer-credit a {
    font-weight: 700;
    color: var(--authorpro-color-slate-800);
    text-decoration: none;
    transition: color var(--authorpro-transition-base);
}

.authorpro-powered-by a:hover,
.authorpro-footer-credit a:hover {
    color: var(--authorpro-color-brand-600);
}

/* =============================================================
   5. Back to Top Button
   ============================================================= */
.authorpro-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--authorpro-radius-full);
    background-color: var(--authorpro-color-white);
    color: var(--authorpro-color-slate-700);
    border: 1px solid var(--authorpro-color-slate-200);
    box-shadow: var(--authorpro-shadow-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: all var(--authorpro-transition-base);
    text-decoration: none;
}

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

.authorpro-back-to-top:hover {
    background-color: var(--authorpro-color-brand-600);
    color: var(--authorpro-color-white);
    border-color: var(--authorpro-color-brand-600);
    box-shadow: var(--authorpro-shadow-xl);
    transform: translateY(-0.25rem);
}

.authorpro-back-to-top svg {
    width: 1.25rem;
    height: 1.25rem;
}
