@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #FF5722;
    --primary-dark: #E64A19;
    --primary-light: #FF8A65;
    --secondary-color: #0c1a32; /* Deep Navy */
    --accent-color: #FFC107;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #FFFFFF;
    --border-radius: 12px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navbar */
.navbar {
    background: transparent;
    height: 80px;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 70px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    position: fixed;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #111111;
    letter-spacing: -0.02em;
}

.logo img {
    height: 42px;
    margin-right: 12px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: #1e293b;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 1100;
}

.nav-toggle span {
    width: 100%;
    height: 2px;
    background-color: #111;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 14px 0 rgba(255, 87, 34, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.23);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: #f1f5f9;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.footer-social a:hover {
    background: var(--primary-color);
    padding-left: 0;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: #64748b;
}

/* Page Headers (for subpages) */
.page-header {
    background-color: #fcfcfc;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 70px; /* offset for navbar */
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Taller hero variant for top-level navigation pages */
.page-header-lg {
    min-height: 500px;
    padding-top: 90px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(255, 87, 34, 0.05) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #111111;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: none;
}

.page-header-lg h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.page-header p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: #666666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-header-lg p {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    max-width: 800px;
}

/* Fix the page-header date/category styling to match light theme */
.page-header div[style*="font-size: 0.9rem"] {
    color: #666666 !important;
    margin-top: 1.5rem !important;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Article Common Styles */
.article-container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1rem;
}
.article-content {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.03);
}
.article-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #111;
    line-height: 1.3;
}
.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}
.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #444;
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}
.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}

.news-header-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
    margin: -2rem auto 3rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* News Cards Fallback Styles */
.news-card .news-img {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.news-card .news-img i {
    font-size: 3.5rem; /* Increased size as per user feedback */
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.news-card .news-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.news-card .news-img img[src=""], 
.news-card .news-img img:not([src]) {
    display: none;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.section-padding { padding: 4rem 0; }

.geo-data {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.geo-data th, .geo-data td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.geo-data th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--text-color);
}

.geo-data tr:hover {
    background-color: #f9f9f9;
}

/* Ensure the absolute navbar looks good on light backgrounds before scrolling */
.navbar:not(.scrolled) .logo {
    color: #111111 !important;
}
.navbar:not(.scrolled) .nav-links a {
    color: #111111 !important;
}

/* Subtle fadeUp animation for page-header */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 1024px) {
    .container { width: 92%; }
    .footer-content { grid-template-columns: 2fr repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { height: 70px; }
    
    .nav-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2.5rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1050;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.25rem;
        width: 100%;
        text-align: left;
    }

    .nav-cta {
        display: none !important; /* Hide on mobile navbar, put in menu if needed */
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .page-header {
        min-height: 320px;
    }

    .page-header-lg {
        min-height: 400px;
    }

    .section-padding {
        padding: 4rem 0;
    }
}

/* About Page Specific Components */
.about-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(255, 87, 34, 0.05), transparent 400px),
                radial-gradient(circle at bottom left, rgba(12, 26, 50, 0.02), transparent 400px);
}

.about-quote {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
    color: var(--secondary-color);
    letter-spacing: -0.01em;
}

.about-quote mark {
    background: transparent;
    color: var(--primary-color);
}

.dual-engine-section {
    padding: 6rem 0;
}

.engine-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.engine-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.engine-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.engine-card:hover {
    transform: translateY(-10px);
}

.engine-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 87, 34, 0.1);
    color: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto;
    padding-left: 2rem;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: #e2e8f0;
    top: 0;
    bottom: 0;
    left: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 4px solid var(--white);
    border-radius: 50%;
    left: -27px;
    top: 5px;
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.1);
}

.timeline-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.timeline-year {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

@media (max-width: 768px) {
    .engine-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .about-quote {
        font-size: 1.75rem;
    }
}
