/* ============================================
   CyberSec.Cast — Shared Layout Styles
   Header + Footer + Mobile Menu
   ============================================ */

:root {
    --bg-void: #07060f;
    --text-primary: #f0eeff;
    --text-secondary: #9b97c4;
    --indigo-500: #6366f1;
    --indigo-400: #818cf8;
    --indigo-300: #a5b4fc;
    --violet-600: #7c3aed;
    --violet-500: #8b5cf6;
    --violet-400: #a78bfa;
    --violet-300: #c4b5fd;
    --glow-indigo: 0 0 40px rgba(99,102,241,0.35);
}

/* ---- Header ---- */
.site-header {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 80;
    border-radius: 9999px;
    background: rgba(12, 11, 26, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.site-header:hover {
    background: rgba(12, 11, 26, 0.85);
    border-color: rgba(99, 102, 241, 0.35);
}

.site-header .header-logo img {
    height: 36px;
    filter: brightness(1.1);
    display: block;
}

/* ---- Nav ---- */
.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.2s;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--indigo-300);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}

/* ---- Header CTA button ---- */
.btn-header {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ---- Mobile menu button ---- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 4px;
    line-height: 1;
}

/* ---- Mobile drawer overlay ---- */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(4, 3, 12, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    width: min(320px, 88vw);
    background: rgba(10, 9, 24, 0.98);
    border-left: 1px solid rgba(99, 102, 241, 0.2);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.open {
    transform: translateX(0);
}

.mobile-nav-close {
    align-self: flex-end;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.mobile-nav-close:hover {
    color: var(--text-primary);
}

.mobile-nav-link {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Space Grotesk', sans-serif;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--indigo-300);
}

.mobile-nav-cta {
    display: block;
    margin-top: 12px;
    text-align: center;
    background: var(--violet-600);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    padding: 14px 24px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}

.mobile-nav-cta:hover {
    background: var(--violet-500);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
}

/* ---- Footer ---- */
.layout-footer {
    position: relative;
    background: var(--bg-void);
    overflow: hidden;
}

/* gradient top edge */
.layout-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.5) 30%,
        rgba(139, 92, 246, 0.6) 50%,
        rgba(99, 102, 241, 0.5) 70%,
        transparent 100%
    );
}

/* ambient glow blob */
.layout-footer::after {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at center,
        rgba(99, 102, 241, 0.12) 0%,
        rgba(139, 92, 246, 0.06) 40%,
        transparent 70%
    );
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100% - 48px));
    margin: 0 auto;
    padding: 72px 0 40px;
}

/* ---- Brand block (centered) ---- */
.footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 48px;
}

.footer-logo {
    height: 36px;
    filter: brightness(1.15);
    display: block;
    margin-bottom: 20px;
}

.footer-tagline {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(155, 151, 196, 0.7);
    margin: 0;
    line-height: 1.8;
}

/* ---- Divider ---- */
.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.07) 20%,
        rgba(255, 255, 255, 0.07) 80%,
        transparent 100%
    );
    margin-bottom: 40px;
}

/* ---- Nav links (centered horizontal row) ---- */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 48px;
}

.footer-nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(155, 151, 196, 0.75);
    text-decoration: none;
    padding: 7px 18px;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.footer-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.footer-nav-link.active {
    color: var(--indigo-300);
    background: rgba(99, 102, 241, 0.12);
}

/* ---- Bottom strip ---- */
.footer-bottom-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-social-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(155, 151, 196, 0.7);
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.footer-social-btn:hover {
    color: #fff;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.footer-social-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Newsletter */
.footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-newsletter-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(99, 102, 241, 0.8);
}

.footer-newsletter-form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.footer-newsletter-form:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.footer-newsletter-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    padding: 11px 20px;
    font-size: 13px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.footer-newsletter-input::placeholder {
    color: rgba(155, 151, 196, 0.5);
}

.footer-newsletter-btn {
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
    border: 0;
    padding: 0 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.footer-newsletter-btn:hover {
    background: var(--indigo-500);
}

.footer-newsletter-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Legal */
.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(155, 151, 196, 0.5);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: rgba(155, 151, 196, 0.9);
}

/* Copyright */
.footer-copyright {
    text-align: center;
    margin-top: 32px;
    color: rgba(155, 151, 196, 0.35);
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
    .footer-bottom-strip {
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 24px;
    }

    .footer-socials {
        justify-content: flex-start;
    }

    .footer-legal {
        justify-content: flex-end;
    }

    .footer-newsletter {
        align-items: center;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .btn-header {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .site-header {
        width: calc(100% - 24px);
        padding: 12px 16px;
    }
    .site-header .header-logo img {
        height: 30px;
    }
}
