/* China Guide - Main Stylesheet */
/* Theme: Deep Green + Gold (China inspired) */

:root {
    /* Primary Colors - Deep Green */
    --primary-color: #1a5f3c;
    --primary-dark: #134a2e;
    --primary-light: #2d8a5c;
    
    /* Accent - Gold */
    --accent-color: #c9a227;
    --accent-dark: #a68519;
    --accent-light: #e0bc3d;
    
    /* Neutrals */
    --bg-color: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1a1a2e;
    --text-medium: #4a4a5a;
    --text-light: #7a7a8a;
    --border-color: #e5e7eb;
    
    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.navbar-brand .logo {
    font-size: 1.8rem;
}

.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

.navbar-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255,255,255,0.15);
    color: var(--accent-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #fff;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.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,162,39,0.1)" stroke-width="0.5"/></svg>');
    background-size: 200px;
    opacity: 0.3;
}

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

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: #fff;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-left: 3rem;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    outline: none;
    transition: box-shadow 0.2s ease;
}

.search-box input:focus {
    box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-color);
}

.search-box .search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: var(--spacing-sm);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results .result-section {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.search-results .result-section:last-child {
    border-bottom: none;
}

.search-results h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.search-results .result-item {
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.search-results .result-item:hover {
    background: var(--bg-color);
}

.search-results .result-item a {
    color: var(--text-dark);
    text-decoration: none;
}

.search-results .result-item a:hover {
    color: var(--primary-color);
}

/* Section Styling */
.section {
    padding: var(--spacing-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    color: var(--text-medium);
    font-size: 1.1rem;
}

.section-header .accent {
    color: var(--accent-color);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.card-body {
    padding: var(--spacing-lg);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--accent-color);
}

.card-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.card-desc {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

/* Stats */
.city-stats, .university-stats {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Rankings */
.university-rankings {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.ranking {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: #fff;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--bg-color);
}

/* Filters */
.filters {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Detail Page */
.detail-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: var(--spacing-xxl) 0;
    margin-bottom: var(--spacing-xl);
}

.detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: #fff;
}

.detail-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
}

.detail-main {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.sidebar-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-sm);
}

/* Info List */
.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Requirements List */
.requirements-list {
    list-style: none;
    counter-reset: req-counter;
}

.requirements-list li {
    counter-increment: req-counter;
    padding: var(--spacing-sm) 0;
    padding-left: 2rem;
    position: relative;
}

.requirements-list li::before {
    content: counter(req-counter);
    position: absolute;
    left: 0;
    top: var(--spacing-sm);
    width: 1.5rem;
    height: 1.5rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Page Navigation */
.page-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: #fff;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--accent-light);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    padding: var(--spacing-xs) 0;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: #fff;
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    opacity: 0.95;
}

/* Loading State */
.loading {
    text-align: center;
    padding: var(--spacing-xxl);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar {
        order: -1;
    }
}

/* Additional Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--accent-color); }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
