:root {
    --main-background: rgb(59, 59, 59);
    --ad-background: rgb(50, 50, 50);
    --font-overall: Arial, sans-serif;
    --text-color: #d3d3d3;
}

body {
    background-color: var(--main-background);
    color: var(--text-color);
    font-family: Arial, sans-serif;
}

.recent-occasions-wrapper {
 justify-content: center;
 text-align: center;
}

.recent-occasions {
    padding: 10px;
    margin: 100px;
    margin-top: 0;
    margin-bottom: 0;
}

.recent-occasions-title {
    background-color: black;
}

.recent-occasions-wrapper h2{
    width: 100%;
    text-align: center;   
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: bolder;  
    letter-spacing: 3px;  
    box-shadow: black 0px 5px 5px;

    margin-top: -45px;
    padding-bottom: 15px;
}

.myButton {
	background-color:transparent;
	border:2px solid #ffffff;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:23px;
	font-weight:bold;
	padding:20px 12px;
	text-decoration:none;
	text-shadow:1px 1px 0px #2f6627;
    margin: auto;
    margin-bottom: 60px;
}

.myButton:hover {
	background-color:transparent;
}
.myButton:active {
	position:relative;
	top:1px;
}

        

.title-top {
    font-weight: bold;
    font-size: 1.1em;
}

#adlist .hr-rounded {
    border: none;
    height: 4px;
    background: #e5e5e5;
    border-radius: 999px;
    margin: 22px 0;
}

.title-bottom {
    font-size: 1.2rem;
    color: var(--text-color);
}

.title {
    display: inline-block;   /* titel wordt zo breed als zijn inhoud */
}

.nap-check {
    color: #00ff00; /* felgroen */
    font-weight: bold;
}

#adList {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centreert de laatste rij */
    gap: 25px;
    padding: 20px;
}

/* Kaarten flexibel maken zodat ze stretchen */
#adList .card {
    flex: 1 1 calc((100% - 50px) / 3); /* 3 kaarten per rij, met gap meegerekend */
    max-width: none;  /* geen beperking, stretchen naar beschikbare ruimte */
    min-width: 300px; /* minimale breedte zodat het niet te smal wordt */
    box-sizing: border-box;
}

/* CARD-STYLING */
.card {
    min-width: 380px;

    background: var(--ad-background);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    position: relative; 
    padding-bottom: 18px;

    /* nieuwe shadow box */
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.3),    /* subtiele interne diepte */
        0 8px 20px rgba(0,0,0,0.5),   /* grotere blur voor “zweven” effect */
        0 12px 40px rgba(0,0,0,0.2);  /* extra diepte */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Optioneel: hover effect voor meer diepte */
.card:hover {
    transform: scale(1.07);        /* kaart wordt zichtbaar groter */
    z-index: 20;                   /* voorkomt dat hij achter andere kaarten valt */
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.4),
        0 12px 30px rgba(0,0,0,0.6),
        0 16px 50px rgba(0,0,0,0.3);
}


.card img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: -20px;
    text-align: center;
    width: 100%;
    padding: 10px;
}

.card-content {
    padding: 28px;
    padding-top: 10px;
    padding-bottom: 0;
    height: auto;
    position: relative; /* voor SoH-badge */
}

.meta {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 6px;
}

.description {
    margin: 10px 0 15px 0;
    font-size: 14px;
    color: #ddd;
    min-height: 40px;
}

/* SoH Badge */
.soh-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #005500;
    color: white;
    font-weight: bold;
    border-radius: 50%;

    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;

    display: none;
}

/* CARD FOOTER: link + prijs in dezelfde row */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-top: 1px solid #2a2a2a;
    margin-top: auto; /* altijd onderaan card-content */
}

.card-footer a {
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    color: red;
}

.card-footer a::after {
    content: " >";
    font-weight: bold;
}

/* Performance badge */
.performance-badge {
    width: fit-content;
    height: 4px;
    background-color: red;
    margin-top: 4px;
    border-radius: 2px;
}

/* HR rounded */
.hr-rounded {
    border: none;
    height: 2px;
    background: #e0e0e0;
    border-radius: 100px;
    margin: 12px 0;
    margin-left: -10px;
    margin-right: -10px;
}

.middle-row {
    font-size: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}


.bottom-row {
    font-size: 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.price {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: bold;
}

.view-link {
    display: flex;      /* zorgt dat het pijltje mooi meebeweegt */
    text-decoration: none;
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: bold;    
    padding: 0;
    border: none;
    background: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #adList .card {
        flex: 1 1 100%; /* kaarten nemen 90% van de breedte in */
        min-width: unset; /* verwijdert minimale breedte voor kleinere schermen */
        max-width: 100%; /* zorgt dat ze niet groter worden dan 90% */
    }

    .recent-occasions {
        margin: 20px; /* minder marge op mobiele schermen */
        padding: 10px;
    }

    .recent-occasions-wrapper h2 {
        font-size: 2rem; /* kleinere titel voor mobiel */
        margin-top: -25px;
    }

    .myButton {
        font-size: 20px;
        padding: 15px 10px;
    }


}


/* Fade-in START status */
.card {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        box-shadow 0.3s ease;
}

/* Fade-in EINDE (wanneer zichtbaar) */
.card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effect */
.card:hover {
    transform: translateY(-10px) scale(1.06);
    z-index: 20;
}

/* Kleine schermen: 1 grote bovenaan, 2 kleinere eronder */
@media (max-width: 900px) {
    #adList {
        display: flex;
        flex-wrap: wrap;
    }

    #adList .card {
        flex: 1 1 50%;
        min-width: 250px;
    }

    .card-content {
        padding: 10px;
    }

    .hr-rounded {
        color: red;
    }
}

@media (max-width: 1400px) {
   .recent-occasions {
    margin: 0;
    padding: 0;
   }
}

@media (max-width: 1200px) {
    #adList .card:nth-child(1) {
        flex: 1 1 60%;
        margin-left: 150px;
        margin-right: 150px;
    }
}

@media (max-width: 900px) {
    #adList .card:nth-child(1) {
        margin-left: 0px;
        margin-right: 0px;
    }

    .hr-rounded{
        margin-left: 5px;
        margin-right: 5px;
    }
}