/* Main card container */
.card-result-container {
    width: 100%; /* Fixed width as requested */
    margin: 0 auto;
}

/* Card styles */
.card-result {
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    border: 1.1px solid #e2e8f0;
    box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 20px;
    height: 489px; /* Fixed height as requested */
}



.card-result:hover {
    /* transform: translateY(-5px); */
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
}

/* Main two-column structure - 75% of card height */
.card-result-body {
    display: flex;
    gap: 2rem;
    height: 75%; /* Takes 75% of the card's height */
}

/* Left column with image */
.card-result-left-column {
    flex: 1;
    min-width: 0;
    height: 100%; /* Takes full height of the body */
}

.card-result-image-area {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    height: 100%; /* Takes full height of the left column */
}

.card-result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right column with information */
.card-result-right-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Gap between the two sections */
    height: 100%; /* Takes full height of the body */
}

/* Top row with two info blocks - 40% of right column height */
.card-result-info-row {
    display: flex;
    gap: 1.5rem;
    height: 30%; /* 40% of the right column height */
}

.card-result-info-block {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-result-info-title {
    font-size: 1.4rem;
    font-weight: var(--font-weight-regular);
    margin-bottom: 0.7rem;
}

.card-result-info-status {
    margin-top: auto; /* Push status to the bottom */
    font-size: 2.4rem;
    font-weight: var(--font-weight-semibold);
}

/* Key results - 60% of right column height */
.card-result-key-results {
    background-color: #f9fafb;
    border-radius: 10px;
    padding: 15px;
    height: 70%; /* 60% of the right column height */
    display: flex;
    flex-direction: column;
}

.card-result-key-results-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.card-result-key-results-list {
    list-style-type: none;
    flex: 1;
    overflow-y: auto; /* Allow scrolling if too much content */
}

.card-result-key-results-item {
    display: flex;
    align-items: flex-start;
    padding-left: 5px;
    font-size: 1.4rem;
}

.card-result-key-results-item:before {
    content: "•"; /* Bullet point */
    margin-right: 8px;
    color: #666;
    font-size: 16px;
    line-height: 1.2;
}

/* Card footer - 25% of card height */
.card-result-footer {
    margin-top: 2rem;
    height: 25%; /* Takes 25% of the card's height */
}


/* Title and source */
.card-result-title {
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    color: #222;
}

/* Authors section */
.card-result-authors {
    display: flex;
    gap: 15px;
    /* margin-bottom: 1.5rem; */
}

.card-result-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-result-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0; /* couleur de fond si pas d’image */
}

.card-result-author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

.card-result-author-info {
    display: flex;
    flex-direction: column;
}

.card-result-author-name {
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
}

.card-result-author-position {
    font-size: 12px;
    color: #666;
}

.card-result-source {
    font-size: 12px;
    color: #666;
    margin-bottom: 1.5rem;
}



/* Responsive styles */
@media (max-width: 860px) {
    .card-result-container {
        width: 100%;
        max-width: 820px;
    }
    
    .card-result {
        height: auto;
        /* min-height: 420px; */
    }
    
}

@media (max-width: 800px) {
    .card-result {
        padding: 15px;
    }

    .card-result-body {
        flex-direction: column;
        gap: 0;
        /* margin-bottom: 20px; */
    }

    .card-result-right-column {
        width: 100%;
        /* height: auto; */
        /* margin-top: 15px; */
        
    }
    
    .card-result-info-row {
        display: none;
        }
    
    .card-result-key-results {
        display: none;
    }

    .card-result-footer {
        flex-direction: column;
        gap: 15px;
        height: auto;
    }

    .card-result-authors {
        flex-wrap: wrap;
    }

}

@media (max-width: 480px) {
  /* Cacher complètement la colonne droite */
  .card-result-right-column {
    display: none;
  }

  /* Réadapter la colonne gauche pour les petits écrans */
  .card-result-left-column {
    flex: 1;
    width: 100%;
    height: auto; /* Hauteur automatique au lieu de 100% */
  }

  /* Ajuster la hauteur de l'image */
  .card-result-image-area {
    /* height: auto; Hauteur automatique */
    max-height: 300px; /* Limiter la hauteur maximale */
  }

  /* Ajuster la hauteur de la carte */
  .card-result {
    height: auto;
    min-height: 0; /* Supprimer la hauteur minimale */
    display: flex;
    flex-direction: column;
  }

  /* Ajuster la hauteur du corps de la carte */
  .card-result-body {
    min-height: 0; /* Supprimer la hauteur minimale */
    margin-bottom: 10px;
  }

  /* Ajuster le pied de page */
  .card-result-footer {
    margin-top: 10px;
    height: auto;
  }

  /* Afficher le titre mobile et cacher le titre desktop */
  .card-result-title {
    display: block;
    margin-bottom: 0.8rem;
    order: 1;
  }

  .card-result-title-desktop {
    display: none;
  }

  /* Ajuster les auteurs */
  .card-result-authors {
    flex-direction: column;
    gap: 10px;
  }
}
