/*
Theme Name: Master Soon
Theme URI: https://mastersoon.com
Author: Master Soon
Description: A modern, elegant theme for Master Soon - BaZi & Feng Shui Master
Version: 1.0
Text Domain: mastersoon
*/

:root {
    --navy: #0a0e1a;
    --navy-light: #111827;
    --navy-mid: #1a2332;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #a07c2a;
    --white: #f5f0e8;
    --gray: #9ca3af;
    --gray-light: #d1d5db;
    --red-accent: #8b2020;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background: var(--navy);
    color: var(--white);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gold);
}

a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-light); }

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    padding: 15px 0;
    transition: all 0.3s;
}

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

.site-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.site-logo span {
    display: block;
    font-size: 0.65rem;
    font-family: 'Inter', sans-serif;
    color: var(--gray);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 400;
}

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
    color: var(--gray-light);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s;
}
.main-nav a:hover, .main-nav a.active { color: var(--gold); }

.lang-switch {
    display: flex;
    gap: 5px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 25px;
    padding: 4px;
}

.lang-switch a {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s;
}

.lang-switch a.active,
.lang-switch a:hover {
    background: var(--gold);
    color: var(--navy);
}

/* Nav Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 4px;
    min-width: 180px;
    padding: 8px 0;
    margin-top: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    z-index: 1001;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--gray-light);
    letter-spacing: 0;
    text-transform: none;
    transition: all 0.2s;
}

.nav-dropdown-menu a:hover {
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 70%),
                var(--navy);
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(201,168,76,0.05)" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(201,168,76,0.03)" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(201,168,76,0.02)" stroke-width="0.5"/></svg>') center/600px no-repeat;
    opacity: 0.5;
}

.hero-content { position: relative; z-index: 1; }

.hero-subtitle {
    font-size: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    font-weight: 500;
}

.hero h1 {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.hero-tagline {
    font-size: 1.3rem;
    color: var(--gray-light);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    margin-bottom: 10px;
}

.hero-tagline-cn {
    font-size: 1.1rem;
    color: var(--gold-dark);
    font-family: 'Noto Serif SC', serif;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.4s;
    border-radius: 2px;
}

.hero-cta:hover {
    background: var(--gold);
    color: var(--navy);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--gold-dark);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-line {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 50px;
}

/* Articles Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 30px;
    background: transparent;
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 2px;
    font-family: 'Inter', sans-serif;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--navy-light);
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s;
}

.article-card:hover {
    border-color: rgba(201, 168, 76, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.article-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.article-card-body { padding: 25px; }

.article-card-date {
    font-size: 0.8rem;
    color: var(--gold-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--white);
    line-height: 1.4;
}

.article-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-card .read-more {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Unified Pagination */
.front-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.front-pagination .page-btn,
.front-pagination .page-info {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--gray);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.front-pagination .page-btn:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.front-pagination .page-info {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    font-weight: 600;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--gray-light);
    margin-bottom: 20px;
    line-height: 1.9;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 700px;
    margin: 0 auto;
}

.contact-card {
    background: var(--navy-light);
    border: 1px solid rgba(201, 168, 76, 0.15);
    padding: 40px 30px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--gold);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-card h4 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-card p {
    color: var(--gray-light);
    font-size: 1rem;
}

.contact-card a {
    color: var(--gold-light);
}

/* Footer */
.site-footer {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    padding: 40px 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
}

/* Blog Archive */
.blog-header {
    padding: 140px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.posts-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.post-item {
    background: var(--navy-light);
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.post-item:hover {
    border-color: rgba(201, 168, 76, 0.3);
}

.post-item h2 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 10px;
}

.post-item h2 a { color: var(--white); }
.post-item h2 a:hover { color: var(--gold); }

.post-meta {
    font-size: 0.8rem;
    color: var(--gold-dark);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.post-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
}

.post-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Single Post */
.single-header {
    padding: 140px 0 40px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
}

.single-header h1 {
    font-size: 2.5rem;
    max-width: 800px;
    margin: 0 auto 15px;
    color: var(--white);
}

.single-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.single-content p {
    margin-bottom: 1.5em;
    color: var(--gray-light);
    font-size: 1.05rem;
    line-height: 1.9;
}

.single-content ol, .single-content ul {
    margin: 0 0 1.5em 1.5em;
    color: var(--gray-light);
    font-size: 1.05rem;
    line-height: 1.9;
}

.single-content li {
    margin-bottom: 0.6em;
    padding-left: 5px;
}

.single-content ol ol, .single-content ul ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    font-size: 1em;
}

.single-content img {
    border-radius: 4px;
    margin: 25px 0;
    display: block;
}

.single-content > .wp-caption:first-child,
.single-content > p:first-child > img:first-child,
.single-content > figure:first-child {
    margin: 0 -20px 30px;
    max-width: calc(100% + 40px);
    width: calc(100% + 40px);
}

.single-content > .wp-caption:first-child img,
.single-content > figure:first-child img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 4px;
}

.single-content h2, .single-content h3 {
    color: var(--gold);
    margin: 2em 0 0.8em;
    font-size: 1.4rem;
}

.single-content h3 { font-size: 1.2rem; }

.single-content strong { color: var(--white); }
.single-content em { color: var(--gold-light); }

.single-content .wp-caption {
    text-align: center;
    margin: 30px auto;
    max-width: 100%;
}

.single-content .wp-caption img {
    border-radius: 4px;
    margin-bottom: 10px;
}

.single-content .wp-caption-text {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 8px;
    font-style: italic;
    padding: 0 10px;
}

.single-content iframe, .single-content embed {
    max-width: 100%;
    margin: 25px 0;
    border-radius: 4px;
}

.single-content .video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 25px 0;
    border-radius: 4px;
}

.single-content .video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.single-content blockquote {
    border-left: 3px solid var(--gold);
    margin: 1.5em 0;
    padding: 15px 25px;
    background: rgba(201, 168, 76, 0.05);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--gold-light);
}

.single-content a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(201, 168, 76, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s;
}

.single-content a:hover {
    text-decoration-color: var(--gold);
}

/* Language filter on blog */
.lang-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.lang-filter a {
    padding: 8px 24px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 2px;
    transition: all 0.3s;
}

.lang-filter a.active, .lang-filter a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* Pagination */
.pagination {
    text-align: center;
    padding: 40px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    color: var(--gray);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.pagination .current, .pagination a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-tagline { font-size: 1rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    .articles-grid { grid-template-columns: 1fr; }
    
    .main-nav { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    }
    .main-nav.open { display: flex; }
    .mobile-toggle { display: block; }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: rgba(201, 168, 76, 0.05);
        border: none;
        box-shadow: none;
        margin-top: 5px;
        padding: 0 0 0 15px;
        min-width: 0;
    }

    .nav-dropdown-menu::before { display: none; }

    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown .nav-dropdown-menu {
        display: block;
    }
    
    .single-header h1 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .contact-grid { grid-template-columns: 1fr; }
}
