/**
 * Shared footer: premium dark gradient, grid headings, legal pills, social row.
 * Load after tokens + header-premium (if any), before site-responsive.css.
 */

/* Premium Footer Enhancements */
footer {
    background: linear-gradient(135deg, #001205 0%, #002b12 100%) !important;
    border-top: 1px solid rgba(167, 243, 208, 0.15) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 243, 208, 0.5), transparent);
}

.footer-logo img {
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 0 auto 10px !important;
    object-fit: contain;
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    transition: transform 0.4s ease;
}

.footer-logo {
    display: inline-block !important;
    text-align: center;
    text-decoration: none !important;
}

/* Keep footer branding identical on all pages */
.footer-logo > div {
    display: none !important;
}

.footer-logo:hover img {
    transform: scale(1.05);
}

.footer-grid h4 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

.footer-grid {
    grid-template-columns: minmax(170px, 0.9fr) minmax(260px, 1.5fr) minmax(180px, 1fr) minmax(180px, 1fr) !important;
    align-items: start;
    gap: 34px !important;
}

.footer-grid > div:first-child {
    display: flex;
    justify-content: flex-start;
}

.footer-grid h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-green, #007305);
    border-radius: 2px;
}

.footer-grid ul li {
    margin-bottom: 15px;
    color: #9ba39e;
    transition: all 0.3s ease;
}

.footer-grid ul li a {
    color: #9ba39e;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-grid ul li a i {
    margin-right: 10px;
    font-size: 0.85rem;
    color: var(--primary-green, #007305);
    transition: transform 0.3s ease;
}

.footer-grid ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.footer-grid ul li a:hover i {
    transform: translateX(3px);
}

.horizontal-legal-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, max-content));
    justify-content: center;
    gap: 12px 14px;
    margin-top: 20px;
    margin-bottom: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 22px 0;
}

.horizontal-legal-links a {
    color: #e5f9f0;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(167, 243, 208, 0.4);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    min-height: 42px;
    text-align: center;
    white-space: nowrap;
}

.horizontal-legal-links a i {
    font-size: 0.85rem;
    color: #a7f3d0;
}

.horizontal-legal-links a:hover {
    background: rgba(12, 148, 136, 0.95);
    border-color: transparent;
    color: #022c22;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .horizontal-legal-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .horizontal-legal-links a {
        width: 100%;
        min-width: 0;
        white-space: normal;
        line-height: 1.25;
    }
}

.legal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #8c9690;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .legal-footer {
        flex-direction: column;
        gap: 15px;
    }
}

.legal-footer-links a {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.legal-footer-links a:hover {
    background: var(--primary-green, #007305);
    transform: translateY(-3px);
}

.disclaimer-text {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* how-to-enroll.html: text links + underline (not pills) */
footer.footer--legal-text-links .horizontal-legal-links a {
    color: #8c9690;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: inline-block;
}

footer.footer--legal-text-links .horizontal-legal-links a:hover {
    color: #a7f3d0;
    transform: none;
    box-shadow: none;
}

footer.footer--legal-text-links .horizontal-legal-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0%;
    height: 1px;
    background: #a7f3d0;
    transition: width 0.3s ease;
}

footer.footer--legal-text-links .horizontal-legal-links a:hover::after {
    width: 100%;
}
