/* SNCFI Colors */
:root {
    --sncfi-navy: #394765;
    --sncfi-dark-blue: #27323a;
    --sncfi-gold: #f4b52a;
    --sncfi-gray-blue: #424b52;
    --sncfi-white: #fff;
    --sncfi-light-blue: #eef1f6;
    --sncfi-light-gold: #f7f4e9;
    --sncfi-pale-blue: #edf2f7;
}

/* Typography */
.page-title {
    color: var(--sncfi-navy);
    font-family: 'Lora', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--sncfi-navy);
    font-family: 'Lora', serif;
    font-weight: 600;
}

.text-white.section-title {
    color: var(--sncfi-white) !important;
}

.lead {
    font-family: 'Montserrat', sans-serif;
}

/* Full-width Sections */
section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Section Backgrounds */
.hero-section {
    position: relative;
    color: var(--sncfi-white);
}

.process-section {
    background-color: var(--sncfi-light-blue);
}

.requirements-section {
    background-color: var(--sncfi-light-gold);
}

.contact-section {
    background-color: var(--sncfi-pale-blue);
}

.apply-now-section {
    color: var(--sncfi-white);
}

/* Step Circles */
.step-circle {
    width: 50px;
    height: 50px;
    background-color: #394765;
    border: 3px solid #f4b52a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto;
}

/* Timeline (old style) */
.admission-process-steps {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.admission-process-steps::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #f4b52a;
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
}

.step-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 60px;
}

.step-number {
    position: absolute;
    width: 40px;
    height: 40px;
    left: 0;
    background-color: var(--sncfi-navy);
    border: 4px solid var(--sncfi-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sncfi-white);
    font-weight: bold;
    z-index: 1;
}

.step-content {
    padding: 15px 20px;
    background-color: var(--sncfi-white);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.step-content h4 {
    color: var(--sncfi-navy);
    margin-bottom: 10px;
    font-family: 'Lora', serif;
}

/* Cards and Lists */
.requirements-list li {
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.card-header {
    background-color: var(--sncfi-navy) !important;
    color: var(--sncfi-white);
}

/* Buttons */
.btn-primary {
    background-color: var(--sncfi-navy);
    border-color: var(--sncfi-navy);
}

.btn-primary:hover {
    background-color: var(--sncfi-dark-blue);
    border-color: var(--sncfi-dark-blue);
}

.btn-outline-primary {
    color: var(--sncfi-navy);
    border-color: var(--sncfi-navy);
}

.btn-outline-primary:hover {
    background-color: var(--sncfi-navy);
    border-color: var(--sncfi-navy);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }
    
    .hero-section .row {
        text-align: center;
    }
    
    .hero-section img {
        margin-bottom: 1.5rem;
        height: auto !important;
        max-height: 320px;
    }

    /* Smaller step circle for admission process cards */
    .step-circle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        border-width: 2px;
    }
}

/* ===============================
   Enrollment Procedure Timeline
   =============================== */
.procedure-timeline {
    position: relative;
    padding: 0.5rem 0 2rem;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--sncfi-gold), #f6c85e 60%, var(--sncfi-gold));
    opacity: 0.95;
}

.timeline-item {
    position: relative;
    margin: 2rem 0 2.5rem;
}

.timeline-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sncfi-navy);
    border: 3px solid var(--sncfi-gold);
    color: var(--sncfi-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Lora', serif;
    z-index: 2;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.timeline-card {
    position: relative;
    width: calc(80% - 10px);
    background: var(--sncfi-white);
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(57,71,101,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    box-sizing: border-box; /* include padding in width calcs to avoid overflow */
}

/* Prevent long text from causing horizontal overflow */
.timeline-card,
.timeline-note {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.timeline-card h5 {
    color: var(--sncfi-navy);
    font-family: 'Lora', serif;
}

.align-left .timeline-card {
    margin-left: auto;
    margin-right: 10%;
}

.align-right .timeline-card {
    margin-right: auto;
    margin-left: 10%;
}

/* Arrow pointers */
.align-left .timeline-card::after {
    content: '';
    position: absolute;
    top: 26px;
    right: -12px;
    border-width: 8px 0 8px 12px;
    border-style: solid;
    border-color: transparent transparent transparent var(--sncfi-white);
}

.align-right .timeline-card::after {
    content: '';
    position: absolute;
    top: 26px;
    left: -12px;
    border-width: 8px 12px 8px 0;
    border-style: solid;
    border-color: transparent var(--sncfi-white) transparent transparent;
}

/* Note block */
.timeline-note {
    position: relative;
    margin: 1rem auto 2rem;
    width: min(720px, 90%);
    background: #fff7e0;
    border: 1px dashed var(--sncfi-gold);
    color: #5a4b1b;
    padding: 12px 16px 12px 56px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.timeline-note .note-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--sncfi-gold);
    color: var(--sncfi-dark-blue);
    font-weight: 700;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* Large screens spacing so badges sit between cards */
.align-left { padding-right: 52%; }
.align-right { padding-left: 52%; }

/* Responsive behavior */
@media (max-width: 992px) {
    /* Small screens: spine on the LEFT and all cards to the RIGHT of it */
    .timeline-line {
        left: 28px;
        right: auto;
        transform: translateX(-50%);
    }
    .timeline-badge {
        left: 28px;
        right: auto;
        transform: translate(-50%, -50%);
    }
    .timeline-card {
        width: calc(100% - 72px) !important; /* 28px line/badge + ~44px gutter */
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
    .timeline-item {
        margin: 1.25rem 0 1.75rem;
    }
    .align-left, .align-right { padding: 0; }
    /* Arrow points to the LEFT side */
    .align-left .timeline-card::after,
    .align-right .timeline-card::after {
        left: -12px;
        right: auto;
        border-width: 8px 12px 8px 0;
        border-color: transparent var(--sncfi-white) transparent transparent;
        filter: drop-shadow(1px 0 0 rgba(0,0,0,0.06));
    }

    /* NOTE label and padding on left */
    .timeline-note {
        padding-left: 80px !important;
        padding-right: 12px !important;
    }
    .timeline-note .note-label {
        left: 12px !important;
        right: auto !important;
    }
}

/* Extra small devices: tighten typography, stack buttons, simplify timeline */
@media (max-width: 576px) {
    .page-title {
        font-size: 1.6rem;
    }
    .section-title {
        font-size: 1.25rem;
    }
    .lead {
        font-size: 0.95rem;
    }

    /* Hero buttons: full-width and stacked */
    .hero-section .mt-4 .btn {
        display: block;
        width: 100%;
        margin: 0 0 0.75rem 0;
    }
    .hero-section .mt-4 .btn:last-child {
        margin-bottom: 0;
    }

    /* Cards: reduce padding to avoid overflow */
    .card.p-4 {
        padding: 1rem !important;
    }

    /* Timeline: reduce badge and spacing */
    .timeline-line {
        left: 20px;
        right: auto;
        width: 3px;
    }
    .timeline-badge {
        width: 34px;
        height: 34px;
        left: 20px;
        right: auto;
        font-size: 0.9rem;
    }
    .timeline-card {
        width: calc(100% - 56px); /* 20px line + 36px badge */
        margin-left: 48px;
        margin-right: 0;
        padding: 12px 14px;
    }
    .timeline-card h5 {
        font-size: 1rem;
    }
    .timeline-note {
        padding: 10px 12px 10px 64px; /* label on left side */
    }
    /* Remove extra Bootstrap left margin that can cause horizontal scroll */
    .timeline-note .ms-5 {
        margin-left: 0 !important;
    }
    /* Ensure label reserves enough space on very small widths */
    .timeline-note .note-label {
        min-width: 44px;
        text-align: center;
        left: 12px;
        right: auto; /* park label near the left spine */
    }

    /* On very small screens, arrow stays on the left side */
    .align-left .timeline-card::after,
    .align-right .timeline-card::after {
        left: -12px;
        right: auto;
        border-width: 8px 12px 8px 0;
        border-color: transparent var(--sncfi-white) transparent transparent;
        filter: drop-shadow(1px 0 0 rgba(0,0,0,0.06));
    }
}

/* Very small devices: final tightening */
@media (max-width: 400px) {
    .page-title {
        font-size: 1.4rem;
    }
    .section-title {
        font-size: 1.15rem;
    }
    .hero-section img {
        max-height: 260px;
    }
}
