/* =====================================================
   Sea Width — Universal Footer Styles
   Shared across seawidth.com, *.seawidth.com, seawidth.ai
   ===================================================== */

/* ---- CSS Variables (scoped to .sw-footer to avoid conflicts) ---- */
.sw-footer {
    --sw-dark:      #1a1f35;
    --sw-gray-800:  #334155;
    --sw-gray-600:  #64748b;
    --sw-gray-500:  #94a3b8;
    --sw-gray-400:  #cbd5e1;
    --sw-gray-200:  #f1f5f9;
    --sw-white:     #ffffff;
    --sw-primary:   #2563eb;
    --sw-radius:    0.5rem;
    --sw-radius-sm: 0.375rem;
    --sw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Footer Shell ---- */
.sw-footer {
    background-color: var(--sw-dark);
    color: var(--sw-gray-400);
    padding: 4rem 1.5rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    box-sizing: border-box;
}

.sw-footer *, .sw-footer *::before, .sw-footer *::after {
    box-sizing: border-box;
}

.sw-footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Footer Grid ---- */
.sw-footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* ---- Brand Column ---- */
.sw-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sw-white);
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.sw-footer-logo img {
    border-radius: var(--sw-radius-sm);
    width: 32px;
    height: 32px;
}

.sw-footer-logo svg {
    flex-shrink: 0;
}

.sw-footer-description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--sw-gray-400);
    font-size: 0.9rem;
}

/* ---- Social Links ---- */
.sw-social-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw-social-links a {
    width: 40px;
    height: 40px;
    border-radius: var(--sw-radius);
    background-color: var(--sw-gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sw-gray-400);
    transition: var(--sw-transition);
    text-decoration: none;
}

.sw-social-links a:hover {
    background-color: var(--sw-primary);
    color: var(--sw-white);
}

/* ---- Link Columns ---- */
.sw-footer-section h4 {
    color: var(--sw-white);
    margin: 0 0 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

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

.sw-footer-nav li {
    margin-bottom: 0.5rem;
}

.sw-footer-nav a {
    color: var(--sw-gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--sw-transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

.sw-footer-nav a:hover,
.sw-footer-nav button:hover {
    color: var(--sw-white);
}

.sw-footer-nav button {
    color: var(--sw-gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--sw-transition);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.sw-footer-nav button:hover {
    color: var(--sw-white);
}

/* ---- Footer Bottom Bar ---- */
.sw-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--sw-gray-800);
    font-size: 0.875rem;
    color: var(--sw-gray-500);
}

.sw-footer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sw-gray-500);
}

/* ---- Legal Modals ---- */
.sw-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: sw-fadeIn 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.sw-modal.active {
    display: flex;
}

@keyframes sw-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sw-modal-content {
    background-color: var(--sw-white);
    border-radius: 1rem;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: sw-slideUp 0.3s ease;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.7;
}

@keyframes sw-slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sw-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--sw-radius);
    transition: var(--sw-transition);
    touch-action: manipulation;
    z-index: 10;
    line-height: 1;
}

.sw-modal-close:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.sw-modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.sw-modal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.5rem;
}

.sw-modal-content p {
    margin: 0 0 1rem;
}

.sw-modal-content ul {
    padding-left: 1.5rem;
    margin: 0 0 1rem;
}

.sw-modal-content li {
    margin-bottom: 0.4rem;
}

.sw-modal-updated {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 1.5rem !important;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sw-footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .sw-footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .sw-footer {
        padding: 3rem 1.5rem 1.5rem;
    }
    .sw-footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .sw-footer-section:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }
    .sw-footer-logo {
        justify-content: center;
    }
    .sw-social-links {
        justify-content: center;
    }
    .sw-footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .sw-modal-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .sw-footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    .sw-footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sw-footer-section:first-child {
        grid-column: 1;
        text-align: center;
    }
    .sw-footer-section {
        text-align: center;
    }
    .sw-footer-logo {
        justify-content: center;
        font-size: 1rem;
    }
    .sw-footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.78rem;
    }
    .sw-modal-content {
        padding: 1.5rem 1rem;
    }
    .sw-modal-content h2 {
        font-size: 1.25rem;
        padding-right: 2rem;
    }
}
