/* ============================================
   喀麦隆华人网 - 自定义样式
   ============================================ */

/* ============================================
   ASTRA OVERRIDES
   ============================================ */
/* Remove Astra default spacing on front page */
.page-template-front-page .site-content,
.page-template-front-page .ast-container,
.page-template-front-page #primary,
.page-template-front-page #content,
.home .site-content,
.home .ast-container,
.home #primary,
.home #content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.page-template-front-page .entry-content,
.home .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove Astra default header padding */
.site-header { padding: 0 !important; }

/* Remove Astra container max-width on front page */
.page-template-front-page .ast-container,
.home .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure body has no extra padding */
.page-template-front-page body,
.home body {
    padding: 0 !important;
    overflow-x: hidden;
}

/* Remove Astra default article padding */
.page-template-front-page article,
.home article {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove Astra footer default */
.site-footer .ast-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Hide Astra default page title */
.page-template-front-page .entry-header,
.home .entry-header { display: none !important; }

/* CSS Variables */
:root {
    --ch-primary: #1a5632;
    --ch-primary-dark: #0d3b1f;
    --ch-primary-light: #2d7a4a;
    --ch-accent: #d4a017;
    --ch-accent-light: #e6b83a;
    --ch-dark: #1a1a2e;
    --ch-gray: #6c757d;
    --ch-light: #f8f9fa;
    --ch-white: #ffffff;
    --ch-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --ch-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --ch-radius: 12px;
    --ch-transition: all 0.3s ease;
}

/* Reset & Base */
* { box-sizing: border-box; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.7;
    background: #f5f5f5;
}

a { color: var(--ch-primary); text-decoration: none; transition: var(--ch-transition); }
a:hover { color: var(--ch-accent); }

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    background: var(--ch-white) !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-logo img { max-height: 60px; width: auto; }

.main-navigation .menu > li > a {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    padding: 12px 18px;
    transition: var(--ch-transition);
}

.main-navigation .menu > li > a:hover {
    color: var(--ch-primary);
}

.main-navigation .menu > li.menu-item-has-children > a::after {
    content: '\25BE';
    margin-left: 5px;
    font-size: 12px;
    color: var(--ch-gray);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0d3b1f 0%, #1a5632 40%, #2d7a4a 100%);
}

.hero-section::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" width="80" height="80" viewBox="0 0 80 80"><path fill="rgba(255,255,255,0.03)" d="M40 0L80 40L40 80L0 40Z"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 60px 20px;
}

.hero-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-weight: 400;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 16px 24px;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.hero-search button {
    background: var(--ch-accent);
    color: #fff;
    border: none;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ch-transition);
}

.hero-search button:hover { background: var(--ch-accent-light); }

.hero-tags {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-tags a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    padding: 4px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: var(--ch-transition);
}

.hero-tags a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

/* ============================================
   QUICK SERVICES GRID
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: -60px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.service-card {
    background: var(--ch-white);
    border-radius: var(--ch-radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--ch-shadow);
    transition: var(--ch-transition);
    cursor: pointer;
    border-top: 4px solid var(--ch-primary);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ch-shadow-hover);
    border-top-color: var(--ch-accent);
}

.service-card:nth-child(2) { border-top-color: #2563eb; }
.service-card:nth-child(3) { border-top-color: #7c3aed; }
.service-card:nth-child(4) { border-top-color: #ea580c; }

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--ch-light);
}

.service-card:nth-child(1) .service-icon { background: #e8f5e9; }
.service-card:nth-child(2) .service-icon { background: #dbeafe; }
.service-card:nth-child(3) .service-icon { background: #ede9fe; }
.service-card:nth-child(4) .service-icon { background: #ffedd5; }

.service-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ch-dark);
}

.service-desc {
    font-size: 13px;
    color: var(--ch-gray);
    margin-bottom: 0;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--ch-dark);
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 28px;
    background: var(--ch-primary);
    border-radius: 3px;
}

.section-more {
    font-size: 14px;
    color: var(--ch-gray);
    font-weight: 500;
    transition: var(--ch-transition);
}

.section-more:hover { color: var(--ch-accent); }

/* ============================================
   NEWS SECTION
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
}

.news-featured {
    background: var(--ch-white);
    border-radius: var(--ch-radius);
    overflow: hidden;
    box-shadow: var(--ch-shadow);
    transition: var(--ch-transition);
}

.news-featured:hover { box-shadow: var(--ch-shadow-hover); }

.news-featured-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    background: var(--ch-light);
}

.news-featured-content {
    padding: 28px;
}

.news-featured-category {
    display: inline-block;
    background: var(--ch-primary);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-featured-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--ch-dark);
}

.news-featured-title a { color: inherit; }
.news-featured-title a:hover { color: var(--ch-primary); }

.news-featured-excerpt {
    color: var(--ch-gray);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.news-featured-meta {
    font-size: 13px;
    color: #aaa;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    gap: 16px;
    background: var(--ch-white);
    border-radius: 10px;
    padding: 16px;
    box-shadow: var(--ch-shadow);
    transition: var(--ch-transition);
}

.news-item:hover { box-shadow: var(--ch-shadow-hover); transform: translateX(4px); }

.news-item-img {
    width: 120px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ch-light);
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    color: var(--ch-dark);
}

.news-item-title a { color: inherit; }

.news-item-meta {
    font-size: 12px;
    color: #aaa;
}

/* ============================================
   BUSINESS DIRECTORY SECTION
   ============================================ */
.directory-section {
    background: var(--ch-light);
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.biz-card {
    background: var(--ch-white);
    border-radius: var(--ch-radius);
    overflow: hidden;
    box-shadow: var(--ch-shadow);
    transition: var(--ch-transition);
}

.biz-card:hover { transform: translateY(-6px); box-shadow: var(--ch-shadow-hover); }

.biz-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--ch-light);
}

.biz-card-body {
    padding: 16px;
}

.biz-card-tag {
    display: inline-block;
    background: #e8f5e9;
    color: var(--ch-primary);
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 600;
}

.biz-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ch-dark);
}

.biz-card-title a { color: inherit; }

.biz-card-info {
    font-size: 13px;
    color: var(--ch-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.biz-card-info svg { width: 14px; height: 14px; flex-shrink: 0; }

.directory-cta {
    text-align: center;
    margin-top: 36px;
}

.btn-cta {
    display: inline-block;
    background: var(--ch-primary);
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--ch-transition);
    box-shadow: 0 4px 16px rgba(26, 86, 50, 0.3);
}

.btn-cta:hover {
    background: var(--ch-primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 86, 50, 0.4);
}

/* ============================================
   LIFE GUIDE SECTION
   ============================================ */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--ch-white);
    border-radius: var(--ch-radius);
    padding: 24px;
    box-shadow: var(--ch-shadow);
    transition: var(--ch-transition);
}

.guide-card:hover { box-shadow: var(--ch-shadow-hover); transform: translateY(-4px); }

.guide-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: #e8f5e9;
}

.guide-card:nth-child(1) .guide-icon { background: #fef3c7; }
.guide-card:nth-child(2) .guide-icon { background: #dbeafe; }
.guide-card:nth-child(3) .guide-icon { background: #fce7f3; }
.guide-card:nth-child(4) .guide-icon { background: #e0e7ff; }
.guide-card:nth-child(5) .guide-icon { background: #d1fae5; }
.guide-card:nth-child(6) .guide-icon { background: #f3e8ff; }

.guide-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--ch-dark);
}

.guide-content p {
    font-size: 13px;
    color: var(--ch-gray);
    margin: 0;
}

/* ============================================
   COMMUNITY / ANNOUNCEMENT SECTION
   ============================================ */
.community-section {
    background: linear-gradient(135deg, #0d3b1f 0%, #1a5632 100%);
    color: #fff;
}

.community-section .section-title { color: #fff; }
.community-section .section-title::before { background: var(--ch-accent); }

.community-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.community-notice {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--ch-radius);
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.community-notice h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.notice-list li:last-child { border-bottom: none; }

.notice-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ch-accent);
    flex-shrink: 0;
}

.community-qr {
    text-align: center;
}

.community-qr img {
    width: 180px;
    height: 180px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.community-qr p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #111827;
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 0;
    margin-top: 0;
}

.footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.footer-brand .footer-logo {
    max-height: 50px;
    margin-bottom: 16px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    padding: 6px 0;
    font-size: 14px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--ch-transition);
}

.footer-col ul li a:hover {
    color: var(--ch-accent);
    padding-left: 4px;
}

.footer-contact p {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .directory-grid { grid-template-columns: repeat(2, 1fr); }
    .guide-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: 1fr; }
    .community-wrap { grid-template-columns: 1fr; }
    .footer-wrap { grid-template-columns: 1fr 1fr; gap: 30px; }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .hero-section { min-height: 400px; }
    .hero-title { font-size: 28px; letter-spacing: 1px; }
    .hero-subtitle { font-size: 15px; }
    .hero-search { flex-direction: row; border-radius: 12px; }
    .hero-search input { padding: 14px 16px; font-size: 14px; }
    .hero-search button { padding: 0 20px; font-size: 14px; }
    .hero-tags { gap: 8px; }
    .hero-tags a { font-size: 12px; padding: 3px 12px; }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        margin-top: -40px;
        gap: 12px;
    }
    .service-card { padding: 20px 12px; }
    .service-icon { width: 48px; height: 48px; font-size: 22px; }
    .service-title { font-size: 15px; }
    .service-desc { font-size: 12px; }

    .section { padding: 40px 16px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .section-title { font-size: 22px; }

    .news-item { flex-direction: column; }
    .news-item-img { width: 100%; height: 160px; }

    .directory-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .biz-card-img { height: 140px; }
    .biz-card-body { padding: 12px; }
    .biz-card-title { font-size: 14px; }

    .guide-grid { grid-template-columns: 1fr; gap: 12px; }
    .guide-card { padding: 16px; }

    .footer-wrap { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { font-size: 12px; }

    .community-notice { padding: 20px; }
    .community-notice h3 { font-size: 18px; }

    .btn-cta { padding: 12px 32px; font-size: 14px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 24px; }
    .hero-subtitle { font-size: 13px; }
    .services-grid { grid-template-columns: 1fr; }
    .directory-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PAGE TEMPLATES
   ============================================ */
.page-header-bar {
    background: linear-gradient(135deg, #0d3b1f 0%, #1a5632 100%);
    color: #fff;
    padding: 48px 0;
    text-align: center;
}

.page-header-bar h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
}

.page-header-bar p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.content-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Contact Page */
.contact-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.contact-info h3 {
    font-size: 20px;
    color: var(--ch-dark);
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 15px;
    color: var(--ch-gray);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-qr {
    text-align: center;
}

.contact-qr img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .contact-page { grid-template-columns: 1fr; }
    .page-header-bar { padding: 32px 0; }
    .page-header-bar h1 { font-size: 24px; }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
    }
    .menu-toggle span {
        width: 24px;
        height: 3px;
        background: #333;
        border-radius: 2px;
        transition: var(--ch-transition);
    }
}
