/*
Theme Name: Pongo
Theme URI: https://pongocom.tw
Author: Antigravity
Author URI: https://pongocom.tw
Description: A premium, minimalist, and high-end WordPress theme designed for high-performance marketing and travel sites.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pongo
Tags: minimalist, portfolio, premium, responsive-layout, high-end
*/

/* Reset & Base Styles */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --brand-yellow: #f2c500; /* Pongo Brand Yellow */
    --accent-color: #1a1a1a;
    --text-main: #000000;
    --text-muted: #666666;
    --bg-main: #ffffff;
    --bg-alt: #f9f9f9;
    --border-color: #eeeeee;
    --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 5rem;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Global CTA Button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 1.125rem 3rem;
    background: #000;
    color: #fff;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.cta-btn::after {
    content: '→';
    font-size: 1.125rem;
}

.cta-btn:hover {
    background: var(--brand-yellow);
    color: #000;
}

.cta-btn-light {
    background: #fff;
    color: #000;
}

.cta-btn-light:hover {
    background: var(--brand-yellow);
    color: #000;
}

/* Service Contact CTA */
.service-contact-cta {
    background: #fafafa;
    padding: 6rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.service-contact-cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #000;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

/* LINE Bubble */
.line-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #00B900;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,185,0,0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    animation: line-glow 2.5s ease-in-out infinite;
}

@keyframes line-glow {
    0%   { box-shadow: 0 4px 20px rgba(0,185,0,0.35); }
    50%  { box-shadow: 0 4px 32px rgba(0,185,0,0.75), 0 0 0 10px rgba(0,185,0,0.12); }
    100% { box-shadow: 0 4px 20px rgba(0,185,0,0.35); }
}

.line-bubble:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,185,0,0.45);
}

.line-bubble img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.line-bubble span {
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

a {
    color: inherit;
    text-decoration: none; /* 移除底線 */
    transition: 0.3s ease;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

section {
    padding: var(--spacing-xl) 0;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    section { padding: var(--spacing-lg) 0; }
}

/* Breadcrumbs (Global) */
.breadcrumbs-container {
    margin-bottom: 1.5rem;
}

.breadcrumbs {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--brand-yellow);
}

/* Hero Overlay (Global) */

/* Basic Elements */
button, .button, input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

button:hover, .button:hover, input[type="submit"]:hover {
    background: var(--brand-yellow);
    color: var(--primary-color);
}

input[type="text"], input[type="email"], input[type="url"], textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-alt);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-yellow);
    background: #fff;
}

/* Header */
.site-header {
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    max-height: 32px; /* 配合細緻化的 Header */
    width: auto;
}

.site-title a:hover {
    color: var(--brand-yellow);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    font-size: 1rem;
    font-weight: 400; /* 非粗體 */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0; /* 顯著縮減感應高度 */
    display: block;
}

/* Chevron indicator AFTER text for parent items */
.main-navigation > ul > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 6px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.6;
    transition: transform 0.3s ease;
    position: static;
}

.main-navigation > ul > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.main-navigation a:hover,
.main-navigation li.current-menu-item > a {
    color: var(--brand-yellow);
}

/* Submenu items: no underline, no chevron */
.main-navigation .sub-menu a::after,
.main-navigation .sub-menu a::before {
    display: none;
}

/* Sub-menu Styles */
.main-navigation ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    width: max-content;
    min-width: 200px;
    padding: 0;
    display: block;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    z-index: 1001;
}

.main-navigation li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu a {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    white-space: nowrap;
    text-align: center;
    display: block;
}

/* TOC */
.post-toc-wrapper {
    background: var(--bg-alt);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--brand-yellow);
}

.toc-title {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
}

.toc-nav a {
    display: block;
    padding: 0.25rem 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.toc-nav a:hover {
    color: var(--brand-yellow);
}

/* Author Box Bottom */
.author-box-bottom {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.author-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--bg-alt);
    padding: 2.5rem;
}

.author-card-avatar img {
    border-radius: 50%;
}

.author-card-content h4 {
    margin-bottom: 0.5rem;
}

.author-trust-badges {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.author-trust-badges span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-yellow);
    background: #000;
    padding: 2px 8px;
}

/* Footer Layout */
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-xl);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

.footer-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.footer-info-meta {
    font-size: 1rem;
    color: var(--text-muted);
}

.footer-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-nav-group ul {
    list-style: none;
}

.footer-nav-group li {
    margin-bottom: 0.5rem;
}

.footer-contact p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer-social {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 32px;
    height: 32px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

.footer-bottom {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    font-size: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-muted);
}

/* ── Hamburger Button ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: transform 0.35s ease, opacity 0.25s ease;
    transform-origin: center;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Nav Drawer（預設隱藏，響應式 @media 內顯示） ── */
.mobile-nav-drawer {
    display: none;
}

/* ── Nav Overlay ── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile Nav ── */
@media (max-width: 1024px) {
    /* 隱藏桌機 nav */
    .main-navigation {
        display: none;
    }

    /* 顯示漢堡按鈕 */
    .nav-toggle {
        display: flex;
    }

    /* 抽屜內部的 X 關閉按鈕 */
    .drawer-close {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .drawer-close-bar {
        position: absolute;
        display: block;
        width: 24px;
        height: 2px;
        background: #000;
    }

    .drawer-close-bar:nth-child(1) {
        transform: rotate(45deg);
    }
    .drawer-close-bar:nth-child(2) {
        transform: rotate(-45deg);
    }

    /* 顯示遮罩 */
    body.nav-open .nav-overlay {
        display: block;
    }

    /* Mobile drawer */
    .mobile-nav-drawer {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 85vw);
        height: 100vh;
        background: #fff;
        z-index: 1002;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        overflow-y: auto;
        padding: 5rem 1.75rem 3rem;
        border-left: 1px solid var(--border-color);
    }

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

    .mobile-nav-drawer ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-nav-drawer > ul > li {
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-nav-drawer > ul > li:first-child {
        border-top: 1px solid var(--border-color);
    }

    .mobile-nav-drawer a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        font-size: 1rem;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-main);
    }

    .mobile-nav-drawer a:hover {
        color: var(--brand-yellow);
    }

    /* Submenu accordion */
    .mobile-nav-drawer .menu-item-has-children > a::after {
        content: '';
        display: inline-block;
        width: 10px;
        height: 6px;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: contain;
        mask-size: contain;
        flex-shrink: 0;
        opacity: 0.6;
        transition: transform 0.3s ease;
    }

    .mobile-nav-drawer .submenu-open > a::after {
        transform: rotate(180deg);
    }

    .mobile-nav-drawer .sub-menu {
        display: none;
        padding-left: 1rem;
        background: var(--bg-alt);
    }

    .mobile-nav-drawer .sub-menu.is-open {
        display: block;
    }

    .mobile-nav-drawer .sub-menu a {
        padding: 0.75rem 0;
        font-size: 0.9rem;
        text-transform: none;
        letter-spacing: 0.02em;
        border-bottom: 1px solid var(--border-color);
        justify-content: flex-start;
    }

    .mobile-nav-drawer .sub-menu li:last-child a {
        border-bottom: none;
    }
}

/* ── Footer Responsive ── */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        padding-top: var(--spacing-lg);
    }

    .footer-branding {
        grid-column: 1 / -1;
    }

    .footer-logo {
        font-size: 1.35rem;
    }

    .footer-tagline,
    .footer-info-meta,
    .footer-contact p,
    .footer-nav-group li {
        font-size: 0.95rem;
    }

    .footer-title {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .site-footer {
        padding-bottom: var(--spacing-md);
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding-top: var(--spacing-lg);
        text-align: left;
    }

    .footer-branding {
        grid-column: auto;
    }

    .footer-logo img {
        max-height: 36px;
    }

    .footer-tagline {
        margin-bottom: 1rem;
    }

    .footer-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer-nav-group ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
    }

    .footer-nav-group li {
        margin-bottom: 0;
    }

    .footer-contact p {
        margin-bottom: 0.4rem;
        word-break: break-word;
    }

    .footer-social {
        margin-top: 1rem;
        gap: 0.75rem;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
    }

    .footer-bottom {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-sm, 1rem);
        font-size: 0.85rem;
        text-align: center;
    }
}

/* ── LINE Bubble Responsive ── */
@media (max-width: 767px) {
    .line-bubble {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem;
        gap: 0;
    }

    .line-bubble span {
        display: none;
    }
}

/* Admin Bar Correction */
.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Animations */
@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
