/* --- CSS Variables (with fallbacks) --- */
:root {
    --bg-dark: #0a0a0a;
    --text-white: #ffffff;
    --text-grey: rgba(255, 255, 255, 0.6);
    --brand-purple: #8330c2;
    --brand-red: #FF4438;
}

/* --- FOOTER CONTAINER --- */
.ultra-footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    position: relative;
    padding: 100px 40px 50px;
    overflow: hidden;
    z-index: 1;
    font-family: 'Montserrat', sans-serif; 
    -webkit-font-smoothing: antialiased;
    text-align: left; /* Ensure text alignment reset */
}

/* The Ambient Glow Effect */
.glow-orb {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(131, 48, 194, 0.15) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(60px);
    opacity: 0.8;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* --- TOP SECTION: GRID LAYOUT --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

/* Brand Column */
.col-brand {
    padding-right: 40px;
}

.brand-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: -5px;
}

.brand-tagline {
    font-size: 16px; 
    font-weight: 500;
    line-height: 1.3;
    background: linear-gradient(90deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
    display: block;
    max-width: 300px;
}

/* Link Columns */
.col-links h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Premium Link Hover Animation */
.footer-link {
    color: var(--text-grey);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    width: fit-content;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--brand-purple);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.footer-link:hover {
    color: #fff;
}

.footer-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- BOTTOM BAR --- */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* Combined Legal Wrapper */
.legal-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Partner Logos Group */
.partner-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 15px;
}

.scotland-badge {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.05em;
    text-decoration: none;
    transition: opacity 0.3s ease;
}
.scotland-badge:hover { opacity: 0.8; }
.scotland-badge .s-white { color: #fff; }
.scotland-badge .s-red { color: var(--brand-red); }

.ceed-logo {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}
.ceed-logo:hover { opacity: 0.8; }
.ceed-logo img {
    height: 24px; 
    width: auto;
    filter: brightness(0) invert(1); 
}

.legal-link {
    color: var(--text-grey);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.legal-link:hover {
    color: #fff;
    text-decoration: underline;
}

.legal-email {
    color: #fff; 
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.legal-email:hover {
    color: var(--brand-purple);
}

.divider {
    color: rgba(255,255,255,0.1);
    font-size: 14px;
    margin: 0 2px;
    user-select: none;
}

/* Social Icons */
.social-group {
    display: flex;
    gap: 16px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid transparent;
    text-decoration: none;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-btn:hover {
    background: var(--brand-purple);
    color: #ffffff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(131, 48, 194, 0.5);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }
    .col-brand {
        grid-column: span 2;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .ultra-footer {
        padding: 60px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 60px;
    }
    .col-brand { grid-column: span 1; padding-right: 0; }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .legal-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .partner-group {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .divider { display: none; }
    
    .social-group {
        margin-top: 20px;
        width: 100%;
        justify-content: flex-start;
    }
}

