/* ═══════════════════════════════════════ */
/* SHARED HEADER STYLES                    */
/* ═══════════════════════════════════════ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(6, 9, 18, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 0;
    z-index: 1000;
    transition: var(--transition-main);
    border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}

header.scrolled {
    padding: 10px 0;
    background: rgba(6, 9, 18, 0.92);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.06);
    border-bottom-color: rgba(0, 255, 136, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 64px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.35));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-img:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.6));
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin-left: auto;
    margin-right: 35px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: var(--transition-main);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-accent);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px var(--brand-accent);
}

.nav-links a:hover {
    color: var(--brand-accent);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--brand-accent);
}

.nav-links a.active::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Kanit', sans-serif;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    gap: 10px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-accent), #00cc6a);
    color: var(--brand-dark);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4), 0 8px 32px rgba(0, 255, 136, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    z-index: 1002;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--brand-accent);
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════════════════════════════════════ */
/* SHARED FOOTER STYLES                    */
/* ═══════════════════════════════════════ */
footer {
    position: relative;
    z-index: 2;
    background: var(--brand-darker);
    padding: 80px 0 40px;
    border-top: 1px solid rgba(0, 255, 136, 0.08);
}

.f-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
    max-width: 1400px;
    margin-inline: auto;
    padding: 0 40px;
}

.logo-footer-img {
    height: 52px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

.f-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 340px;
    line-height: 1.7;
}

.f-title {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-accent);
}

.f-links {
    list-style: none;
}

.f-links li {
    margin-bottom: 14px;
}

.f-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-main);
    font-weight: 400;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.f-links a i {
    font-size: 0.7rem;
}

.f-links a:hover {
    color: var(--brand-accent);
    transform: translateX(6px);
}

.f-links li:not(:has(a)) {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.f-links li:not(:has(a)) i {
    color: var(--brand-accent);
    font-size: 0.8rem;
}

.f-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.85rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-inline: 40px;
}

.f-bottom a {
    color: var(--text-light);
    transition: var(--transition-main);
    font-size: 1.1rem;
}

.f-bottom a:hover {
    color: var(--brand-accent);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* ═══════════════════════════════════════ */
/* RESPONSIVE - HEADER & FOOTER            */
/* ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .f-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .nav-links {
        gap: 24px;
        margin-right: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(6, 9, 18, 0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        z-index: 1001;
        margin: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .f-grid {
        grid-template-columns: 1fr;
    }

    .f-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-inline: 20px;
    }
}

/* ═══════════════════════════════════════ */
/* ADMIN — OPERATION NAV LINK             */
/* ═══════════════════════════════════════ */
.nav-links a.nav-op {
    color: var(--brand-accent);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    padding: 4px 14px;
    background: rgba(0, 255, 136, 0.05);
}

.nav-links a.nav-op i {
    font-size: 0.78rem;
    margin-right: 2px;
}

.nav-links a.nav-op:hover {
    background: rgba(0, 255, 136, 0.12);
    color: var(--brand-accent);
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.2);
}

/* suppress underline slide effect for this button-style link */
.nav-links a.nav-op::after {
    display: none;
}

/* ═══════════════════════════════════════ */
/* ADMIN — LOGOUT BUTTON IN HEADER        */
/* ═══════════════════════════════════════ */
.btn-logout-nav {
    background: rgba(255, 51, 102, 0.1) !important;
    color: #ff6688 !important;
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.1) !important;
    border: 1px solid rgba(255, 51, 102, 0.25) !important;
}

.btn-logout-nav:hover {
    background: rgba(255, 51, 102, 0.22) !important;
    box-shadow: 0 0 32px rgba(255, 51, 102, 0.3) !important;
    transform: translateY(-3px) !important;
}

/* ═══════════════════════════════════════ */
/* ADMIN — GLOBAL TEXT EDIT BAR           */
/* Positioned bottom-left so it doesn't   */
/* clash with portfolio's bottom-right bar */
/* ═══════════════════════════════════════ */
.global-edit-bar {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.global-edit-toggle {
    background: linear-gradient(135deg, var(--brand-cyan), #0096b4);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 50px;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.25);
    transition: all 0.3s;
}

.global-edit-toggle:hover {
    box-shadow: 0 0 46px rgba(0, 212, 255, 0.45);
    transform: translateY(-2px);
}

.global-edit-toggle.active {
    background: linear-gradient(135deg, #ff3366, #cc0044);
    box-shadow: 0 0 28px rgba(255, 51, 102, 0.3);
}

.global-edit-hint {
    background: rgba(6, 9, 18, 0.92);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    backdrop-filter: blur(10px);
    display: none;
    max-width: 250px;
    line-height: 1.7;
    font-family: 'Kanit', sans-serif;
}

.global-edit-hint i {
    color: var(--brand-cyan);
    margin-right: 4px;
}

.global-edit-hint.show {
    display: block;
}

/* highlight editable elements when edit mode is ON */
body.gc-text-edit-mode [data-ge] {
    outline: 1px dashed rgba(0, 212, 255, 0.35);
    border-radius: 3px;
    transition: outline 0.2s, background 0.2s;
    cursor: text;
}

body.gc-text-edit-mode [data-ge]:hover,
body.gc-text-edit-mode [data-ge]:focus {
    outline-color: var(--brand-cyan);
    background: rgba(0, 212, 255, 0.06);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .global-edit-bar {
        bottom: 20px;
        left: 16px;
    }

    .global-edit-toggle {
        padding: 10px 16px;
        font-size: 0.82rem;
    }
}
