/* Global Challenges Styles */
.challenges-container {
    margin-top: 7rem;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #fff , #e7e7e7);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Title */
.challenges-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}

.big-title {
    font-size: 10.5rem;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 0.9;
    text-transform: lowercase;
    margin: 0;
}

/* Cards Grid */
.challenges-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1400px;
}

/* Card Styles */
.challenge-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1 1 300px;
    border: solid gray 1px;
    max-width: 350px;
    min-height: 550px; /* Increased height */
    transition: all 0.3s ease; /* Smooth transition */
}

/* Hover Effect for Cards */
.challenge-card:hover {
    background-color: #00C853;
    color: #fff;
    transform: translateY(-10px);
}

.challenge-card:hover .card-title,
.challenge-card:hover .item-title,
.challenge-card:hover .thematic-item {
    color: #fff;
}

.challenge-card:hover .card-subtitle,
.challenge-card:hover .item-desc {
    color: rgba(255,255,255,0.9);
}

.challenge-card:hover .timeline::before {
    background-color: transparent; /* Override old selector if present */
}

.challenge-card:hover .timeline-item::before {
    background-color: rgba(255,255,255,0.3);
}

.challenge-card:hover .timeline-marker {
    /* ya no se aplica globalmente; reglas específicas abajo */
    color: #fff;
}

.challenge-card:hover .timeline-marker.number-hollow {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
}

.challenge-card:hover .timeline-marker.checked {
    background-color: #FFAB00;
    border: none;
    color: #fff;
}

.challenge-card:hover .check-icon {
    color: #fff;
}

.challenge-card:hover .challenge-btn {
    background-color: #FFAB00; /* Orange Button on Hover */
    color: #fff;
}

.challenge-card.green-card {
    background-color: #00C853; /* Green */
    color: #fff;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.green-card .card-title {
    color: #fff;
}

.card-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    min-height: 40px;
}

.green-card .card-subtitle {
    color: rgba(255,255,255,0.9);
}

/* Timeline / Steps */
.timeline {
    flex-grow: 1;
    position: relative;
    padding-left: 15px;
    margin-bottom: 30px;
}

/* Removed global timeline::before */

.timeline-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 40px;
}

/* Line per item */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px; /* Aligned with marker center */
    top: 24px; /* Start below marker */
    bottom: -40px; /* Extend to next item */
    width: 2px;
    background-color: #e0e0e0;
    z-index: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:last-child::before {
    display: none; /* No line for last item */
}

.green-card .timeline-item::before {
    background-color: rgba(255,255,255,0.3);
}

.challenge-card:hover .timeline-item::before {
    background-color: rgba(255,255,255,0.3);
}

.timeline-marker {
    position: absolute;
    left: -15px;
    top: 0; /* Aligned with top of item title */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #334e68;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Puntos naranjas solo en el primer ítem de la primera y última card al hacer hover */
.challenges-grid .challenge-card:nth-child(1):hover .timeline-item:first-child .timeline-marker {
    background-color: #FFAB00 !important;
}
.challenges-grid .challenge-card:nth-child(4):hover .timeline-item:first-child .timeline-marker {
    background-color: #FFAB00 !important;
}

.timeline-marker.checked {
    background-color: transparent;
    border: 2px solid #00C853;
    color: #00C853;
}

.timeline-marker.green-check {
    background-color: transparent;
    color: #00C853;
    font-size: 16px;
    border: none;
    left: -12px;
}

.timeline-marker.number-hollow {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
}

/* Specific Styles for Green Card Markers */
.green-card .timeline-marker {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
}
.green-card .timeline-marker.checked {
    background-color: #FFAB00;
    border: none;
    color: #fff;
}

.item-title {
    font-weight: 700;
    font-size: 1.4rem; /* Increased size */
    margin-bottom: 5px;
    display: block;
    color: #333;
}

.green-card .item-title {
    color: #fff;
}

.item-desc {
    font-size: 1.25rem; /* Increased size */
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.green-card .item-desc {
    color: rgba(255,255,255,0.9);
}

/* Buttons */
.challenge-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s;
}

.challenge-btn:hover {
    transform: translateY(-2px);
}

.btn-green {
    background-color: #00C853;
    color: #fff;
}

.btn-orange {
    background-color: #FFAB00;
    color: #fff;
}

/* Thematic List Styles */
.thematic-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
}

.thematic-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 28px;
    font-size: 1.25rem; /* Increased size */
    color: #333;
}

.check-icon {
    color: #00C853;
    margin-right: 10px;
    font-weight: bold;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #00C853;
    width: 20px;
    height: 20px;
    font-size: 14px;
    margin-top: 1px; /* Slight adjustment */
}

.challenge-card:hover .check-icon {
    color: #fff;
    border-color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .big-title {
        font-size: 3.5rem;
    }
    
    .challenges-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .challenge-card {
        width: 100%;
        max-width: 100%;
    }
}
