/* --- CSS Variables --- */
:root {
    --navy-blue: #0a192f;
    --dark-slate: #1d3557;
    --light-slate: #457b9d;
    --accent-blue: #a8dadc;
    --silver-accent: #f1faee;
    --white: #ffffff;
    --font-family: 'Montserrat', sans-serif;
    --header-height: 80px;
}

/* --- Basic Reset & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--navy-blue);
    line-height: 1.2;
}
h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--light-slate); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-blue); }

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid #e0e0e0;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    height: 45px;
    width: auto;
}

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

.nav-links a {
    font-weight: 600;
    color: var(--dark-slate);
    position: relative;
    padding: 5px 0;
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--navy-blue);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- Buttons --- */
.btn {
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--light-slate);
    color: var(--white);
    border-color: var(--light-slate);
}
.btn-primary:hover {
    background-color: var(--dark-slate);
    border-color: var(--dark-slate);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-slate);
    border-color: var(--light-slate);
}
.btn-secondary:hover {
    background-color: var(--light-slate);
    color: var(--white);
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    background: url('hero-background.png') no-repeat center center/cover;
    position: relative;
    color: var(--white);
    padding: 0 20px;
}
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7); /* Navy blue overlay */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}
.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--silver-accent);
}

/* --- General Section Styling --- */
main section {
    padding: 80px 0;
}
main section:nth-of-type(odd) {
    background-color: #f8f9fa;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    color: var(--dark-slate);
}

/* --- Info Section --- */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}
.info-box i {
    font-size: 2.5rem;
    color: var(--light-slate);
    margin-bottom: 1rem;
}

/* --- About Preview Section --- */
.about-preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-preview-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Services Preview Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}
.service-card a {
    font-weight: 600;
    color: var(--light-slate);
}
.service-card a:hover {
    color: var(--dark-slate);
}

/* --- Why Choose Us Section --- */
.why-choose-us-section {
    background-color: var(--white);
}
.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.why-card {
    text-align: center;
    padding: 20px;
}
.why-card i {
    font-size: 2.5rem;
    color: var(--light-slate);
    margin-bottom: 1rem;
    display: inline-block;
    background-color: #eaf4f4;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
}

/* --- How It Works Section --- */
.how-it-works-section {
    background-color: #f8f9fa;
}
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
    position: relative;
}
.step-card {
    text-align: center;
    padding: 20px;
}
.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--light-slate);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
}
.steps-container .step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 45px;
    transform: translateY(-50%) translateX(25%);
    width: 70%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent-blue), var(--accent-blue) 4px, transparent 4px, transparent 8px);
}
@media (max-width: 1150px) and (min-width: 901px) {
   .steps-container .step-card:nth-child(3)::after { display: none; }
}
@media (max-width: 900px) {
    .steps-container .step-card::after { display: none; }
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: var(--white);
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background-color: #f8f9fa;
    border-left: 5px solid var(--accent-blue);
    padding: 30px;
    border-radius: 5px;
}
.testimonial-card p {
    font-style: italic;
    margin-bottom: 20px;
}
.testimonial-author {
    text-align: left;
}
.testimonial-author h4 {
    margin: 0;
    color: var(--navy-blue);
}
.testimonial-author span {
    font-size: 0.9rem;
    color: var(--light-slate);
}

/* --- Trustpilot Section --- */
.trustpilot-section {
    background-color: var(--navy-blue);
    padding: 40px 0;
}
.trustpilot-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: var(--white);
}
.trustpilot-content h3 {
    color: var(--white);
    font-size: 1.5rem;
}
.trustpilot-stars {
    color: #00b67a; /* Trustpilot green */
    font-size: 1.5rem;
}
.trustpilot-content p {
    margin: 0;
}
.trustpilot-logo-link {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}
.trustpilot-logo-link i {
    color: #00b67a;
}

/* --- Download App Section --- */
.download-app-section {
    text-align: center;
    background: #f8f9fa url('hero-background.png') no-repeat center center/cover;
    position: relative;
}
.download-app-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 249, 250, 0.9);
}
.download-app-section .container {
    position: relative;
    z-index: 1;
}
.download-app-section h2 {
    color: var(--navy-blue);
}
.download-app-section .section-subtitle {
    color: var(--dark-slate);
}
.app-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.app-button {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.3s ease;
    text-align: left;
}
.app-button:hover {
    background-color: var(--dark-slate);
    color: var(--white);
}
.app-button i {
    font-size: 2.5rem;
}
.app-button div {
    display: flex;
    flex-direction: column;
}
.app-button span {
    font-size: 0.8rem;
    text-transform: uppercase;
}
.app-button strong {
    font-size: 1.2rem;
}

/* --- Insights Preview Section --- */
.insights-preview-section {
    background-color: var(--navy-blue);
    color: var(--white);
}
.insights-preview-section h2, .insights-preview-section .section-subtitle {
    color: var(--white);
}
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.insight-card {
    background: var(--dark-slate);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.insight-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.insight-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.insight-content h3 { color: var(--silver-accent); }
.insight-content p { color: var(--accent-blue); }
.insight-content a {
    color: var(--accent-blue);
    font-weight: 600;
    margin-top: auto;
}
.insights-preview-section .btn-primary {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--navy-blue);
    color: var(--silver-accent);
    padding: 60px 0 20px 0;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}
.footer-about p {
    color: var(--accent-blue);
}
.footer-links h4, .footer-contact h4, .footer-social h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a, .footer-contact a {
    color: var(--accent-blue);
}
.footer-links a:hover, .footer-contact a:hover {
    color: var(--white);
    text-decoration: underline;
}
.footer-contact p {
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}
.footer-contact ul {
    list-style: none;
    margin-bottom: 1rem;
}
.footer-contact li {
    margin-bottom: 0.5rem;
}

.social-icons a {
    color: var(--silver-accent);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: var(--accent-blue);
}
.footer-bottom {
    border-top: 1px solid var(--dark-slate);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent-blue);
}
.disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* --- Pop-up Notification --- */
.trade-popup {
    position: fixed;
    background-color: rgba(10, 25, 47, 0.9);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    border-left: 4px solid var(--accent-blue);
}

.trade-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.trade-popup .country-flag {
    width: 24px;
    height: auto;
}

.trade-popup p {
    margin: 0;
    line-height: 1.4;
}

.trade-popup .user-name {
    font-weight: bold;
    color: var(--silver-accent);
}

.trade-popup .trade-amount {
    font-weight: bold;
}

.trade-popup .trade-amount.win {
    color: #28a745; /* Green for win */
}

.trade-popup .trade-amount.loss {
    color: #dc3545; /* Red for loss */
}

/* --- Auth Pages --- */
.auth-body {
    background-color: var(--navy-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-logo {
    height: 60px;
    margin-bottom: 25px;
}

.auth-container h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.auth-container p {
    color: var(--dark-slate);
    margin-bottom: 25px;
}

.auth-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-slate);
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

.auth-links {
    margin-top: 20px;
    font-size: 0.9rem;
}
.auth-links a {
    color: var(--light-slate);
    text-decoration: underline;
}

.auth-links .separator {
    margin: 0 10px;
}

/* --- Animations --- */
.animate-on-load {
    animation: fadeInSlideUp 0.8s ease-out forwards;
    opacity: 0;
}
.hero-content h1.animate-on-load { animation-delay: 0.2s; }
.hero-content p.animate-on-load { animation-delay: 0.4s; }
.hero-content .btn.animate-on-load { animation-delay: 0.6s; }

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- PAGE SPECIFIC STYLES --- */
.page-header {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background: var(--navy-blue);
    color: var(--white);
    text-align: center;
}
.page-header h1 { color: var(--white); }
.page-header p { color: var(--silver-accent); max-width: 800px; margin-left: auto; margin-right: auto; }
.page-header.with-image {
    min-height: 40vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-header.with-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
}
.page-header.with-image .container {
    position: relative;
    z-index: 1;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
}
.policy-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.policy-content ul {
    list-style-position: inside;
    padding-left: 1rem;
}

/* About Page */
.mission-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.mission-section img {
    width: 100%;
    border-radius: 10px;
}

.who-we-are-section {
    background-color: #f8f9fa;
}
.who-we-are-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
.who-we-are-content h2, .our-promise-text h2 {
    text-align: left;
}
.our-promise-text ul {
    list-style: none;
    padding-left: 0;
}
.our-promise-text li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}
.our-promise-text li::before {
    content: '\f058';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--light-slate);
}

.values-section .values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}
.value-card {
    padding: 20px;
}
.value-card i {
    font-size: 2rem;
    color: var(--light-slate);
    margin-bottom: 1rem;
}

/* Services Page */
.service-detail-section {
    padding: 60px 0;
}
.service-detail-section:nth-of-type(even) {
    background-color: #f8f9fa;
}
.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.service-detail-section:nth-of-type(odd) .service-detail-content {
    grid-template-columns: 1fr 1fr;
}
.service-detail-section:nth-of-type(even) .service-detail-content {
    grid-template-columns: 1fr 1fr;
}
.service-detail-section:nth-of-type(even) .service-detail-text {
    order: 2;
}

.service-detail-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.service-detail-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}
.service-detail-text ul {
    list-style: none;
    padding-left: 0;
}
.service-detail-text li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}
.service-detail-text li::before {
    content: '\f058'; /* Font Awesome check-circle */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--light-slate);
}

/* Insights Page */
.blog-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}
.blog-post-card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.blog-post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.blog-post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.blog-post-content .meta {
    font-size: 0.9rem;
    color: var(--light-slate);
    margin-bottom: 10px;
}
.blog-post-content a {
    margin-top: auto;
    font-weight: 600;
}

/* Contact Page */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-info h3 {
    margin-bottom: 1.5rem;
}
.contact-info p {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}
.contact-info i {
    font-size: 1.5rem;
    color: var(--light-slate);
    width: 25px;
    text-align: center;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 3rem; }
    .about-preview-content, .mission-section, .who-we-are-content { grid-template-columns: 1fr; }
    .about-preview-image { margin-top: 30px; }
    .service-detail-content,
    .service-detail-section:nth-of-type(even) .service-detail-content {
        grid-template-columns: 1fr;
    }
    .service-detail-section:nth-of-type(even) .service-detail-text {
        order: 0;
    }
    .service-detail-image {
        margin-top: 30px;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--navy-blue);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    .main-nav.open {
        right: 0;
    }
    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .nav-links a {
        color: var(--white);
        font-size: 1.2rem;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .mobile-nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content h1 { font-size: 2.5rem; }
    main section { padding: 60px 0; }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-contact p, .footer-social .social-icons {
        justify-content: center;
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}