/* Avis Casino Block Styles */

/* Base styles */
.advice {
    margin: 40px 0;
    display: flex;
    border-radius: 10px;
    background: linear-gradient(180deg, #23272B 0%, #1B1E23 100%);
    container-type: inline-size;
}

.advice .advice-item {
    width: 100%;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
}

.advice-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Container query pour détecter la largeur de .advice */
@container (max-width: 1023px) {
    .advice-content {
        flex-direction: column;
        align-items:flex-start;
        gap:0;
    }

    .advice-link {
        margin-top: 0;
    }
}

/* Image styles */
.advice-img {
    max-width: 184px;
}

.advice-img img {
    width: 100%;
    max-width: 184px;
    height: auto;
    margin: auto;
    object-fit: contain;
}

/* Text content */
.advice-title-text {
    flex-direction: column;
}

.advice-title {
    font: normal normal bold 24px/32px 'Open Sans';
    letter-spacing: 0;
    color: #fff;
}

.advice-title,
.advice-text {
    width: 100%;
    color: #fff !important;
    margin: 0;
}

/* Button styles */
.advice-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    text-align: center;
    font: normal normal bold 16px/21px 'Open Sans';
    letter-spacing: 0;
    background: #fff;
    border-radius: 5px;
    padding: 12px 20px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.advice-link:hover {
    background-color: var(--accent-color);
}

.advice-link .advice-link-text {
    display: inline-block;
}

.advice-link .advice-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Force text and arrow color */
.advice-link .advice-link-text,
.advice-link .advice-arrow {
    color: #000 !important;
}

/* Light mode compatibility */
.light-mode .wp-block-acf-classement-casino .advice-link {
    color: #000;
}

.light-mode .advice-title,
.light-mode .advice-text {
    color: #fff !important;
}

/* Responsive Design */

/* Tablet: 1024px to 769px */
@media (max-width: 1024px) and (min-width: 769px) {
    .advice {
        margin-inline: auto;
        padding: 24px;
    }

    .advice .advice-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap:34px;
    }

    .advice-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .advice-img {
        flex: 0 0 auto;
        max-width: 200px;
    }

    .advice-title-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 6px;
    }

    .advice-link {
        white-space: nowrap;
        width: fit-content;
        margin-top: 8px;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    .advice {
        max-width: 90%;
        margin: 60px auto 40px auto;
        padding-top: 38px;
        position: relative;
    }

    .advice .advice-item {
        padding: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .advice-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .advice-img {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 50%;
        max-width: 240px;
        z-index: 10;
    }

    .advice-img img {
        width: 100%;
        border-radius: 8px;
    }

    .advice-title-text {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .advice-title,
    .advice-text {
        text-align: center !important;
        margin: 0 !important;
    }

    .advice-register {
        width: 100%;
        max-width: 280px;
    }

    .advice-link {
        width: 100%;
        max-width: 320px;
        padding: 12px 20px;
        margin: auto;
    }
}