:root {
    /* Updated Green Variables */
    --primary: #15803d;       /* Deep Forest Green */
    --secondary: #10b981;     /* Vibrant Emerald */
    --accent-light: #f0fdf4;  /* Mint/Sage Background */
    
    --dark-slate: #0f172a;
    --light-slate: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --white: #ffffff;
}

/* --- History Page Layout --- */
.history-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Typography */
.history-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.history-hero .highlight {
    color: var(--primary); /* Uses variable for consistency */
    position: relative;
    display: inline-block;
}

/* Animated Underline for "History" */
.highlight::after {
    content: '';
    position: absolute;
    bottom: -5px; 
    left: 0;
    height: 4px;
    background: var(--secondary); 
    border-radius: 2px;
    width: 0; /* Start hidden */
    animation: loadLine 1.2s ease-out forwards;
    animation-delay: 0.3s; 
}

@keyframes loadLine {
    0% { width: 0; opacity: 0; }
    100% { width: 100%; opacity: 1; }
}

/* --- Filter Buttons --- */
.history-filters {
    margin: 40px 0;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-wrapper {
    display: flex;
    flex-wrap: wrap; /* Good for mobile */
    justify-content: center;
    gap: 12px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    background: white;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap; 
}

.filter-btn:hover {
    background: #f9fafb;
    transform: translateY(-2px); /* Tiny lift effect on hover */
}

/* Active State (Merged for consistency) */
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), #166534); /* Gradient Green */
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.4); /* Matching shadow color */
}

/* --- History Content Area --- */
.history-content {
    min-height: 300px; /* Prevents page jump when switching tabs */
    display: flex;
    align-items: flex-start; /* Aligns text to top */
    justify-content: center;
    margin-top: 40px;
    padding: 0 10px;
}

/* The White Box containing the text */
.history-item {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto; 
    line-height: 1.8; 
    color: #444;
    text-align: left; /* Ensures paragraphs are readable */
    
    /* Animation Properties (Merged here) */
    transition: opacity 0.4s ease-in-out;
    opacity: 1;
}


.history-item h3 {
    color: var(--primary); 
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.history-item p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.no-records {
    color: #9ca3af;
    font-size: 1.2rem;
    font-style: italic;
    margin-top: 50px;
}



/* --- Reveal Animation on Scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .history-container { padding: 40px 15px; }
    .history-hero h1 { font-size: 2.2rem; }
    .history-filters { padding: 15px 10px; margin: 20px 0; }
    .filter-btn { padding: 8px 16px; font-size: 0.9rem; }
    .history-item { padding: 25px; } /* Less padding on mobile */
}

@media (max-width: 480px) {
    .history-hero h1 { font-size: 1.8rem; }
    .filter-wrapper { gap: 8px; }
    .no-records { font-size: 1rem; }
}