/* ============================================================================
   SkillsPassport - MODULAR FOOTER (Dark Variant)
   ============================================================================ */

/* DARK FOOTER CONTAINER */
.sp-footer-dark {
    background-color: #2d2d2d;
    color: #ffffff;
    padding: 60px 0 20px;
    /* Top padding 60px, Bottom 20px */
    font-family: 'Open Sans', sans-serif;
    /* Fallback */
    margin-top: auto;
    /* Push to bottom if flex container */
    width: 100%;
    box-sizing: border-box;
}

.sp-footer-dark .sp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* GRID LAYOUT (4 Columns) */
.sp-footer-dark-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    /* Brand wider */
    gap: 40px;
    margin-bottom: 60px;
}

/* RESPONSIVE: Stack on Mobile/Tablet */
@media (max-width: 900px) {
    .sp-footer-dark-grid {
        grid-template-columns: 1fr 1fr;
        /* 2x2 */
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .sp-footer-dark-grid {
        grid-template-columns: 1fr;
        /* 1 Column */
        gap: 40px;
    }
}

/* 1. BRAND SECTION */
.sp-footer-dark-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sp-footer-dark-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.sp-footer-dark-logo img {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    object-fit: cover;
    padding: 0 !important;
    margin: 0 !important;
}

.sp-footer-dark-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.sp-footer-dark-desc {
    color: #9ca3af;
    /* Gray-400 */
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
}

.sp-footer-dark-social {
    display: flex;
    gap: 12px;
}

.sp-footer-dark-social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sp-footer-dark-social-icon:hover {
    background: #ffffff;
    color: #2d2d2d;
    transform: translateY(-2px);
}

/* 2. LINKS SECTIONS (Products, Resources) */
.sp-footer-dark-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    display: block;
}

.sp-footer-dark-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-footer-dark-link {
    margin-bottom: 12px;
}

.sp-footer-dark-link a {
    color: #9ca3af;
    /* Gray-400 */
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.sp-footer-dark-link a:hover {
    color: #ffffff;
    transform: translateX(4px);
    /* Slight slide on hover */
}

/* 3. CONTACT SECTION */
.sp-footer-dark-contact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #9ca3af;
    font-size: 0.95rem;
}

.sp-footer-dark-contact i {
    color: #DC2626;
    /* Brand Red */
    margin-top: 4px;
    /* Align with first line of text */
    width: 16px;
    text-align: center;
}

.sp-footer-dark-contact a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.sp-footer-dark-contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* 4. BOTTOM BAR */
.sp-footer-dark-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Stack on mobile */
    gap: 16px;
    margin-top: 40px;
    /* Space from grid */
}

.sp-footer-dark-copyright {
    color: #6b7280;
    /* Gray-500 */
    font-size: 0.9rem;
}

.sp-footer-dark-legal {
    display: flex;
    gap: 24px;
}

.sp-footer-dark-legal a {
    color: #6b7280;
    /* Gray-500 */
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.sp-footer-dark-legal a:hover {
    color: #ffffff;
}

@media (max-width: 600px) {
    .sp-footer-dark-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .sp-footer-dark-legal {
        gap: 16px;
        justify-content: center;
    }
}

/* ============================================================================
   MODALS & LEGAL CONTENT
   ============================================================================ */

.sp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.sp-modal-overlay.active {
    display: flex;
}

.sp-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: spModalSlideUp 0.3s ease-out;
}

.sp-legal-modal {
    max-width: 1400px;
    /* Increased from 1140px for wider desktop view */
    width: 95%;
}

@keyframes spModalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sp-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sp-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-modal-header h3 i {
    color: #DC2626;
}

.sp-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
    line-height: 1;
}

.sp-modal-close:hover {
    color: #64748b;
}

.sp-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: #475569;
    line-height: 1.6;
}

.sp-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* Loading Spinner */
.sp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
}

.sp-loading i {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Legal Content Styles (Generic) */
.sp-modal-body h1,
.sp-modal-body h2 {
    color: #1e293b;
    margin-top: 24px;
    margin-bottom: 12px;
}

.sp-modal-body p {
    margin-bottom: 16px;
}

.sp-modal-body ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.sp-modal-body li {
    margin-bottom: 8px;
}

/* Alert in Modal */
.sp-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
}

/* Button styles for modularity */
.sp-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sp-btn-primary {
    background: #DC2626;
    color: white;
}

.sp-btn-primary:hover {
    background: #B91C1C;
}

.sp-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.sp-btn-secondary:hover {
    background: #e2e8f0;
}