/* Base Reset */
:root {
    --primary-blue: #002c53;
    --primary-red: #e3000f;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #666666;
    --bg-light: #f8f9fa;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 44, 83, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px;
}


body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

li p {
    margin: 0;
}

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

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

/* Reusable Components */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #cc000d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-padding {
    padding: 80px 0;
}

.bg-gray {
    background-color: var(--bg-light);
}

/* 1. Navigation & 2. Hero Banner (Integrated) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.header-hero-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: var(--transition);
    position: relative;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--primary-blue);
    cursor: pointer;
}

.site-header.scrolled .navbar {
    padding: 10px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

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

.hero-section {
    padding: 80px 0 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 54px;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* 3. Advantages */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.advantage-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--primary-red);
}

.adv-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 44, 83, 0.05);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.advantage-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.advantage-card p {
    color: var(--text-gray);
    font-size: 15px;
}

/* 4. What is FxPro Rebate */
.split-section {
    display: flex;
    align-items: center;
    gap: 50px;
}

.split-content {
    flex: 1;
}

.split-content h2 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.split-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 16px;
}

.split-image {
    flex: 1;
}

.split-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.reverse .split-content {
    order: 2;
}

.reverse .split-image {
    order: 1;
}

/* Account Types */
.account-types {
    margin-top: 60px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.account-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.account-header {
    background-color: var(--primary-blue);
    padding: 30px 20px;
    color: var(--white);
    transition: var(--transition);
}

.account-body {
    padding: 30px;
}

.account-card.popular .account-header {
    background-color: var(--primary-red);
}

.account-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.account-card.popular::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-red);
    z-index: 10;
}

.account-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.account-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 0;
    min-height: auto;
}

.account-features {
    text-align: left;
    margin-bottom: 30px;
}

.account-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 14px;
}

.account-features li p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.account-features li em {
    color: var(--primary-red);
    font-size: 14px;
}

.account-features li:last-child {
    border-bottom: none;
}

/* 5. Rebate Standards Table */
.table-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
}

.rebate-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.rebate-table th,
.rebate-table td {
    padding: 18px 20px;
    text-align: left;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.rebate-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
}

.rebate-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.rebate-table tr:hover {
    background-color: #f1f5f9;
}

.rebate-table td {
    color: var(--text-dark);
    font-size: 15px;
}

.table-action {
    text-align: center;
    margin-top: 30px;
}

/* 6. Opening Guide Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.step-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(227, 0, 15, 0.3);
}

.step-title {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 600;
}

.step-card p {
    color: var(--text-gray);
    font-size: 14px;
}

/* 9. FAQ Section */
.faq-container {
    width: 100%;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-gray);
    font-size: 15px;
    display: none;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
    padding-top: 15px;
}

.faq-item.active .faq-answer {
    display: block;
}

/* 10. CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004282 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}

.cta-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-risk {
    margin-top: 30px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 11. Footer */
.footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .advantages-grid,
    .account-grid,
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-section {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 80px 0 20px;
        transition: var(--transition);
        z-index: 1001;
        display: flex;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        padding: 15px 30px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
        font-size: 16px;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .advantages-grid,
    .account-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 36px;
    }


}

/* 12. Homepage News Module */
.home-news-list {
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 60px;
}

.home-news-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px dashed var(--border-color);
    transition: var(--transition);
    color: var(--text-dark);
}

.home-news-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.home-news-item:hover {
    background-color: #f8fafc;
    color: var(--primary-red);
}

.news-num {
    width: 28px;
    height: 28px;
    background: var(--bg-light);
    color: var(--text-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

.home-news-item:nth-child(1) .news-num { background: var(--primary-red); color: var(--white); }
.home-news-item:nth-child(2) .news-num { background: #ff4d4f; color: var(--white); }
.home-news-item:nth-child(3) .news-num { background: #ff7875; color: var(--white); }

.news-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    margin-right: 20px;
}

.news-date {
    color: var(--text-gray);
    font-size: 14px;
    flex-shrink: 0;
}

/* 13. Article List Page (news.html) */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004282 100%);
    color: var(--white);
    padding: 150px 0 60px; /* Offset for fixed header */
    text-align: center;
}

.page-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 18px;
    opacity: 0.8;
}

.article-list {
    width: 100%;
    margin: 0 auto;
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--primary-blue);
}

.article-card h2 {
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.article-card h2 a {
    transition: var(--transition);
}

.article-card h2 a:hover {
    color: var(--primary-red);
}

.article-meta {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}

.article-excerpt {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary-red);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}
.page-link,.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}


.page-link:hover, .page-link.active, .page-num.page-num-current {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* 14. Article Detail Page (news-detail.html) */
.article-detail {
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    padding: 60px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.article-header h1 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h3 {
    font-size: 24px;
    color: var(--primary-blue);
    margin: 30px 0 15px;
}

.back-to-list {
    display: inline-block;
    margin-top: 40px;
    color: var(--primary-blue);
    font-weight: 600;
    transition: var(--transition);
}

.back-to-list:hover {
    color: var(--primary-red);
}

@media (max-width: 768px) {
    .article-detail { padding: 30px 20px; }
    .article-header h1 { font-size: 28px; }
    .news-title { white-space: normal; }
}

@media (max-width: 992px) {
    .home-news-list {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .home-news-item:nth-last-child(-n+2) {
        border-bottom: 1px dashed var(--border-color);
    }
    .home-news-item:last-child {
        border-bottom: none;
    }
}

/* 15. Breadcrumbs & Top Ad Banner */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.4;
}

.breadcrumb span {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .breadcrumb span {
        max-width: 150px; /* Limit title width on mobile */
    }
}


.breadcrumb a {
    color: var(--primary-blue);
    font-weight: 500;
    transition: var(--transition);
}

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

.breadcrumb em {
    font-size: 10px;
    opacity: 0.6;
}

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

.top-ad-banner {
    background: linear-gradient(135deg, var(--primary-red) 0%, #cc0000 100%);
    border-radius: 8px;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--white);
    box-shadow: 0 10px 20px rgba(227, 0, 15, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.top-ad-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(227, 0, 15, 0.4);
}

.top-ad-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.7s ease;
}

.top-ad-banner:hover::before {
    left: 200%;
}

.top-ad-banner .btn {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.top-ad-banner:hover .btn {
    transform: scale(1.05);
}

.top-ad-banner .ad-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.top-ad-banner .ad-content p {
    font-size: 16px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .top-ad-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    .top-ad-banner .ad-content h3 {
        font-size: 20px;
    }
}

/* 16. Article Navigation (Prev/Next) */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

.article-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-decoration: none;
}

.article-nav a:hover {
    background: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.article-nav .next-article {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.4;
    transition: var(--transition);
}

.article-nav a:hover .nav-title {
    color: var(--primary-red);
}

@media (max-width: 768px) {
    .article-nav {
        flex-direction: column;
        gap: 15px;
    }
    .article-nav .next-article {
        text-align: left;
        align-items: flex-start;
    }
}

/* 15. Related Posts Module (Title List) */
.related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.related-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--primary-red);
    border-radius: 2px;
}

.related-list {
    list-style: none;
}

.related-list li {
    border-bottom: 1px solid var(--border-color);
}

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

.related-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    transition: var(--transition);
    border-radius: 4px;
}

.related-list a:hover {
    background-color: #f8fafc;
    color: var(--primary-red);
    padding-left: 15px;
}

.rel-title {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

.rel-date {
    font-size: 14px;
    color: var(--text-gray);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .related-list a {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .rel-title {
        white-space: normal;
        margin-right: 0;
    }
}