/* 
   KTHDIGI CORE CSS v1.0
   Unified Header, Footer, and Design Tokens
   Synchronized across the ecosystem
*/

@font-face { font-family: 'Phudu'; src: url('https://kth-electric.com/wp-content/fonts/DT-Phudu/DTPhudu-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Ganh'; src: url('https://kth-electric.com/wp-content/fonts/Ganh/Ganh%20Type-Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }

:root {
    /* Typography */
    --font-heading: 'Phudu', system-ui, sans-serif;
    --font-body: 'Ganh', system-ui, sans-serif;

    /* Colors */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --c-seo: #0f7c78;
    --c-seo-bg: rgba(15, 124, 120, 0.08);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── HEADER ─── */
.kth-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
}

.nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-seo);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo:hover { transform: scale(1.03); }
.logo span { color: var(--text-primary); }

.header-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-links a {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition-fast);
}

.header-links a:hover {
    color: var(--c-seo);
    background: var(--c-seo-bg);
}

/* ─── MEGA MENU (Simplified for subpages) ─── */
.nav-dropdown { position: relative; }
.nav-dropdown>a::after {
    content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: 0.55rem; margin-left: 5px; display: inline-block;
}
.mega-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
    width: 280px; background: #fff; border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transition: all 0.25s ease;
    padding: 10px;
}
.nav-dropdown:hover .mega-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-menu a { display: block; padding: 10px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.mega-menu a:hover { background: var(--c-seo-bg); color: var(--c-seo); }

/* ─── MOBILE MENU ─── */
.mobile-toggle {
    display: none; width: 40px; height: 40px; border: none; background: #fff;
    border-radius: 8px; cursor: pointer; position: relative;
}
.mobile-toggle .bar {
    display: block; width: 20px; height: 2px; background: var(--text-primary);
    position: absolute; left: 10px; transition: 0.3s;
}
.mobile-toggle .bar:nth-child(1) { top: 14px; }
.mobile-toggle .bar:nth-child(2) { top: 19px; }
.mobile-toggle .bar:nth-child(3) { top: 24px; }

@media (max-width: 768px) {
    .header-links { display: none; }
    .mobile-toggle { display: block; }
}

/* ─── FOOTER ─── */
.kth-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 48px;
    text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--c-seo); }
