/* ═══════════════════════════════════════════════
   SHARED LAYOUT CSS — Header + Footer styling
   Used by layout.js across all pages.
   ═══════════════════════════════════════════════ */

/* ─── Maintenance Banner ─── */
.maintenance-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #fff8e1, #fff3cd, #fff8e1);
    background-size: 200% 100%;
    animation: banner-shimmer 6s ease infinite;
    border-bottom: 1px solid #f0d78c;
    font-size: 13px;
    font-weight: 500;
    color: #7a6520;
    letter-spacing: 0.01em;
    text-align: center;
}

.maintenance-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e6a700;
    flex-shrink: 0;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(230, 167, 0, 0.5);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 4px rgba(230, 167, 0, 0);
    }
}

@keyframes banner-shimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ─── Header ─── */
.layout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    background: #fffefa;
    border-bottom: 1px solid #e8e4de;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-brand .logo {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: #2d2a26;
    text-decoration: none;
}

.header-brand .mark {
    color: #558b2f;
}

.header-nav {
    display: flex;
    gap: 28px;
}

.header-nav .nav-link {
    font-size: 14px;
    color: #8a857d;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.header-nav .nav-link:hover {
    color: #2d2a26;
}

.header-nav .nav-link.active {
    color: #2d2a26;
    font-weight: 600;
}

.header-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    right: 0;
    height: 2px;
    background: #558b2f;
    border-radius: 1px;
}

/* ─── Nav Dropdown ─── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 200px;
    background: #fffefa;
    border: 1px solid #e8e4de;
    border-radius: 10px;
    box-shadow: 0 8px 32px hsla(220, 20%, 16%, 0.1);
    padding: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    color: #8a857d;
    font-weight: 500;
    text-decoration: none;
    border-radius: 7px;
    transition: background 150ms, color 150ms;
}

.dropdown-item:hover {
    background: hsl(35, 40%, 95%);
    color: #2d2a26;
}

.dropdown-item.active {
    color: #2d2a26;
    font-weight: 600;
    background: hsl(35, 40%, 93%);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pro-key,
.btn-credits {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    font-family: inherit;
}

.btn-pro-key {
    background: #7c3aed;
    color: #fff;
}

.btn-pro-key:hover {
    background: #6d28d9;
    color: #fff;
    transform: translateY(-1px);
}

.btn-credits {
    background: #558b2f;
    color: #fff;
}

.btn-credits:hover {
    background: #4a7a28;
    color: #fff;
    transform: translateY(-1px);
}

.btn-signin {
    background: #2d2a26;
    color: #fff;
}

.btn-signin:hover {
    background: #1a1815;
    color: #fff;
    transform: translateY(-1px);
}

/* ─── Footer ─── */
.layout-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    border-top: 1px solid #e8e4de;
    background: #fffefa;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-center {
    text-align: center;
}

.ai-disclaimer {
    font-size: 11px;
    color: #b0a99f;
    font-style: italic;
    letter-spacing: 0.01em;
}

.footer-brand {
    font-weight: 700;
    font-size: 14px;
    color: #2d2a26;
}

.footer-tagline {
    font-size: 12px;
    color: #9e9890;
    font-family: 'SFMono-Regular', 'Consolas', monospace;
    letter-spacing: 0.04em;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.footer-links a {
    color: #8a857d;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #2d2a26;
}

.footer-links .sep {
    color: #ccc;
}

/* ─── Hamburger Button ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 150ms;
}

.hamburger:hover {
    background: hsl(35, 40%, 93%);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #2d2a26;
    border-radius: 2px;
    transition: all 250ms ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.layout-header.mobile-open .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.layout-header.mobile-open .hamburger span:nth-child(2) {
    opacity: 0;
}

.layout-header.mobile-open .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Header Collapse Container ─── */
.header-collapse {
    display: contents;
}

/* ─── Responsive ─── */
@media (max-width: 800px) {
    .layout-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 0;
    }

    .hamburger {
        display: flex;
    }

    .header-collapse {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid #e8e4de;
        margin-top: 12px;
    }

    .layout-header.mobile-open .header-collapse {
        display: flex;
    }

    .header-nav {
        flex-direction: column;
        gap: 2px;
    }

    .header-nav .nav-link {
        display: block;
        padding: 12px 14px;
        border-radius: 8px;
        font-size: 15px;
        transition: background 150ms;
    }

    .header-nav .nav-link:hover {
        background: hsl(35, 40%, 95%);
    }

    .header-nav .nav-link.active::after {
        display: none;
    }

    /* Nav CTA full-width on mobile */
    .nav-link.nav-cta {
        text-align: center;
        margin: 4px 0 8px;
        padding: 12px 16px !important;
    }

    /* Dropdown becomes inline on mobile */
    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        background: hsl(35, 40%, 96%);
        border-radius: 8px;
        margin: 2px 0 2px 14px;
        padding: 4px;
        min-width: 0;
    }

    .dropdown-item {
        padding: 10px 14px;
    }

    .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid #e8e4de;
        margin-top: 8px;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        font-size: 13px;
        padding: 10px 12px;
    }

    .layout-footer {
        padding: 20px 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 4px;
    }

    .footer-center {
        order: 3;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 6px;
    }

    .maintenance-banner {
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* ─── Page wrapper flex for sticky footer ─── */
.saas-app,
.projects-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.saas-app>#shared-footer,
.projects-app>#shared-footer {
    margin-top: auto;
}
/* ─── Nav CTA Button ─── */
.nav-link.nav-cta {
    background: linear-gradient(135deg, #558b2f, #43a047);
    color: #fff !important;
    padding: 7px 16px !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 200ms ease;
    text-decoration: none;
}

.nav-link.nav-cta:hover {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(85, 139, 47, 0.3);
}
