/* =====================================================
   MODERN FOOTER STYLES
   Externalized from footer.jsp for browser caching.
   Uses CSS variables from site-vars.css.jspf.
   ===================================================== */

/* CSS Custom Properties for theming - reference site-wide vars */
:root {
    --footer-bg: #f8f8f8;
    --footer-bg-bottom: #f0f0f0;
    --footer-orange: var(--site-primary);
    --footer-purple: var(--site-secondary);
    --footer-text: #333333;
    --footer-text-muted: #666666;
    --footer-border: rgba(0, 0, 0, 0.08);
    /* Dark mode footer link color - may be overridden by site-vars.css.jspf via html.dark-mode
       when the site's primary color is too dark to read on a dark background */
    --footer-link-dm: var(--footer-orange);
}

/* Dark mode overrides */
html.dark-mode .site-footer {
    background: var(--dm-bg-primary, var(--footer-purple)) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border-top-color: var(--footer-orange);
}

html.dark-mode .site-footer::before {
    background: var(--footer-orange);
}

html.dark-mode .site-footer .footer-logo-text {
    color: rgba(255, 255, 255, 0.95);
}

html.dark-mode .site-footer .footer-tagline {
    color: rgba(255, 255, 255, 0.92) !important;
}

html.dark-mode .site-footer .footer-nav h4 {
    color: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--footer-orange);
}

html.dark-mode .site-footer .footer-nav a,
html.dark-mode .site-footer .footer-nav a:visited {
    color: var(--footer-link-dm) !important;
}

html.dark-mode .site-footer .footer-nav a:hover,
html.dark-mode .site-footer .footer-nav a:focus {
    color: rgba(255, 255, 255, 0.95) !important;
}

html.dark-mode .site-footer .footer-bottom {
    background: rgba(0, 0, 0, 0.18);
    border-top-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .site-footer .footer-copyright {
    color: rgba(255, 255, 255, 0.72);
}

html.dark-mode .site-footer .footer-copyright a,
html.dark-mode .site-footer .footer-copyright a:visited {
    color: var(--footer-link-dm) !important;
}

html.dark-mode .site-footer .footer-copyright a:hover,
html.dark-mode .site-footer .footer-copyright a:focus {
    color: rgba(255, 255, 255, 0.95) !important;
}

html.dark-mode .site-footer .footer-legal a,
html.dark-mode .site-footer .footer-legal a:visited {
    color: rgba(255, 255, 255, 0.72) !important;
}

html.dark-mode .site-footer .footer-legal a:hover,
html.dark-mode .site-footer .footer-legal a:focus {
    color: var(--footer-orange) !important;
}

html.dark-mode .site-footer .social-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.82);
}

html.dark-mode .site-footer .social-link:hover {
    background: var(--footer-orange);
    border-color: var(--footer-orange);
    color: #ffffff;
}

/* Reset old footer styles */
.site-footer .quick-links-list,
.site-footer .quick-links-list li,
.site-footer .quick-links-list li a {
    background: none;
    background-color: transparent;
    background-image: none;
}

.site-footer .quick-links-list li::after,
.site-footer .quick-links-list li::before {
    content: none !important;
    display: none !important;
}

/* Main Footer Container */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 0;
    margin-top: 40px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--footer-purple);
    white-space: normal !important;
}

.site-footer * {
    white-space: normal;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--footer-orange);
}

/* Footer Content Wrapper (1280px = content width; padding outside) */
.footer-content {
    box-sizing: content-box;
    max-width: 1280px;
    margin: 0 auto;
    padding: 45px 30px 25px;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 35px;
    justify-content: space-evenly;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Brand Section */
.footer-brand {
    text-align: center !important;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 18px;
    text-decoration: none;
}

.footer-logo:hover {
    text-decoration: none;
}

.footer-logo-shield {
    width: 65px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center center;
}

.footer-logo:hover .footer-logo-shield {
    transform: scale(2.5);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.footer-logo-text {
    font-family: 'Graduate', cursive;
    font-size: 32px;
    color: var(--footer-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.footer-tagline {
    color: var(--footer-text-muted) !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 22px !important;
    max-width: 280px !important;
    width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
}

.site-footer .footer-tagline,
.site-footer p.footer-tagline {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 280px !important;
    width: 280px !important;
}

/* Social Icons */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--color-bg-surface);
    border: 2px solid var(--footer-border);
    border-radius: 10px;
    color: var(--footer-orange);
    text-decoration: none;
    transition: all 0.25s ease;
}

.social-link:hover {
    background: var(--footer-orange);
    border-color: var(--footer-orange);
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(233, 111, 38, 0.35);
}

.social-link:hover svg {
    color: white !important;
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--footer-orange) !important;
}

/* Footer Navigation */
.footer-nav {
    text-align: center;
}

.footer-nav h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--footer-purple);
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--footer-orange);
    display: inline-block;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav li::after,
.footer-nav li::before {
    display: none !important;
    content: none !important;
}

.footer-nav a,
.footer-nav a:visited {
    color: var(--footer-orange) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 4px 0 !important;
    background: none !important;
    position: relative;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: var(--footer-purple) !important;
    text-decoration: none !important;
    background: none !important;
}

.footer-nav a .nav-icon {
    display: none;
}

/* Animated Underline - Grow from Center */
.footer-nav a:not(.footer-cta)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--footer-purple), var(--footer-orange));
    transition: width 0.3s ease, left 0.3s ease;
}

.footer-nav a:not(.footer-cta):hover::after,
.footer-nav a:not(.footer-cta):focus::after {
    width: 100%;
    left: 0;
}

/* Quick Links - Pill Button Style */
.footer-quick-links h4 {
    display: block;
    margin-bottom: 16px;
}

.footer-quick-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.footer-quick-links li {
    margin: 0;
    display: inline-block;
}

.footer-quick-links li::after,
.footer-quick-links li::before {
    display: none !important;
    content: none !important;
}

.footer-quick-links .quick-links-list li a,
.footer-quick-links .quick-links-list li a:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 18px !important;
    background: var(--footer-orange) !important;
    border: none !important;
    border-radius: 25px !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.footer-quick-links .quick-links-list li a:hover,
.footer-quick-links .quick-links-list li a:focus {
    background: var(--footer-purple) !important;
    color: #fff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.footer-quick-links .quick-links-list li a svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    fill: #fff !important;
}

/* Upgrade CTA Button */
.site-footer .footer-cta,
.site-footer .footer-cta:visited,
.site-footer .footer-nav .footer-cta,
.site-footer .footer-nav .footer-cta:visited,
.site-footer .footer-nav ul li a.footer-cta,
.site-footer .footer-nav ul li a.footer-cta:visited,
a.footer-cta,
a.footer-cta:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: var(--footer-orange) !important;
    background-color: var(--footer-orange) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 25px !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(233, 111, 38, 0.3) !important;
    margin-top: 8px !important;
    text-decoration: none !important;
}

.site-footer .footer-cta:hover,
.site-footer .footer-cta:focus,
.site-footer .footer-nav .footer-cta:hover,
.site-footer .footer-nav ul li a.footer-cta:hover,
a.footer-cta:hover,
a.footer-cta:focus {
    transform: translateY(-3px) scale(1.08) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 0, 0, 0.2) !important;
    background: var(--footer-purple) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.site-footer .footer-cta svg,
.footer-cta svg,
a.footer-cta svg {
    width: 14px !important;
    height: 14px !important;
    fill: #fff !important;
}

/* Footer Bottom Bar */
.footer-bottom {
    background: var(--footer-bg-bottom);
    margin: 0 -30px -25px -30px;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid var(--footer-border);
}

.footer-copyright {
    color: var(--footer-text-muted);
    font-size: 13px;
}

.footer-copyright a,
.footer-copyright a:visited {
    color: var(--footer-orange) !important;
    text-decoration: none;
    font-weight: 500;
    background: none !important;
    padding: 0 !important;
}

.footer-copyright a:hover {
    color: var(--footer-purple) !important;
    text-decoration: underline !important;
    background: none !important;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a,
.footer-legal a:visited {
    color: var(--footer-text-muted) !important;
    font-size: 13px;
    text-decoration: none !important;
    transition: color 0.2s ease;
    background: none !important;
    padding: 0 !important;
}

.footer-legal a:hover {
    color: var(--footer-orange) !important;
    background: none !important;
}

/* UPGRADE Button in Footer Bottom */
.footer-upgrade-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 0, 0, 0.2) !important;
    background: var(--footer-purple) !important;
}

/* Partner Badge */
.footer-partner {
    text-align: center;
    padding: 15px 30px;
    margin: 0 -30px;
    background: var(--footer-purple);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.footer-partner a {
    color: white !important;
    font-weight: 600;
    background: none !important;
    padding: 0 !important;
}

.footer-partner a:hover {
    color: var(--footer-orange) !important;
    text-decoration: underline !important;
    background: none !important;
}

/* Mobile Toggle Link */
.mobile-toggle {
    display: inline-block !important;
    background: none !important;
    border: none !important;
    padding: 4px 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--footer-orange) !important;
    transition: all 0.2s ease;
}

.mobile-toggle:hover {
    color: var(--footer-purple) !important;
    background: none !important;
    text-decoration: none !important;
}

.mobile-toggle svg {
    display: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        grid-column: span 2;
        text-align: center;
        padding-right: 0;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-tagline {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-nav h4 {
        display: block;
    }
}

@media (max-width: 640px) {
    .footer-content {
        padding: 35px 20px 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-logo-text {
        font-size: 26px;
    }
    
    .footer-nav h4 {
        margin-bottom: 14px;
    }
    
    .footer-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 18px;
    }
    
    .footer-nav li {
        margin-bottom: 0;
    }
    
    .footer-nav a:hover {
        padding-left: 0 !important;
    }
    
    .footer-nav a .nav-icon {
        display: none;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        margin: 0 -20px -20px -20px;
        padding: 18px 20px;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .footer-partner {
        margin: 0 -20px;
        padding: 12px 20px;
    }
}

/* Hide legacy footer */
footer:not(.site-footer) {
    display: none !important;
}
