/* --- GLOBAL THEME SETUP --- */
:root {
    --primary-teal: #00A3AD;
    --deep-navy: #0f172a;
    --slate-bg: #1e293b;
    --text-gray: #64748b;
    --white: #ffffff;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- SECTION 1: THE HOOK (HERO) --- */
.hero-purpose {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-navy);
    background-image: url('https://images.unsplash.com/photo-1565173551525-45a0b7274070?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 0 20px;
    text-align: center;
}

.eyebrow-tag {
    display: inline-block;
    color: var(--primary-teal);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 25px;
    border-left: 3px solid var(--primary-teal);
    padding-left: 15px;
}

.main-title {
    color: var(--white);
    font-size: clamp(2.5rem, 8vw, 5.5rem); 
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.purpose-statement {
    color: #cbd5e1;
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 300;
    font-style: italic;
    max-width: 900px;
    margin: 0 auto 50px;
    line-height: 1.4;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 45px;
    background: var(--primary-teal);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s ease;
    border: 1px solid var(--primary-teal);
}

.cta-button:hover {
    background: transparent;
    border-color: var(--white);
    transform: translateY(-5px);
}

/* --- SECTION 2: THE COMPASS (MISSION & VISION) --- */
.compass-section {
    padding: 100px 0;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
}

.compass-container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.compass-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.compass-card {
    background: #ffffff;
    padding: 60px 45px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
    transition: var(--transition-smooth);
}

.compass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-teal);
}

.compass-icon {
    color: var(--primary-teal);
    margin-bottom: 25px;
}

.compass-card h3 {
    font-size: 1.85rem;
    color: var(--deep-navy);
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.compass-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
}

/* --- SECTION 3: THE STANDARDS (CIVIA) --- */
.civia-standards-section {
    padding: 100px 0;
    background-color: var(--deep-navy);
    color: #ffffff;
}

.standards-container {
    max-width: 1400px; /* Slightly wider for 5 columns */
    margin: 0 auto;
    padding: 0 20px;
}

.standards-header {
    text-align: center;
    margin-bottom: 60px;
}

.standards-eyebrow {
    color: var(--primary-teal);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.standards-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
}

.header-line {
    width: 60px;
    height: 4px;
    background: var(--primary-teal);
    margin: 20px auto 0;
}

/* THE 5-COLUMN DASHBOARD GRID */
.civia-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Clean horizontal row */
    gap: 20px;
}

.civia-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 50px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: var(--transition-smooth);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.civia-card:hover {
    background: var(--white);
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.civia-alpha {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-teal);
    margin-bottom: 15px;
    line-height: 1;
    transition: 0.3s ease;
}

.civia-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--white);
    min-height: 50px; /* Aligns text across cards */
    display: flex;
    align-items: center;
    justify-content: center;
}

.civia-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
}

/* Hover State Overrides */
.civia-card:hover h4 { color: var(--deep-navy); }
.civia-card:hover p { color: var(--text-gray); }
.civia-card:hover .civia-alpha { transform: scale(1.1); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1200px) {
    .civia-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 on top, 2 below on tablet */
    }
}

@media (max-width: 992px) {
    .compass-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .civia-grid { grid-template-columns: 1fr; } /* Stacked on mobile */
    .main-title { font-size: 3rem; }
}

/* --- SECTION 4: OUR STORY --- */
.story-section {
    padding: 120px 0;
    background-color: #ffffff;
    overflow: hidden;
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.story-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* More space for text */
    gap: 80px;
    align-items: center;
}

.story-eyebrow {
    color: var(--primary-teal);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 15px;
}

.story-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--deep-navy);
    margin-bottom: 30px;
    line-height: 1.2;
}

.story-p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 25px;
}

.story-highlight {
    border-left: 4px solid var(--primary-teal);
    padding-left: 25px;
    margin: 40px 0;
    font-style: italic;
    color: var(--deep-navy);
    font-size: 1.15rem;
    font-weight: 500;
}

.story-text h3 {
    font-size: 1.5rem;
    color: var(--deep-navy);
    margin: 40px 0 20px;
    font-weight: 700;
}

.story-quote {
    margin-top: 50px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-teal);
    text-align: center;
    border: 1px solid #e2e8f0;
}

/* Image Styling */
.story-image-wrapper {
    position: relative;
}

.main-story-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 2;
    box-shadow: 20px 20px 0px #f1f5f9; /* Subtle offset background */
}

.image-border-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-top: 5px solid var(--primary-teal);
    border-right: 5px solid var(--primary-teal);
    z-index: 1;
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    left: -30px;
    background: var(--primary-teal);
    color: white;
    padding: 20px 30px;
    z-index: 3;
    box-shadow: 0 10px 30px rgba(0, 163, 173, 0.3);
}

.experience-badge .years {
    font-size: 2.5rem;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.experience-badge .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .story-image-wrapper {
        order: -1; /* Image on top for mobile */
    }
    .main-story-img {
        height: 400px;
    }
}

/* --- SECTION 5: THE EVOLUTION (COMPACT GRID) --- */
.evolution-section {
    padding: 100px 0;
    background-color: #f1f5f9; /* Soft industrial gray */
}

.evolution-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.evolution-header {
    text-align: center;
    margin-bottom: 60px;
}

.milestone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns = 3 Rows for 9 years */
    gap: 25px;
}

.milestone-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 4px;
    border-top: 4px solid #cbd5e1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.milestone-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--primary-teal);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.year-tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--deep-navy);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.milestone-card h5 {
    font-size: 1.1rem;
    color: var(--deep-navy);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 700;
}

.milestone-list {
    list-style: none;
    padding: 0;
}

.milestone-list li {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.milestone-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-teal);
    font-weight: bold;
}

/* Highlight for Major Facility/Product Milestones */
.highlight-card { border-top-color: var(--primary-teal); }
.product-card { background: var(--deep-navy); border-top-color: var(--primary-teal); }
.product-card h5 { color: white; }
.product-card .year-tag { background: var(--primary-teal); color: white; }
.product-card .milestone-list li { color: #cbd5e1; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .milestone-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .milestone-grid { grid-template-columns: 1fr; }
}

/* --- SECTION 5: GROWTH INFOGRAPHIC --- */
.evolution-chart-section {
    padding: 100px 0;
    background: #ffffff;
    overflow-x: hidden;
}

.chart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.growth-chart-wrapper {
    position: relative;
    padding: 100px 0;
    margin-top: 50px;
}

.growth-curve {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 150px;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-nodes {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.node {
    width: 22%;
    text-align: center;
    position: relative;
}

.node-dot {
    width: 16px;
    height: 16px;
    background: #cbd5e1;
    border: 4px solid #fff;
    border-radius: 50%;
    margin: 20px auto;
    box-shadow: 0 0 0 4px #f1f5f9;
    transition: all 0.3s ease;
}

.node:hover .node-dot {
    background: var(--primary-teal);
    box-shadow: 0 0 0 8px rgba(0, 163, 173, 0.2);
    transform: scale(1.2);
}

.node-year {
    display: block;
    font-weight: 900;
    color: var(--primary-teal);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.node-stat {
    font-weight: 800;
    font-size: 1rem;
    color: var(--deep-navy);
    margin-bottom: 8px;
}

.node-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-gray);
}

/* Final Milestone Highlight */
.highlight-node .node-dot {
    background: var(--primary-teal);
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(0, 163, 173, 0.2);
}
.highlight-node .node-stat {
    color: var(--primary-teal);
    font-size: 1.3rem;
}

/* Summary Bar */
.growth-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--deep-navy);
    padding: 40px;
    border-radius: 4px;
    margin-top: 80px;
    text-align: center;
}

.sum-val {
    display: block;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
}

.sum-lab {
    color: var(--primary-teal);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .timeline-nodes { flex-direction: column; gap: 40px; }
    .node { width: 100%; text-align: left; padding-left: 40px; }
    .node-dot { position: absolute; left: 0; top: 0; margin: 0; }
    .growth-curve { display: none; }
}

/* --- SECTION 5: FULL DETAIL HORIZONTAL TIMELINE --- */
.evolution-detailed {
    padding: 100px 0;
    background-color: #f8fafc;
    overflow: hidden;
}

.evolution-header-static {
    text-align: center;
    margin-bottom: 50px;
}

.timeline-scroll-container {
    padding: 40px 0;
    overflow-x: auto; /* Enables horizontal scrolling */
    white-space: nowrap;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-teal) #e2e8f0;
}

.timeline-track {
    display: inline-flex;
    padding-left: 5vw;
    gap: 0;
    position: relative;
    padding-bottom: 50px;
}

/* The horizontal line connecting all nodes */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-item {
    width: 350px;
    margin-right: 40px;
    white-space: normal;
    position: relative;
    z-index: 2;
}

.time-marker {
    background: var(--primary-teal);
    color: white;
    padding: 8px 15px;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-block;
    border-radius: 4px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 163, 173, 0.2);
}

/* The dot on the line */
.time-marker::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 20px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid var(--primary-teal);
    border-radius: 50%;
}

.time-content {
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    transition: 0.3s ease;
}

.timeline-item:hover .time-content {
    border-color: var(--primary-teal);
    transform: translateY(-5px);
}

.time-content h5 {
    font-size: 1rem;
    color: var(--deep-navy);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 800;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
}

.time-content ul {
    list-style: none;
    padding: 0;
}

.time-content li {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Highlights for key years */
.timeline-item.highlight .time-content {
    background: #f0fdfa;
    border-left: 4px solid var(--primary-teal);
}

.timeline-item.final .time-content {
    background: var(--deep-navy);
    color: white;
}

.timeline-item.final .time-content h5 { color: var(--primary-teal); border-color: rgba(255,255,255,0.1); }
.timeline-item.final .time-content li { color: #cbd5e1; }

/* RESPONSIVE: Switch to vertical stack for mobile */
@media (max-width: 768px) {
    .timeline-scroll-container { overflow-x: hidden; }
    .timeline-track { flex-direction: column; padding-left: 20px; }
    .timeline-track::before { left: 27px; top: 0; width: 4px; height: 100%; }
    .timeline-item { width: 100%; margin-bottom: 40px; }
    .time-marker::after { left: -10px; top: 12px; }
}

/* --- SEGMENTED INDEXED SLIDER CSS --- */
#timelineTrack {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1); /* High-end mechanical feel */
    width: 100%;
}

.min-w-full {
    min-width: 100%; /* Each 'Chapter' takes exactly one screen width */
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

/* Hide default scrollbars for the slider container */
.relative.overflow-hidden {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.relative.overflow-hidden::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Styling for the Arrow Boxes within the slider */
.bg-white.p-8.border-b-8 {
    border-bottom-width: 8px;
    border-bottom-color: #e2e8f0; /* Default gray */
    transition: var(--transition-smooth);
}

.bg-white.p-8.border-b-8:hover {
    border-bottom-color: var(--primary-teal);
    transform: translateY(-5px);
}

#timelineTrack {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.min-w-full {
    min-width: 100%;
    flex-shrink: 0;
}

/* Ensure the hero section is visible */
.hero-purpose {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    background: #0f172a; /* Deep Navy fallback */
}