/* ============================================
   至叻粵語 - 主樣式表
   ============================================ */

:root {
    --primary: #C41E3A;
    --primary-dark: #9B1B30;
    --primary-light: #E8405A;
    --secondary: #D4A843;
    --secondary-light: #F0D078;
    --bg: #FFF8F0;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --text: #2C2C2C;
    --text-light: #666;
    --text-muted: #999;
    --border: #E8E0D5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-display: "STSong", "Songti SC", "Noto Serif SC", serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-cn);
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,248,240,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    flex-shrink: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-list a {
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
    background: var(--primary);
    color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 40%, #0F3460 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='30' y='35' font-size='28' text-anchor='middle' opacity='0.04' fill='white'%3E粵%3C/text%3E%3C/svg%3E");
    animation: bgScroll 20s linear infinite;
}

@keyframes bgScroll {
    from { background-position: 0 0; }
    to { background-position: 60px 60px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.hero h1 .highlight {
    color: var(--secondary-light);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
    font-weight: 300;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 2;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-cn);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,30,58,0.4);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--secondary);
    color: #1A1A2E;
}
.btn-gold:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,168,67,0.4);
}

/* ============================================
   Section Common
   ============================================ */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--bg-dark);
    color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-dark .section-header h2::after {
    background: var(--secondary);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-header p {
    color: rgba(255,255,255,0.7);
}

/* ============================================
   Page Hero (inner pages)
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, #C41E3A, #8B0000);
    color: #fff;
    padding: 120px 0 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='20' y='25' font-size='20' text-anchor='middle' opacity='0.05' fill='white'%3E粵%3C/text%3E%3C/svg%3E");
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 12px;
    position: relative;
}

.page-hero .breadcrumb {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    position: relative;
}

.page-hero .breadcrumb a {
    color: rgba(255,255,255,0.9);
}

/* ============================================
   Card Grid
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.card-image-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    font-family: var(--font-display);
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text);
}

.card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card-body .card-meta {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.card-link:hover {
    gap: 12px;
}

/* ============================================
   Feature Cards (Home)
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   Content Page Layout
   ============================================ */
.content-section {
    padding: 48px 0;
}

.content-block {
    margin-bottom: 48px;
}

.content-block h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 16px;
    padding-left: 16px;
    border-left: 4px solid var(--primary);
}

.content-block h3 {
    font-size: 1.2rem;
    margin: 20px 0 12px;
    color: var(--primary-dark);
}

.content-block p {
    margin-bottom: 16px;
    text-indent: 2em;
    line-height: 2;
    color: var(--text);
}

.content-block ul, .content-block ol {
    margin: 12px 0 16px 2em;
    line-height: 2;
}

.content-block li {
    margin-bottom: 8px;
}

.content-image {
    width: 100%;
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow);
}

.content-image-caption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: -16px;
    margin-bottom: 24px;
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ============================================
   Highlight Box
   ============================================ */
.highlight-box {
    background: linear-gradient(135deg, rgba(196,30,58,0.08), rgba(212,168,67,0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 24px 0;
}

.highlight-box h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

/* ============================================
   Stats
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-display);
}

.stat-label {
    color: var(--text-light);
    margin-top: 4px;
    font-size: 0.95rem;
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    opacity: 0.3;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-year {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

/* ============================================
   Table
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.data-table tr:nth-child(even) td {
    background: rgba(196,30,58,0.03);
}

.data-table tr:hover td {
    background: rgba(196,30,58,0.06);
}

/* ============================================
   Quote Block
   ============================================ */
.quote-block {
    background: var(--bg-dark);
    color: #fff;
    padding: 48px;
    border-radius: var(--radius);
    margin: 32px 0;
    text-align: center;
    position: relative;
}

.quote-block::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 5rem;
    color: rgba(255,255,255,0.1);
    font-family: serif;
    line-height: 1;
}

.quote-block p {
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 12px;
}

.quote-block cite {
    color: var(--secondary-light);
    font-style: normal;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #1A1A2E;
    color: rgba(255,255,255,0.7);
    padding: 56px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-col ul a:hover {
    color: var(--secondary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 12px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .two-col {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }
    .menu-toggle {
        display: block;
    }
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255,248,240,0.98);
        backdrop-filter: blur(12px);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .nav-list {
        flex-direction: column;
        gap: 2px;
    }
    .nav-list a {
        padding: 12px 16px;
    }
    .timeline::before {
        left: 20px;
    }
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row;
    }
    .timeline-marker {
        left: 20px;
    }
    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 48px 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .page-hero {
        padding: 100px 0 40px;
    }
}
