/* --- Core Variables for Light Theme --- */
:root {
    --theme-bg: #ffffff;
    --theme-text: #000000;
    --theme-accent: #000000;
    --theme-accent-light: #000000;
    --card-bg: #f7fafc;
    --card-border: #e2e8f0;
    --text-muted: #4a5568;
}

body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

/* PROCESS SECTION STYLES */
.process-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-color: var(--theme-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--theme-text);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* TIMELINE CONTAINER */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* The Vertical Line */
.timeline::after {
    content: "";
    position: absolute;
    width: 2px;
    background: var(--theme-accent-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 0; /* FIX: Ensure line stays at the back */
}

/* CONTAINER FOR EACH ITEM */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transition: all 0.8s ease;
    z-index: 1; /* Keep content above line */
}

/* Initial positions for animation */
.timeline-item.left {
    left: 0;
    text-align: right;
    transform: translateX(-50px);
}

.timeline-item.right {
    left: 50%;
    text-align: left;
    transform: translateX(50px);
}

/* THE DOTS */
.timeline-item::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--theme-bg);
    border: 3px solid var(--theme-accent);
    top: 25px;
    border-radius: 50%;
    z-index: 10; /* FIX: High z-index to stay ABOVE the line */
    transition: all 0.3s ease;
}

/* Fix dot position for right side */
.right::after {
    left: -10px;
}

/* Hover effect on dot */
.timeline-item:hover::after {
    background-color: var(--theme-accent);
    transform: scale(1.2);
}

/* CONTENT BOX CARD */
.content {
    padding: 30px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    position: relative;
    transition:
        transform 0.3s,
        box-shadow 0.3s,
        border-color 0.3s;
}

.content:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.content h3 {
    margin: 0 0 10px 0;
    color: var(--theme-accent);
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.content p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ANIMATION STATE (Triggered by JS) */
.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   RESPONSIVE PROCESS FIX
   (Paste this at the bottom of your CSS file)
   ========================================= */

/* 1. TABLET & MOBILE (Max-Width 768px) */
@media screen and (max-width: 768px) {
    /* Move the vertical line to the left */
    .timeline::after {
        left: 31px;
    }

    /* Reset the container width */
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        margin-bottom: 30px; /* Adds space between stacked cards */
    }

    /* --- THE CRITICAL FIX --- */
    /* We use .timeline-item.right to explicitly override the desktop 'left: 50%' */
    .timeline-item.left,
    .timeline-item.right {
        left: 0 !important; /* Force align to the left edge */
        text-align: left; /* Ensure text aligns left */

        /* Reset any desktop transforms, but keep mobile vertical animation */
        transform: translateY(30px);
    }

    /* Align the Dots with the new line position */
    .timeline-item::after,
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 21px; /* Align centers with the line at 31px */
        right: auto; /* Reset any right-side positioning */
    }

    /* Ensure animation still works */
    .timeline-item.visible {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 2. SMALL MOBILE OPTIMIZATION (480px & Below) */
/* Fixes content being too squeezed on small screens */
@media screen and (max-width: 480px) {
    /* Move line even closer to edge to save space */
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        padding-left: 50px; /* Give text more width */
        padding-right: 15px;
    }

    /* Re-align dots for the 20px line */
    .timeline-item::after,
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 11px;
    }

    .content {
        padding: 20px; /* Reduce internal card padding */
    }

    .section-header h2 {
        font-size: 2rem;
    }
}
