/* 
   ========================================
   GLOBAL VARIABLES & BASIC SETUP
   ========================================
*/
:root {
    --primary-color: #00baa4;
    /* Goldwind Teal */
    --secondary-color: #005eb8;
    /* Blue */
    --text-color: #333;
    --light-text: #fff;
    --bg-light: #f9f9f9;
    --header-height: 80px;
    --logo-top: 18px;
    --logo-left: 60px;
    --logo-width: 45px;
    --login-bottom: 20px;
    --login-right: 20px;
    --content-top: 35%;
    --content-left: 15%;
    --content-width: 500px;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/*
   ========================================
   HEADER & NAVIGATION
   ========================================
*/
.header {
    background: transparent;
    /* Gradient background specific to homepage or default if not overridden */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);

    height: var(--header-height);
    position: fixed;
    /* Sticky header like Goldwind */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: center;
    /* Push Auth buttons to right */
    align-items: center;
    height: 100%;
    position: relative;
    /* Allow absolute positioning of Nav */
}

.logo {
    position: fixed;
    top: var(--logo-top);
    left: var(--logo-left);
    z-index: 2000;
}

.logo-img {
    width: var(--logo-width);
    height: auto;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    padding: 10px 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.main-nav a:hover::after {
    width: 100%;
}

/* 
   LOGIN BUTTON [FIXED POSITION]
*/
.fixed-login-btn {
    position: fixed;
    top: 25px;
    right: 40px;
    bottom: auto;
    z-index: 2000;

    padding: 8px 25px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background: transparent;
    transition: all 0.3s ease;
}

.fixed-login-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 186, 164, 0.3);
}

/* 
   ========================================
   FULL SCREEN SLIDER
   ========================================
*/
body,
html {
    height: 100%;
    overflow: hidden;
    /* Prevent scrolling */
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #333;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 1;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Image layer for Goldwind-style transition */
.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.08);
    filter: blur(10px);
    transition: transform 2s ease, filter 2s ease;
    z-index: 0;
}

.slide.active .slide-bg {
    transform: scale(1);
    filter: blur(0);
}

/* Dark overlay structure */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    /* Slightly darker for better text contrast */
    z-index: 1;
    pointer-events: none;
}

/* 
    TEXT ANIMATIONS 
    Gradual fade-in only
*/
.slide-content {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: fit-content;
    /* Container fits the text length */
    max-width: 90%;
    /* Prevent overflow on mobile */
    text-align: left;
    /* Left align text relative to each other */
    z-index: 2;
    padding: 0;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.slide.active .slide-content {
    opacity: 1;
}

.slide-content h1 {
    font-size: 56px;
    margin-bottom: 20px;
    font-weight: 300;
}

.slide-content h2 {
    font-size: 52px;
    /* Slightly larger as in image */
    margin: 0;
    font-weight: 500;
    /* Bolder as in image */
    white-space: nowrap;
    line-height: 1.2;
}

.slide-content p {
    font-size: 16px;
    /* Smaller as in image */
    margin-bottom: 8px;
    /* Tightly packed */
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.9);
}

.read-more-btn {
    display: inline-block;
    padding: 10px 0;
    border: none;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s;
}

.read-more-btn:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

/* 
   ========================================
   SLIDER CONTROLS (Arrows)
   ========================================
*/
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.prev-btn {
    left: 40px;
}

.next-btn {
    right: 40px;
}

/* 
   ========================================
   PAGINATION (Timeline Style)
   ========================================
*/
.slider-pagination-container {
    position: absolute;
    bottom: 80px;
    /* Lifted up */
    left: 15%;
    /* Left aligned */
    width: auto;
    /* Allow growth */
    max-width: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Start from left */
    transform: scale(0.9);
    /* Scaled down slightly */
    transform-origin: left bottom;
    /* Anchor scale */
}


/* Dynamic Progress Line for Timer */

/* Split Line Implementation: Lines extend from the active dot outwards, leaving a gap */
.dot-wrapper.active {
    position: relative;
}

.dot-wrapper.active::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    /* Start from left edge of dot, go left */
    width: 200vw;
    /* Long enough to cover screen */
    height: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%);
    pointer-events: none;
}

.dot-wrapper.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    /* Start from right edge of dot, go right */
    width: 200vw;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%);
    pointer-events: none;
}


.pagination-items {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: max-content;
    /* Fit content to allow sliding */
    gap: 80px;
    /* Space between dots */
    position: relative;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    /* Smooth slide */
}

.dot-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Default Dot */
.dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Active State: Capsule with Text */
.dot-wrapper.active .dot {
    width: 100px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    /* Matches slider-container to hide dots behind */
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    /* Capsule shape */
    padding: 5px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    position: relative;
    /* Ensure it sits on top */
    z-index: 2;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide text content inside normal dots, show in active */
.dot-text {
    display: none;
}

.dot-wrapper.active .dot-text {
    display: inline;
}

/* Progress ring around the active capsule */
.dot-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.dot-progress rect {
    fill: transparent;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.progress-active {
    stroke: #fff;
    stroke-width: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: ringFill 5s linear forwards;
}

@keyframes ringFill {
    to {
        stroke-dashoffset: 0;
    }
}

/* 
   ========================================
   FOOTER
   ========================================
*/
.footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through empty areas */
    line-height: 1.5;
}

.footer p {
    margin: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer a {
    pointer-events: auto;
    /* Re-enable clicks for links */
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    /* Space between icon and text */
}

.footer img {
    height: 14px;
    /* Match text size approx */
    width: auto;
    display: block;
}

/* 
   ========================================
   RESPONSIVE DESIGN (Mobile Adaptation)
   ========================================
*/
@media (max-width: 1024px) {
    :root {
        --logo-top: 15px;
        --logo-left: 15px;
        --logo-width: 35px;
        --header-height: 60px;
        --content-width: 90%;
    }

    /* 1. Header & Logo Adjustment */
    .logo {
        top: var(--logo-top);
        left: var(--logo-left);
    }

    .logo-img {
        width: var(--logo-width);
    }

    /* 2. Mobile Menu Toggle - Moved to right side to avoid logo overlap */
    .menu-toggle {
        display: block !important;
        position: fixed;
        top: 20px;
        right: 85px;
        /* Away from logo (left) and Login button (right: 15px) */
        left: auto;
        z-index: 3000;
        cursor: pointer;
        padding: 5px;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--primary-color);
        margin: 5px 0;
        transition: 0.3s;
    }

    /* Change toggle to X when active */
    .nav-active .menu-toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 5px);
    }

    .nav-active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-active .menu-toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -5px);
    }

    /* Mobile Nav Side Panel (75% Width, Right-to-Left) */
    /* Mobile Nav Side Panel (75% Width, Right-to-Left) */
    .main-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -75%;
        /* Hidden on the right */
        left: auto;
        width: 75%;
        /* Covers 3/4 of the screen */
        height: 100vh;
        background: #fff;
        /* White background */
        flex-direction: column;
        justify-content: flex-start;
        /* Start from top */
        align-items: stretch;
        /* Full width items */
        transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 2500;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        padding-top: 80px;
        /* Space at top */
    }

    .nav-active .main-nav {
        right: 0;
        /* Slide in to the right edge */
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #eee;
        /* Divider line */
    }

    .main-nav a {
        display: block;
        width: 100%;
        font-size: 18px;
        color: #333 !important;
        /* Dark text for white BG */
        font-weight: 400;
        padding: 22px 30px;
        /* Spaced out as in image */
        box-sizing: border-box;
    }

    /* Removed the side overlay to keep the background clear */
    header.nav-active::before {
        content: none;
        /* Removed the dimming effect as requested */
    }

    /* 3. Login Button Adjustment */
    .fixed-login-btn {
        top: 20px;
        right: 15px;
        padding: 6px 15px;
        font-size: 13px;
        z-index: 3000;
    }

    /* 4. Index Slider Text Adjustment */
    .slide-content {
        width: 85%;
        max-width: none;
        top: 40%;
    }

    .slide-content h2 {
        font-size: 24px !important;
        white-space: normal !important;
        line-height: 1.4;
        font-weight: 500;
    }

    .slide-content p {
        font-size: 14px !important;
        margin-bottom: 5px;
    }

    /* 5. Pagination (Timeline) Adjustment - Moved up to avoid footer overlap */
    .slider-pagination-container {
        bottom: 110px;
        left: 0;
        width: 100%;
        padding-left: 20px;
        box-sizing: border-box;
        transform: scale(0.7);
        transform-origin: left bottom;
        display: flex;
        justify-content: flex-start;
        overflow: visible;
        z-index: 100;
    }

    /* 6. Slider Buttons Adjustment - Moved up to avoid footer overlap */
    .slider-btn {
        top: auto;
        bottom: 165px;
        transform: none;
        width: 40px;
        height: 40px;
        font-size: 16px;
        z-index: 101;
    }

    .prev-btn {
        left: auto;
        right: 70px;
    }

    .next-btn {
        right: 20px;
    }

    /* 7. Footer Adjustment */
    .footer {
        font-size: 11px;
        bottom: 10px;
        background: transparent;
        padding: 5px 0;
        z-index: 50;
    }

    .footer p {
        flex-wrap: wrap;
        gap: 5px;
    }
}

/* Hidden by default on desktop */
.menu-toggle {
    display: none;
}