/* General Layout and Structure */
.container {
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}
.franchise-top-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap; /* Ensures responsiveness */
}
.franchise-text-content,
.franchise-image-area {
    flex: 1;
}
.process-subheading {
    text-transform: uppercase; 
    color: var(--red);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2.4px;
    line-height: 130%;
}
.process-main-heading {
    margin-top: 0;
    color: var(--brown) !important;
    font-weight: 700 !important;
    line-height: 130% !important;
}

.step-title-display {
    color: var(--red) !important;
    font-weight: 700 !important;
    font-size: 30px !important;
    line-height: 120% !important;
}

/* Content Area */
.cta-buttons {
    display: flex;
    gap: 10px;
}
.franchise-content-area {
    margin-bottom: 40px;
}
.cta-button {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}
.cta-download { 
    background-color: #B31B1B;
    color: #fff;
}
.cta-schedule { 
    background-color: #fff;
    color: #B31B1B;
    border: 2px solid #B31B1B;
}

/* --- TIMELINE STYLES --- */
.franchise-timeline-container {
    display: flex;
    justify-content: space-between;
    padding: 50px 0px 0;
    position: relative;
    /* We are removing the solid background line here, as we will use a pseudo-element line instead */
    /* If you prefer the old line, keep the old background rule: background: linear-gradient(to right, #ccc 0%, #ccc 100%); ... */
    margin-bottom: 30px;
    gap: 0px;
}
.timeline-step {
    display: flex;
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative; /* CRITICAL: Allows positioning of the arrow */
    padding-bottom: 20px;
    flex-direction: column;
    align-items: center;
    width: calc(100% / 5);
}

/* Remove the line from the first step and the left side of the container */
.franchise-timeline-container .timeline-step:first-child {
    background: none; /* No line before the first step */
}

/* Hide the arrow on the first step */
.franchise-timeline-container .timeline-step:first-child:before {
    content: none;
}

.timeline-step:hover { opacity: 1; }

.step-circle {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 36px;
    border-radius: 50%;
    color: #AAA;
    font-weight: bold;
    margin-bottom: 10px;
    transition: background-color 0.3s;
    position: relative;
    z-index: 1;
    border: 2px solid #AAA;
    font-size: 20px;
    font-family: 'Roboto', sans-serif;
}

.timeline-step.active .step-circle::before {
    content: "";
    background-image: url(/wp-content/uploads/2025/12/active-bar.svg);
    width: 90px;
    height: 16px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 100%;
    bottom: 32%;
    margin-right: 15px;
}

.timeline-step.active[data-step="1"] .step-circle::before {
    background-image: url(/wp-content/uploads/2025/12/active-left-arrow.svg);
}

.timeline-step.active .step-circle::after {
    content: "";
    background-image: url(/wp-content/uploads/2025/12/active-bar.svg);
    width: 90px;
    height: 18px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: 100%;
    bottom: 30%;
    margin-left: 15px;
}

.timeline-step.current-step-focus .step-circle::after {
    background-image: url(/wp-content/uploads/2025/12/active-right-arrow.svg);
}

.step-circle::after {
    content: "";
    background-image: url(/wp-content/uploads/2025/12/not-active-bar.svg);
    width: 90px;
    height: 16px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    left: 100%;
    bottom: 32%;
    margin-left: 15px;
}

.step-circle::before {
    content: "";
    background-image: url(/wp-content/uploads/2025/12/not-active-bar.svg);
    width: 90px;
    height: 16px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 100%;
    bottom: 32%;
    margin-right: 15px;
}

/* ---------------------------------------------------------------- */
/* ACTIVE STATE ARROW STYLING */
/* ---------------------------------------------------------------- */

/* Style the arrow of the PREVIOUS step (which leads to the current active step) */
.timeline-step.active:before {
    border-left-color: #000080; /* Use a dark blue for the active arrow head */
}

.timeline-step.active + .timeline-step:before {
    border-left-color: #000080; /* The arrow leading to the NEXT step is dark blue */
}

/* Image Area Styling */
#dynamic-franchise-image {
    width: 100%;
    height: 500px;
    border-radius: 6px;
    display: block;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    object-fit: cover;

}

.step-label {
    font-weight: 700;
    font-size: 18px;
    line-height: 140%;
    letter-spacing: 0%;
    text-align: center;
    color: #AAA;
}

.timeline-step.active .step-label {
    color: #192B57;
}

.timeline-step.active .step-circle {
    color: var(--red);
    border: 2px solid var(--red);
}



/* Media Queries */

@media screen and (max-width: 1024px) {
    .step-label {
        font-size: 16px;
    }

    .timeline-step.active .step-circle::before {
        width: 60px;
        height: 10px;
        bottom: 32%;
        margin-right: 20px;
    }

    .timeline-step.active .step-circle::after {
        width: 60px;
        height: 12px;
        left: 100%;
        bottom: 30%;
        margin-left: 20px;
    }

    .step-circle::before {
        content: "";
        background-image: url(/wp-content/uploads/2025/12/not-active-bar.svg);
        width: 60px;
        height: 12px;
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
        position: absolute;
        right: 100%;
        bottom: 30%;
        margin-right: 20px;
    }
}

@media screen and (max-width: 768px) {
    .process-subheading {
        font-size: 12px;
    }

    .process-main-heading {
        font-size: 30px !important;
    }

    .step-title-display {
        font-size: 20px !important;
    }

    .step-desc-display {
        font-size: 16px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .step-circle {
        width: 30px;
        height: 30px;
        line-height: 27px;
        font-size: 14px;
    }

    .step-label {
        font-size: 12px;
    }

    .timeline-step.active .step-circle::before {
        width: 52px;
        height: 16px;
        bottom: 32%;
        margin-right: 8px;
    }

    .timeline-step.active .step-circle::after {
        width: 50px;
        height: 16px;
        left: 100%;
        bottom: 30%;
        margin-left: 8px;
    }

    .step-circle::before {
        width: 51px;
        height: 20px;
        bottom: 25%;
        margin-right: 8px;
    }

    .step-circle::after {
        width: 52px;
        height: 16px;
        left: 100%;
        bottom: 30%;
        margin-left: 8px;
    }
}

@media screen and (max-width: 460px) {
    .franchise-top-section {
        flex-direction: column;
        gap: 20;
    }
    .process-subheading {
        font-size: 16px;
        text-align: center;
    }

    .process-main-heading {
       text-align: center;
    }

    .step-title-display {
        text-align: center;
    }

    .step-desc-display {
        font-size: 15px;
        text-align: center;
        margin: 0;
    }

    .franchise-content-area {
        margin-bottom: 0px;
    }

    #dynamic-franchise-image {
        margin-top: 0;
        height: 300px;
    }

    .step-label {
        font-size: 12px;
        max-width: 100px;
        white-space: normal;
    }

    /* Slider steps */
    /* 1. Make the container horizontally scrollable and hide the scrollbar */
    .franchise-timeline-container {
        display: flex; /* Ensure steps are side-by-side */
        overflow-x: scroll; /* Allow horizontal scrolling */
        overflow-y: hidden;
        white-space: nowrap; /* Prevent items from wrapping to the next line */
        
        /* Hide the scrollbar (optional, but cleaner) */
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
        padding-bottom: 0; /* Remove padding that might interfere with layout */
        margin-bottom: 0; /* Adjust as needed */
        
        /* Remove the general background line since it won't scroll correctly */
        background: none !important; 
    }
    
    .franchise-timeline-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    /* 2. Set the width of individual steps for the peek effect */
    .timeline-step {
        /* Steps will be ~1/3 of the container width to show neighbor steps */
        flex: 0 0 33.33%; 
        width: 33.33%; /* Set explicit width */
        min-width: 150px; /* Ensure they are wide enough for the text */
        
        /* Remove the background line on the step as we are scrolling */
        background: none !important; 
        
        /* Ensure text is readable */
        text-align: center;
        padding: 15px 5px; /* Adjust padding for mobile view */
        
        /* Override desktop opacity and transition */
        opacity: 1; 
        transition: none; 
    }
    
    /* Optional: Ensure text content area stacked vertically */
    .franchise-top-section {
        flex-direction: column;
    }
}

/* --- Global / Desktop Hiding Rule --- */
/* Hide the navigation buttons by default */
.nav-arrow {
    display: none; 
    
    /* Keep the rest of the styling below this line */
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 10px 15px;
    cursor: pointer;
    line-height: 1;
    font-size: 1.2em;
    z-index: 10;
    transition: all 0.2s;
}

.nav-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 600px) {

    /* 1. Show the navigation arrows on mobile */
    .nav-arrow {
        display: block; /* Override the desktop 'display: none' */
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* 2. Adjust wrapper to accommodate visible arrows */
    .timeline-navigation-wrapper {
        padding: 0 45px; /* Add space for the buttons */
    }
	
	.timeline-navigation-wrapper {
		/* Ensure the wrapper is visible on desktop, but buttons are not */
		display: flex; 
		align-items: center;
		justify-content: space-between;
		margin-top: 20px;
		padding: 0;
	}
}