/* ============================================================
   Blog Duekal — Frontend Styles
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ── Carousel ─────────────────────────────────────────────── */
.bd-carousel-wrapper {
    position: relative;
    overflow: visible;      /* permite o botão aparecer fora do wrapper */
    padding-bottom: 8px;
    padding-right: 36px;    /* reserva espaço para o botão não cortar os cards */
}

.bd-carousel {
    overflow: hidden;
}

.bd-carousel__slide {
    height: auto;
}

.bd-carousel__card {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bd-carousel__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.bd-carousel__img-wrap {
    aspect-ratio: 16/9;
    overflow: hidden;
    flex-shrink: 0;
}

.bd-carousel__img-wrap--placeholder {
    background: #d0b8e8;
}

.bd-carousel__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d0b8e8 0%, #9b59b6 100%);
}

.bd-carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.bd-carousel__card:hover .bd-carousel__img {
    transform: scale(1.04);
}

.bd-carousel__body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bd-carousel__category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.bd-carousel__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.bd-carousel__title a {
    text-decoration: none;
    color: inherit;
}

.bd-carousel__title a:hover {
    text-decoration: underline;
}

/* Navigation arrow */
.bd-carousel__nav-next {
    position: absolute;
    right: -26px;           /* posiciona fora do track de slides */
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    z-index: 1;             /* abaixo do menu fixo do tema */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bd-carousel__nav-next:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
}

/* ── Grid ─────────────────────────────────────────────────── */
.bd-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* Search bar */
.bd-grid-wrapper .bd-search-wrap {
    display: flex;
    justify-content: center;
}

.bd-grid-wrapper .bd-search {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.bd-grid-wrapper .bd-search__icon {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #c9a96e !important;
    pointer-events: none;
    width: 17px !important;
    height: 17px !important;
}

.bd-grid-wrapper .bd-search__input,
.bd-grid-wrapper .bd-search__input[type="search"] {
    width: 100% !important;
    padding: 12px 48px 12px 24px !important;
    border: 2.5px solid #c9a96e !important;
    border-radius: 9999px !important;
    font-size: 14px !important;
    color: #c9a96e !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bd-grid-wrapper .bd-search__input::placeholder {
    color: #c9a96e !important;
    opacity: 1 !important;
}

.bd-grid-wrapper .bd-search__input:focus {
    border-color: #b8924a !important;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, .15) !important;
    color: #333 !important;
}

.bd-grid-wrapper .bd-search__input:focus::placeholder {
    opacity: 0.5 !important;
}

/* Grid layout */
.bd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .bd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .bd-grid {
        grid-template-columns: 1fr;
    }
}

/* Grid card */
.bd-grid__card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(75, 32, 109, .08);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bd-grid__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(75, 32, 109, .16);
}

.bd-grid__card-link {
    display: block;
}

.bd-grid__card-img-wrap {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.bd-grid__card-img-wrap--placeholder {
    background: linear-gradient(135deg, #e8d5f5 0%, #c9a8e8 100%);
}

.bd-grid__card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bd-grid__card:hover .bd-grid__card-img {
    transform: scale(1.04);
}

.bd-grid__card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bd-grid__card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.bd-grid__card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.bd-grid__card-title a {
    color: inherit;
    text-decoration: none;
}

.bd-grid__card-title a:hover {
    text-decoration: underline;
}

.bd-grid__card-excerpt {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

.bd-grid__card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0e8f8;
}

.bd-grid__card-date {
    font-size: 12px;
    color: #a09abc;
}

.bd-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #a09abc;
    font-size: 15px;
    padding: 40px 0;
}

/* Load more */
.bd-load-more-wrap {
    display: flex;
    justify-content: center;
}

.bd-load-more {
    padding: 14px 40px;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: inherit;
}

.bd-load-more:hover:not(:disabled) {
    opacity: 0.85;
    transform: translateY(-2px);
}

.bd-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Screen reader only */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}
