.operations-section {
    padding-block: 0.75rem;
    
}

.operations-container {
    /* max-width: 1335px; */
    /* margin: 0 auto; */
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 100%;
    color: #008e43;
    margin-bottom: 0.1rem;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0;
    text-align: justify;
    color: #111827;
    margin-bottom: 2rem;
}

.cards-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    justify-content: center;
    /* Centers grid items horizontally */
    align-content: center;
    /* Centers grid vertically (if parent has fixed height) */
}


.operation-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 60vh;


}

.operation-card:hover {
    /* border-color: #3b82f6; */
    /* removed green glow from hover */
    box-shadow: none;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Darker overlay by default so text reads clearly on bright images */
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.28) 0%,
            rgba(0, 0, 0, 0.85) 100%);
    transition: background 0.3s ease;
}

.card-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;

    /* padding: rem; */
    /* reduced padding to make layout more compact */
    padding: 0.5rem;
}

.card-title {
    font-size: 0.82rem; /* further reduced to prevent wrapping issues */
    font-weight: 600;
    line-height: 1.12;
    margin-bottom: 0.06rem;
    letter-spacing: -0.01em;
}

/* Gradient highlight for the first word (keeps semantic red look but with a smooth gradient) */
.card-title .highlight {
    background: linear-gradient(90deg,#ff3848 0%, #ff8a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.card-title .text {
    color: #ffffff;
    opacity: 0.98;
}

/* Improve contrast with a subtle shadow */
.card-title .highlight,
.card-title .text,
.list-text {
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.card-divider {
    height: 1px;
    width: 100%;
    background: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.125rem;
    opacity: 0;
    max-height: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease,
        max-height 0.25s ease;
}

.card-list {
    list-style: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease,
        max-height 0.25s ease;
}

.card-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-list li:last-child {
    margin-bottom: 0;
}

.list-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    margin-top: 0.3rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.25) inset;
}

.list-text {
    font-size: 0.7rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
}

/* Make titles slightly larger on wider screens while keeping compact baseline */
@media (min-width: 640px) {
    .card-title {
        font-size: 0.92rem;
    }
    .list-text {
        font-size: 0.72rem;
    }
}

@media (min-width: 1024px) {
    .card-title {
        font-size: 1rem;
    }
    .list-text {
        font-size: 0.76rem;
    }
}

/* XL / large desktop: scale text and padding up for big monitors */
@media (min-width: 1400px) {
    .card-content {
        padding: 1rem;
    }
    .card-title {
        font-size: 1.2rem;
        line-height: 1.16;
    }
    .list-text {
        font-size: 0.9rem;
    }
    .card-divider {
        margin-bottom: 0.25rem;
    }
}

/* Ensure long titles wrap cleanly */
.card-title,
.card-title .text,
.card-title .highlight {
    white-space: normal;
    word-break: break-word;
}

/* Reveal content on hover (desktop) or when JS adds .active (mobile) */
.operation-card:hover .card-divider,
.operation-card.active .card-divider,
.operation-card:hover .card-list,
.operation-card.active .card-list {
    opacity: 1;
    max-height: 500px;
    /* large enough to fit content */
    transform: translateY(0);
}

.operation-card:hover .card-overlay,
.operation-card.active .card-overlay {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.92) 65%);
}

/* Tablet */
@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {

    /* .operations-section {
        container
    } */

    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}