/* SiapNgeweb CRM — Public Header & Footer
   Loaded on all frontend pages (not dashboard, not auth). */

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface-color, #fff);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--duration-base) ease;
}
.site-header.scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    position: relative;
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}
.site-branding a {
    display: flex;
    align-items: center;
}
.site-branding .site-title {
    font-family: var(--heading-font);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    letter-spacing: -0.02em;
}
.site-branding .custom-logo-link img {
    max-height: 38px;
    width: auto;
}

/* Nav Menu */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.header-menu {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}
.header-menu li a {
    display: block;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.header-menu li a:hover,
.header-menu li.current-menu-item a,
.header-menu li.current_page_item a {
    color: var(--primary-hover);
    background: rgba(99, 102, 241, 0.06);
}

/* Header Right (CTA + Hamburger) */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

/* CTA Button */
.header-cta .btn {
    font-weight: 500;
}

/* Mobile-only elements — hidden on desktop */
.header-nav-cta,
.header-nav-logo,
.header-nav-close {
    display: none;
}

/* Hamburger */
.header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
}
.header-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--heading-color);
    border-radius: 2px;
    transition: all var(--duration-fast) ease;
}
.header-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.header-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.header-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   CLIENT LOGOS — above footer on all public pages
   ========================================================== */
.scrm-clients-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-color, #f9fafb);
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.scrm-clients-title {
    font-family: var(--heading-font);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}
.scrm-clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 8px;
    align-items: center;
}
.scrm-client-item {
    width: calc((100% - 48px) / 7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.scrm-client-item img {
    max-height: 72px;
    width: auto;
}
.scrm-client-name {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .scrm-client-item {
        width: calc((100% - 32px) / 5);
    }
}
@media (max-width: 768px) {
    .scrm-clients-section {
        padding: var(--space-2xl) 0;
    }
    .scrm-clients-grid {
        gap: 6px 4px;
    }
    .scrm-client-item {
        width: calc((100% - 8px) / 3);
    }
    .scrm-client-item img {
        max-height: 40px;
    }
}

/* ==========================================================
   FOOTER — Dark bg matching siapngeweb.com
   ========================================================== */
.site-footer {
    background: #1f1f2d;
    color: var(--text-muted);
    margin-top: auto;
}

/* Footer main content */
.footer-main {
    padding: var(--space-4xl) 0 var(--space-3xl);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: var(--space-3xl);
}

/* Footer column titles */
.footer-col-title {
    font-family: var(--heading-font);
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-lg);
}

/* Column: Brand */
.footer-brand .site-branding .site-title {
    color: #ffffff;
    font-size: 1.125rem;
}
.footer-brand .custom-logo-link img {
    max-height: 36px;
    width: auto;
}
.footer-brand-desc {
    font-size: 0.8125rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-top: var(--space-md);
    max-width: 280px;
}

/* Column: Contact */
.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.footer-contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--primary-color);
}
.footer-contact-item a {
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}
.footer-contact-item a:hover {
    color: #ffffff;
}

/* Column: Social */
.footer-social-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.footer-social-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}
.footer-social-link:hover {
    color: var(--primary-color);
}
.footer-social-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Column: Visit Us */
.footer-address {
    font-size: 0.8125rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}
.footer-map {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #2a2a4a;
}
.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Footer bottom bar */
.footer-bottom {
    padding: var(--space-lg) 0;
    border-top: 1px solid #2a2a4a;
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.copyright {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ==========================================================
   404 PAGE
   ========================================================== */
.scrm-404 {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
    background:
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 10c20 30 60-10 80 20s-20 50 10 70-10 60-40 50-60-20-70 10S-10 90 20 70s30-50 10-60z' fill='%23426ef0' fill-opacity='0.05'/%3E%3Cpath d='M150 80c-20 40 20 50 0 80s-50 10-40-20 40-30 20-50 30-40 20-10z' fill='%23426ef0' fill-opacity='0.05'/%3E%3C/svg%3E"),
        var(--bg-color);
}
.scrm-404-content {
    max-width: 520px;
    margin: 0 auto;
}
.scrm-404-number {
    display: block;
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 1;
    color: var(--primary-color);
    -webkit-text-stroke: 3px var(--primary-color);
    margin-bottom: 16px;
}
.scrm-404-heading {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--heading-color);
    margin: 0 0 12px;
}
.scrm-404-message {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
    margin: 0 0 32px;
}

/* ==========================================================
   PRODUCTS ARCHIVE
   ========================================================== */
.scrm-products-archive {
    padding: 80px 0 100px;
    background: var(--bg-color);
}

/* Header */
.scrm-products-header {
    text-align: center;
    margin-bottom: 40px;
}
.scrm-products-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--heading-color);
    margin: 0 0 10px;
}
.scrm-products-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    margin: 12px auto 0;
}
.scrm-products-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    max-width: 500px;
    margin: 16px auto 0;
    line-height: 1.6;
}

/* Toolbar */
.scrm-products-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

/* Search */
.scrm-products-search {
    position: relative;
    width: 100%;
}
.scrm-products-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}
.scrm-products-search-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--body-font);
    font-size: 0.875rem;
    color: var(--heading-color);
    background: var(--surface-color);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    box-sizing: border-box;
}
.scrm-products-search-input::placeholder {
    color: #9ca3af;
}
.scrm-products-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 110, 240, 0.15);
}

/* Filter buttons */
.scrm-products-filter {
    display: flex;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.scrm-products-filter::-webkit-scrollbar {
    display: none;
}
.scrm-filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.scrm-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.scrm-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Grid */
.scrm-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Empty state */
.scrm-products-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color);
}
.scrm-products-empty p {
    font-size: 1rem;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
    .scrm-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    .scrm-products-archive {
        padding: 60px 0 80px;
    }
    .scrm-products-search {
        max-width: 100%;
    }
    .scrm-products-filter {
        justify-content: flex-start;
    }
    .scrm-products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .header-inner {
        height: 60px;
    }
    .site-branding .site-title {
        font-size: 1.125rem;
    }
    .site-branding .custom-logo-link img {
        max-height: 32px;
    }
    .header-cta .btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    /* Mobile nav — full viewport slide from right */
    .header-hamburger {
        display: flex;
        position: relative;
        z-index: 201;
    }
    .header-cta-desktop {
        display: none;
    }
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--surface-color, #fff);
        z-index: 200;
        display: flex;
        flex-direction: column;
        padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
        transform: translateX(100%);
        transition: transform var(--duration-base, 0.3s) var(--ease-out, ease);
        overflow: hidden;
    }
    /* Close button inside nav — aligned with hamburger position */
    .header-nav-close {
        position: absolute;
        top: 0;
        right: var(--space-md);
        width: 36px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;
        padding: 0;
    }
    .header-nav-close span {
        position: absolute;
        width: 20px;
        height: 2px;
        background: var(--heading-color);
        border-radius: 2px;
    }
    .header-nav-close span:first-child {
        transform: rotate(45deg);
    }
    .header-nav-close span:last-child {
        transform: rotate(-45deg);
    }
    .header-nav.active {
        transform: translateX(0);
    }
    /* Logo — top of mobile nav */
    .header-nav-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
    }
    .header-nav-logo a {
        display: inline-flex;
    }
    .header-nav-logo img {
        max-height: 36px;
        width: auto;
    }
    .header-nav-logo .site-title {
        font-family: var(--heading-font);
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--heading-color);
        text-decoration: none;
    }
    /* Menu — centered vertically */
    .header-menu {
        flex: 1;
        flex-direction: column;
        gap: 4px;
        align-items: center;
        justify-content: center;
    }
    .header-menu li a {
        padding: 14px 24px;
        font-size: 1.125rem;
        border-radius: var(--radius-md);
        font-weight: 600;
        text-align: center;
    }
    /* CTA — bottom of mobile nav */
    .header-nav-cta {
        display: block;
        flex-shrink: 0;
    }
    .header-nav-cta .btn {
        display: block;
        text-align: center;
        padding: 14px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: var(--radius-md);
    }

    .footer-main {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    .footer-brand-desc {
        max-width: 100%;
    }
    .footer-map {
        aspect-ratio: 16 / 9;
    }
}
