/**
 * Competition Timeline Styles
 * Modern, responsive timeline design
 */

.timeline-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Match other sections' container width on ultra-wide screens */
@media (min-width: 1900px) {
  .timeline-container {
    width: 80vw;
    max-width: none;
  }
}

.timeline-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
    color: inherit;
    border-radius: 0;
    box-shadow: none;
}

.timeline-header h2 {
    margin: 0 0 10px 0;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    font-weight: 700;
    color: var(--tg-navy);
    text-shadow: none;
}

.timeline-header p {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: #000000;
    opacity: 1;
}

/* Timeline Phase Styles */
.timeline-phase {
    margin-bottom: 32px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.timeline-phase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline-phase.collapsed .phase-events {
    display: none;
}

.phase-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 5px solid #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phase-header:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.phase-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 1.35rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.phase-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.phase-title p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.phase-events {
    padding: 16px 24px;
}

/* Timeline Event Styles */
.timeline-event {
    display: flex;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.timeline-event:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-event.milestone-event {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #ffc107;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.timeline-event.status-active {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.timeline-event.status-completed {
    border-left-color: #6c757d;
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    opacity: 0.8;
}

.timeline-event.status-cancelled {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
}

.event-indicator {
    position: relative;
    margin-right: 20px;
    flex-shrink: 0;
}

.event-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.milestone-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.event-content {
    flex: 1;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.event-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-upcoming {
    background: #e3f2fd;
    color: #1976d2;
}

.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-completed {
    background: #f5f5f5;
    color: #616161;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.event-dates {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.start-date,
.end-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.85rem;
}

.start-date i,
.end-date i {
    color: #007bff;
    width: 16px;
}

.event-description {
    margin-bottom: 12px;
}

.event-description p {
    margin: 0;
    color: #495057;
    line-height: 1.45;
}

/* Mobile performance overrides: reduce heavy shadows on large areas */
@media (max-width: 768px), (pointer: coarse) {
    .timeline-header,
    .timeline-phase,
    .timeline-event,
    .event-dot,
    .milestone-badge {
        box-shadow: none !important;
    }

    .timeline-phase:hover,
    .timeline-event:hover,
    .timeline-event.milestone-event {
        box-shadow: none !important;
    }
}

.event-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.event-type {
    background: #007bff;
    color: white;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.milestone-tag {
    background: #ffc107;
    color: #212529;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Event Details Modal */
.event-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #1e293b, #84cc16);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.event-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    color: #495057;
}

.info-row span {
    color: #6c757d;
}

.event-description h4 {
    margin: 20px 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.event-description p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* Timeline Error State */
.timeline-error {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.error-icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.timeline-error h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.timeline-error p {
    margin: 0 0 20px 0;
    color: #6c757d;
}

.retry-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container {
        padding: 10px;
    }
    
    .timeline-header h2 {
        font-size: 2rem;
    }
    
    .phase-header {
        padding: 20px;
    }
    
    .phase-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-event {
        flex-direction: column;
        padding: 15px;
    }
    
    .event-indicator {
        margin-right: 0;
        margin-bottom: 15px;
        align-self: flex-start;
    }
    
    .event-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .event-dates {
        flex-direction: column;
        gap: 10px;
    }
    
    .event-meta {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .timeline-header {
        padding: 20px 15px;
    }
    
    .timeline-header h2 {
        font-size: 1.8rem;
    }
    
    .phase-header {
        padding: 15px;
    }
    
    .phase-events {
        padding: 15px;
    }
    
    .timeline-event {
        padding: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Print Styles */
@media print {
    .timeline-container {
        box-shadow: none;
    }
    
    .timeline-phase {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .timeline-event {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Railway-style cards tuned to match registration benefits layout */
.railway-timeline { position: relative; margin-top: 20px; padding-top: 80px; }

/* Base: horizontal scroll-snap across all viewports */
.tl-grid {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tl-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e6e8eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    padding: 18px 16px 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 min(360px, 28vw);
    scroll-snap-align: start;
}

.tl-card .icon-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    width: 56px;
    height: 56px;
}

.tl-card .icon-3d span,
.tl-card .icon-3d i {
    font-size: 2rem;
}

/* Per-type color accents for icons */
.tl-card .event-type {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}

.tl-card .event-type::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    margin-right: 6px;
}

.tl-card .event-type::before,
.tl-card .event-type {
    background: none;
}

.tl-card .event-type {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.tl-card .event-type::before { background: #22c55e; }
.tl-card .event-type[data-type="Registration"]::before { background: #22c55e; }
.tl-card .event-type[data-type="Submission"]::before { background: #3b82f6; }
.tl-card .event-type[data-type="Awards"]::before { background: #eab308; }

.railway-track .train-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25), inset 0 2px 6px rgba(255,255,255,0.1);
    z-index: 2;
}

.station-dot {
    position: absolute;
    top: -64px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    box-shadow: 0 10px 24px rgba(0,0,0,0.25), inset 0 2px 8px rgba(255,255,255,0.35);
    z-index: 3;
}

.tl-title {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.tl-date {
    margin: 0 0 8px 0;
    color: #000000;
    font-size: 0.9rem;
}

.tl-desc {
    margin: 0 0 10px 0;
    color: #1d21e2;
    line-height: 1.45;
}

.tl-tags { display: flex; gap: 8px; align-items: center; }

/* Railway track visibility: enabled from 319px and up */
@media (max-width: 318px) {
  .railway-track, .station-dot { display: none !important; }
}
@media (min-width: 319px) {
  .railway-track { display: block !important; }
  .station-dot { display: block; }
}

.railway-track::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 10px;
    height: 10px;
    background: linear-gradient(180deg, #d1d5db, #9ca3af);
    border-radius: 6px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.25);
}
.railway-track::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 10px;
    height: 10px;
    background: linear-gradient(180deg, #d1d5db, #9ca3af);
    border-radius: 6px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.25);
}

/* Ensure track is visible with clear line and spacing */
.timeline-container .railway-track {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 50px;
    transform: none;
    background: linear-gradient(78deg, #fd0d0d 0%, #4b5563 60%, #3d3751 100%);
    border-radius: 25px;
    z-index: 1;
}

/* Optional: slightly thicker track on larger screens */
@media (min-width: 1024px) {
  .timeline-container .railway-track { height: 50px; }
}

/* station dots are visible from 319px upward (see media queries above) */

/* mobile arrows handled in index_css/timeline.css; keep fallback hidden here */
.tl-mobile-arrows { display: none; }

.tl-arrow {
    pointer-events: auto;
    background: rgba(255,255,255,0.92);
    border: 1px solid #d1d5db;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* Status accents on cards */
.tl-card.status-upcoming { border-left: 4px solid #1976d2; }
.tl-card.status-active { border-left: 4px solid #2e7d32; }
.tl-card.status-completed { border-left: 4px solid #616161; opacity: 0.9; }
.tl-card.status-cancelled { border-left: 4px solid #c62828; }
.tl-card.milestone-event { border-left-color: #ffc107; background: linear-gradient(180deg, #fffbe6, #ffffff 40%); }

/* Mobile: horizontal scroll-snap like registration benefits */
@media (max-width: 576px) {
    .tl-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        padding: 0 6px 52px;
    }
    .tl-card {
        scroll-snap-align: start;
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 22px 18px;
    }
    .tl-mobile-arrows { display: flex; position: absolute; top: 40%; left: 0; right: 0; justify-content: space-between; pointer-events: none; }
}
/* remove grid column overrides as we use horizontal scroll across sizes */

/* Eligibility & Age Divisions cards */
.eligibility {
    padding: 30px 0 10px;
}

.eligibility .section-title h2 {
    margin: 0 0 18px 0;
}

.eligibility .project-status-cards {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

/* Enhanced 3D Card Styling - Optimized */
.eligibility .card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e6e8eb;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 
        0 8px 24px rgba(0,0,0,0.1),
        0 3px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.6);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-style: preserve-3d;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.eligibility .card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(1deg);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.eligibility .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.eligibility .card:hover::before {
    opacity: 1;
}

/* Card Header - Optimized Layout */
.eligibility .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.8) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    position: relative;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* Card Header Image - New Position Below Header */
.eligibility .card-header-image {
    padding: 5px;
    background: linear-gradient(179deg, rgb(6 123 15 / 31%) 0%, #0d6efd4f 100%);
    text-align: center;
}

.eligibility .card-header-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 
        0 6px 18px rgba(0,0,0,0.15),
        0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.8);
    max-width: 100%;
}

/* Caption under image inside the same div */
.eligibility .card-caption {
    padding: 5px;
}
.eligibility .card-caption .card-icon,
.eligibility .card-caption .card-title h3,
.eligibility .card-caption .card-title p {
    padding: 5px;
}

/* 3D Icon Styling - Optimized Size */
.eligibility .card-icon {
    font-size: 1.8rem;
    color: var(--tg-teal);
    text-shadow: 
        0 2px 4px rgba(0, 166, 147, 0.3),
        0 4px 8px rgba(0, 166, 147, 0.2);
    transform: perspective(100px) rotateX(15deg) rotateY(-10deg);
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 166, 147, 0.2));
}

.eligibility .card:hover .card-icon {
    transform: perspective(100px) rotateX(0deg) rotateY(0deg) scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(59, 130, 246, 0.3));
}

.eligibility .card-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.eligibility .card-title p {
    margin: 2px 0 0;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.eligibility .card-header-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 
        0 3px 8px rgba(0,0,0,0.15),
        0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.8);
    max-width: 100%;
}

.eligibility .card:hover .card-header-image img {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.2),
        0 4px 8px rgba(0,0,0,0.15);
}

/* Card Body - Optimized Typography */
.eligibility .card-body {
    padding: 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.8) 100%);
}

.eligibility .card-body ul {
    margin: 0;
    padding-left: 20px;
}

.eligibility .card-body li {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 6px;
    position: relative;
    padding: 5px 20px;
    transition: all 0.2s ease;
}

.eligibility .card-body li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    font-weight: bold;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.eligibility .card:hover .card-body li::before {
    color: #8b5cf6;
    transform: translateX(2px);
}

.eligibility .card-body li:hover {
    color: #3b82f6;
    transform: translateX(4px);
}

/* Division-specific color themes */
.eligibility .card:nth-child(1) .card-icon {
    color: var(--tg-teal);
    text-shadow: 
        0 2px 4px rgba(0, 166, 147, 0.3),
        0 4px 8px rgba(0, 166, 147, 0.2);
    filter: drop-shadow(0 4px 8px rgba(0, 166, 147, 0.2));
}

.eligibility .card:nth-child(1):hover .card-body li:hover {
    color: #10b981;
}

.eligibility .card:nth-child(2) .card-icon {
    color: var(--tg-teal);
    text-shadow: 
        0 2px 4px rgba(0, 166, 147, 0.3),
        0 4px 8px rgba(0, 166, 147, 0.2);
    filter: drop-shadow(0 4px 8px rgba(0, 166, 147, 0.2));
}

.eligibility .card:nth-child(2):hover .card-body li:hover {
    color: #f59e0b;
}

.eligibility .card:nth-child(3) .card-icon {
    color: var(--tg-teal);
    text-shadow: 
        0 2px 4px rgba(0, 166, 147, 0.3),
        0 4px 8px rgba(0, 166, 147, 0.2);
    filter: drop-shadow(0 4px 8px rgba(0, 166, 147, 0.2));
}

.eligibility .card:nth-child(3):hover .card-body li:hover {
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .eligibility .project-status-cards {
        gap: 16px;
    }
    
    .eligibility .card {
        max-height: none;
        width: 100%;
    }
    
    .eligibility .card-header {
        padding: 16px 20px 12px;
        gap: 12px;
    }
    
    .eligibility .card-icon {
        font-size: 1.8rem;
    }
    
    .eligibility .card-title h3 {
        font-size: 1.1rem;
    }
    
    .eligibility .card-header-image img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }
    
    .eligibility .card-body {
        padding: 5px;
    }
    
    .eligibility .card-description {
        color: #475569;
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 10px;
        font-weight: 500;
    }
}

/* Tablet */
@media (min-width: 577px) {
    .eligibility .project-status-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .eligibility .card {
        max-height: none;
    }
    /* Tablet and above: fix image height to 100px */
    .eligibility .card-header-image img {
        height: 250px;
        width: 100%;
        object-fit: fill;
        max-width: 100%;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .eligibility .project-status-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .eligibility .card {
        max-height: none;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .eligibility .project-status-cards {
        gap: 32px;
    }
    .eligibility .card {
        max-height: none;
    }
    
    .eligibility .card-body {
        padding: 5px;
    }
}

/* Dark mode support for eligibility cards */
@media (prefers-color-scheme: dark) {
    .eligibility .card {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
        box-shadow: 
            0 10px 30px rgba(0,0,0,0.3),
            0 4px 12px rgba(0,0,0,0.2),
            inset 0 1px 0 rgba(255,255,255,0.1);
    }
    
    .eligibility .card:hover {
        box-shadow: 
            0 20px 40px rgba(0,0,0,0.4),
            0 8px 20px rgba(0,0,0,0.3),
            inset 0 1px 0 rgba(255,255,255,0.15);
    }
    
    .eligibility .card-header {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
        border-bottom-color: #475569;
    }
    
    .eligibility .card-title h3 {
        color: #f1f5f9;
    }
    
    .eligibility .card-title p {
        color: #cbd5e1;
    }
    
    .eligibility .card-body {
        background: linear-gradient(180deg, #91ff007a 0%, rgb(27 70 131 / 80%) 100%);
    }
    
    .eligibility .card-body li {
        color: #e2e8f0;
    }
    
    .eligibility .card-header-image img {
        border-color: rgba(255,255,255,0.2);
    }
}

/* Smooth scrolling for mobile cards */
@media (max-width: 576px) {
    .eligibility .project-status-cards {
        scroll-snap-type: y proximity;
        scroll-padding: 16px;
    }
    
    .eligibility .card {
        scroll-snap-align: start;
    }
    
    /* Subtle animation on load */
    .eligibility .card {
        animation: cardFadeInUp 0.6s ease-out backwards;
    }
    
    .eligibility .card:nth-child(1) { animation-delay: 0.1s; }
    .eligibility .card:nth-child(2) { animation-delay: 0.2s; }
    .eligibility .card:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .eligibility .card {
        border-width: 2px;
        border-color: #000;
    }
    
    .eligibility .card:hover {
        border-color: #0066cc;
    }
    
    .eligibility .card-icon {
        text-shadow: none;
        filter: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .eligibility .card {
        transition: none;
    }
    
    .eligibility .card:hover {
        transform: none;
    }
    
    .eligibility .card-icon,
    .eligibility .card-header-image img,
    .eligibility .card-body li {
        transition: none;
    }
    
    .eligibility .card:hover .card-icon,
    .eligibility .card:hover .card-header-image img,
    .eligibility .card:hover .card-body li {
        transform: none;
    }
}
