/* css/global.css - Editorial Design System & Global Components */
:root {
    --bg-canvas: #F6F5F1;
    --bg-surface: #FFFFFF;
    --bg-dark: #0E1113;
    --bg-dark-card: #161B1E;
    --accent-earth: #C07442;
    --accent-earth-hover: #A45D30;
    --accent-forest: #1C3D33;
    --text-primary: #111517;
    --text-secondary: #586266;
    --border-light: rgba(17, 21, 23, 0.09);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 12px 32px rgba(14, 17, 19, 0.05);
    --shadow-float: 0 24px 54px rgba(14, 17, 19, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Scroll Progress Line */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-earth), #E2A374);
    z-index: 9999;
    transition: width 0.08s linear;
}

/* Maintenance Screen */
.maintenance-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    color: #FFF;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.maintenance-card {
    max-width: 560px;
    text-align: center;
    background: var(--bg-dark-card);
    padding: 48px 36px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.maintenance-card h2 {
    font-size: 2rem;
    margin: 14px 0;
    letter-spacing: -0.02em;
}

.maintenance-card p {
    color: #94A3B8;
    margin-bottom: 24px;
}

.maintenance-contacts {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.maintenance-contacts a {
    color: #F2C3A0;
    text-decoration: none;
    font-weight: 600;
}

/* Top Statutory & Social Bar */
.top-bar {
    background: var(--bg-dark);
    color: #CBD5E1;
    font-size: 0.78rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.top-info,
.top-right,
.social-strip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-info a,
.social-strip a {
    color: #E2E8F0;
    text-decoration: none;
    transition: color 0.25s ease;
}

.top-info a:hover,
.social-strip a:hover {
    color: var(--accent-earth);
}

.sep {
    opacity: 0.35;
}

.trade-pill {
    background: rgba(192, 116, 66, 0.2);
    color: #F4C7A6;
    padding: 2px 10px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

/* Sticky Glassmorphism Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(246, 245, 241, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.35s var(--ease-editorial), box-shadow 0.35s var(--ease-editorial);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 20px;
}

/* Brand & Blank Logo Slot */
.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-slot {
    width: 48px;
    height: 48px;
    border: 1.5px dashed var(--accent-earth);
    border-radius: 12px;
    background: rgba(192, 116, 66, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent-earth-hover);
    overflow: hidden;
    transition: transform 0.3s var(--ease-editorial);
}

.logo-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-link:hover .logo-slot {
    transform: scale(1.05);
}

.brand-meta strong {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.brand-meta span {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Amazon-Style Live Search */
.live-search {
    position: relative;
    flex: 1;
    max-width: 340px;
}

.search-field {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 99px;
    padding: 0 14px;
    height: 42px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-field:focus-within {
    border-color: var(--accent-earth);
    box-shadow: 0 0 0 3px rgba(192, 116, 66, 0.14);
}

.search-field i {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-field input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding: 0 10px;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    color: var(--text-primary);
}

#searchClearBtn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
}

.search-results-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-light);
    max-height: 360px;
    overflow-y: auto;
    display: none;
    z-index: 1200;
}

.search-results-panel.open {
    display: block;
    animation: dropFade 0.22s var(--ease-editorial);
}

.search-hit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.2s;
}

.search-hit:hover {
    background: #FAF7F2;
}

.search-hit strong {
    display: block;
    font-size: 0.85rem;
}

.search-hit small {
    font-size: 0.72rem;
    color: var(--accent-earth-hover);
    font-weight: 600;
}

/* Multi-Level Nested Navigation */
.menu-root {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 24px;
}

.menu-item {
    position: relative;
}

.menu-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: color 0.25s;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-earth);
    transition: width 0.3s var(--ease-editorial);
}

.menu-link:hover,
.menu-link.active {
    color: var(--accent-earth-hover);
}

.menu-link:hover::after,
.menu-link.active::after {
    width: 100%;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 290px;
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 10px;
    list-style: none;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s var(--ease-editorial);
    z-index: 1100;
}

.sub-menu > li {
    position: relative;
}

/* Multi-Level Nested Navigation - Sub-Sub-Menu Opens Leftward on Desktop so Never Cut Off */
.sub-sub-menu {
    position: absolute;
    top: -6px;
    right: calc(100% + 8px);
    left: auto;
    min-width: 290px;
    width: max-content;
    max-width: 360px;
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 10px;
    list-style: none;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s var(--ease-editorial);
    z-index: 1200;
}

/* Invisible bridge so mouse does not lose hover when crossing the gap between menus */
.sub-sub-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    right: -15px;
    width: 22px;
}

/* Dynamic boundary flipping classes (used if screen left edge is hit) */
.sub-sub-menu.open-right {
    right: auto !important;
    left: calc(100% + 8px) !important;
}
.sub-sub-menu.open-right::before {
    right: auto !important;
    left: -15px !important;
}
.sub-sub-menu.open-left {
    right: calc(100% + 8px) !important;
    left: auto !important;
}
.sub-sub-menu.open-left::before {
    right: -15px !important;
    left: auto !important;
}

.has-children:hover > .sub-menu,
.has-children:hover > .sub-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu a,
.sub-sub-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sub-menu a:hover,
.sub-sub-menu a:hover {
    background: #F6F3EC;
    color: var(--accent-earth-hover);
    transform: translateX(3px);
}

/* Pill Morphing Buttons */
.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 99px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.3s var(--ease-editorial), background 0.25s, box-shadow 0.3s;
}

.pill-btn:hover {
    transform: translateY(-2px);
}

.dark-pill {
    background: var(--bg-dark);
    color: #FFF;
    padding: 10px 20px;
}

.dark-pill:hover {
    background: var(--accent-earth);
}

.primary-pill {
    background: var(--accent-earth);
    color: #FFF;
    box-shadow: 0 12px 28px rgba(192, 116, 66, 0.28);
}

.primary-pill:hover {
    background: var(--accent-earth-hover);
}

.outline-pill {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: transparent;
}

.outline-pill:hover {
    background: var(--bg-dark);
    color: #FFF;
}

.full-btn {
    width: 100%;
}

/* Blank Media Placeholders (Clean Architectural Wireframe Style) */
.media-placeholder {
    background: linear-gradient(135deg, #ECE9E1 0%, #E2DDD2 100%);
    border: 1.5px dashed rgba(164, 93, 48, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #5E5347;
    position: relative;
    overflow: hidden;
}

.media-placeholder img,
.media-placeholder video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-tag {
    background: rgba(14, 17, 19, 0.08);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 10px;
}

.media-placeholder i {
    font-size: 1.8rem;
    color: var(--accent-earth-hover);
    margin-bottom: 8px;
}

.media-placeholder h3,
.media-placeholder h4 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.media-placeholder p,
.media-placeholder small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ratio-4-3 {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
}

.ratio-16-10 {
    aspect-ratio: 16 / 10;
    border: none;
    border-bottom: 1px dashed rgba(164, 93, 48, 0.35);
}

.ratio-16-9 {
    aspect-ratio: 16 / 9;
    border: none;
    border-bottom: 1px dashed rgba(164, 93, 48, 0.35);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: #CBD5E1;
    padding-top: 76px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr 1.1fr;
    gap: 44px;
    padding-bottom: 52px;
}

.brand-link.light {
    color: #FFF;
    margin-bottom: 16px;
}

.footer-summary {
    font-size: 0.86rem;
    color: #94A3B8;
    margin-bottom: 18px;
}

.statutory-strip {
    font-size: 0.74rem;
    color: #E2E8F0;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.5;
}

.footer-nav-col h4 {
    color: #FFF;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-nav-col ul {
    list-style: none;
}

.footer-nav-col li {
    margin-bottom: 10px;
}

.footer-nav-col a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-nav-col a:hover {
    color: #F4C7A6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    font-size: 0.8rem;
    color: #64748B;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Floating WhatsApp & Real-Time Live Chat */
.floating-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1500;
}

.dock-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.3s var(--ease-editorial);
    position: relative;
}

.dock-btn:hover {
    transform: scale(1.08);
}

.wa-btn {
    background: #25D366;
}

.chat-btn {
    background: var(--accent-earth);
}

.live-tag {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #16A34A;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 99px;
}

.chat-widget {
    position: fixed;
    bottom: 94px;
    right: 24px;
    width: 350px;
    background: var(--bg-surface);
    border-radius: 20px;
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: none;
    z-index: 1600;
}

.chat-widget.open {
    display: block;
    animation: dropFade 0.25s var(--ease-editorial);
}

.chat-widget-head {
    background: var(--bg-dark);
    color: #FFF;
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-head span {
    display: block;
    font-size: 0.72rem;
    color: #86EFAC;
}

.chat-widget-head button {
    background: none;
    border: none;
    color: #FFF;
    font-size: 1.1rem;
    cursor: pointer;
}

.chat-visitor-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px 10px;
    background: #F1F5F9;
    border-bottom: 1px solid var(--border-light);
}

.chat-visitor-bar input {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #CBD5E1;
    font-size: 0.76rem;
}

.chat-stream {
    height: 240px;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F8FAFC;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.83rem;
    max-width: 85%;
    line-height: 1.45;
}

.chat-bubble.admin {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    align-self: flex-start;
}

.chat-bubble.visitor {
    background: var(--accent-earth);
    color: #FFF;
    align-self: flex-end;
}

.chat-compose {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.chat-compose input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
}

.chat-compose button {
    background: var(--bg-dark);
    color: #FFF;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
}

/* Editorial Motion Reveal Classes */
.reveal-mask,
.reveal-fade,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.85s var(--ease-editorial), transform 0.85s var(--ease-editorial);
    will-change: opacity, transform;
}

.reveal-mask {
    transform: translateY(32px);
}

.reveal-fade {
    transform: translateY(24px);
}

.reveal-scale {
    transform: scale(0.97);
}

.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

@keyframes dropFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Navigation */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.burger-btn span {
    width: 26px;
    height: 2px;
    background: var(--text-primary);
    display: block;
}

@media (max-width: 1080px) {
    .live-search {
        display: none;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .burger-btn {
        display: flex;
    }

    .primary-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 24px;
        border-bottom: 1px solid var(--border-light);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        display: none;
    }

    .primary-nav.open {
        display: block;
    }

    .menu-root {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Mobile Drawer Sub-Menu & Sub-Sub-Menu (In-Flow Clean Tree / Accordion) */
    .sub-menu,
    .sub-sub-menu {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        min-width: 100%;
        width: 100%;
        max-width: 100%;
        background: rgba(0, 0, 0, 0.025);
        border-radius: 10px;
        padding: 6px 10px;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border-light);
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        z-index: 1;
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .sub-sub-menu {
        margin-top: 4px;
        padding-left: 12px;
        border-left: 2px solid var(--accent-earth);
        background: rgba(200, 90, 50, 0.04);
    }

    .sub-sub-menu::before {
        display: none;
    }

    .sub-menu a,
    .sub-sub-menu a {
        padding: 8px 10px;
        font-size: 0.83rem;
        white-space: normal;
        line-height: 1.35;
    }

    .sub-menu a:hover,
    .sub-sub-menu a:hover {
        transform: none;
    }

    .hide-mobile {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}