/* --- General Styling & CSS Variables --- */
:root {
    --primary-bg: #0a0a1a;     /* Dark Blue/Purple */
    --secondary-bg: #1a1a3a;   /* Lighter Dark Blue */
    --accent-color-1: #00f2fe; /* Cyan */
    --accent-color-2: #c62ef7; /* Magenta */
    --text-color: #e0e0e0;     /* Light Gray */
    --heading-color: #ffffff;
    --white: #ffffff;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 18px;
}

/* --- Layout & Containers --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

/* --- Header & Navigation --- */
.main-header {
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    font-weight: 700;
    font-size: 24px;
    color: var(--heading-color);
}

.lang-toggle {
    display: flex;
    align-items: stretch;
}

.lang-toggle button {
    background: none;
    border: 1px solid var(--accent-color-1);
    color: var(--accent-color-1);
    padding: 5px 12px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 110px;
    text-align: center;
}

.lang-toggle button:hover,
.lang-toggle button.active {
    background: var(--accent-color-1);
    color: var(--primary-bg);
    font-weight: 600;
}

/* --- UNIFIED HERO STYLES (Homepage is default) --- */
.hero {
    background-image: linear-gradient(rgba(10, 10, 26, 0.7), rgba(10, 10, 26, 0.7)), url('https://storage.googleapis.com/assistly-images/adariq-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 220px 0 120px 0;
}

.hero h1 {
    font-size: 56px;
    max-width: 800px;
    margin: 0 auto 20px auto;
    line-height: 1.2;
    color: var(--heading-color);
    background: -webkit-linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* --- Buttons --- */
.btn {
    background-image: linear-gradient(45deg, var(--accent-color-2), var(--accent-color-1));
    color: var(--white);
    padding: 15px 35px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(198, 46, 247, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

/* --- Product Section (Homepage) --- */
.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 42px;
    color: var(--heading-color);
}

.product-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background-color: var(--secondary-bg);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-card:nth-child(even) {
    flex-direction: row-reverse;
}

.product-image {
    flex: 1;
    max-width: 40%;
}

.product-info {
    flex: 1;
}

.product-info h2 {
    font-size: 36px;
    color: var(--heading-color);
    margin-top: 0;
}

.product-info .tagline {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color-1);
    margin-bottom: 20px;
}

/* --- Footer --- */
footer {
    background: var(--secondary-bg);
    text-align: center;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 20px;
}

.contact-info p {
    margin: 5px 0;
}

.contact-info a {
    color: var(--accent-color-1);
    text-decoration: none;
}

.copyright {
    margin-top: 30px;
    font-size: 14px;
    opacity: 0.7;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 38px;
    }
    .section-title {
        font-size: 32px;
    }
    .product-card, .product-card:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 30px;
    }
    .product-image {
        max-width: 280px;
    }
    .product-cta-group {
        justify-content: center;
    }
}

/* NEW RULE to fix header on small mobile screens */
@media (max-width: 480px) {
    .main-header .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

/* ====================================================== */
/* STYLES FOR PRODUCT CTA & DEMO LINKS                */
/* ====================================================== */
.product-cta-group {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.demo-link {
    color: var(--accent-color-1);
    font-weight: 600;
    text-decoration: none;
    display: none; /* Hide all by default */
}

.demo-link:hover {
    text-decoration: underline;
}

html[lang="en"] .demo-link.lang-en,
html[lang="zh-HK"] .demo-link.lang-zh-HK,
html[lang="zh-CN"] .demo-link.lang-zh-CN {
    display: inline-block;
}

/* ====================================================== */
/* STYLES FOR CROSS-FADE EFFECT                       */
/* ====================================================== */

/* Hide all containers by default */
.image-swap-container {
    display: none;
    width: 280px;
    height: 570px;
    margin: 0 auto;
    position: relative; /* Container for absolute children */
    box-sizing: border-box;
    /* REMOVED border and border-radius */
}

/* Show the correct language container */
html[lang="en"] .image-swap-container.lang-en,
html[lang="zh-HK"] .image-swap-container.lang-zh-HK,
html[lang="zh-CN"] .image-swap-container.lang-zh-CN {
    display: block;
}

.image-swap-before,
.image-swap-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1.5s ease-in-out;
}

.image-swap-after {
    opacity: 0; /* The "after" image is hidden by default */
}

.image-swap-container:hover .image-swap-after {
    opacity: 1; /* On hover, the "after" image becomes visible */
}

.image-swap-before img,
.image-swap-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
