/* ==========================================================================
   Dauroh Post Grid - Frontend Styles
   ========================================================================== */

.dauroh-pg {
    --dauroh-pg-gap: 16px;
    --dauroh-pg-accent: #c81d1d;
    --dauroh-pg-radius: 12px;
    --dauroh-pg-arrow-size: 40px;
    --dauroh-pg-arrow-bg: rgba( 0, 0, 0, 0.55 );
    --dauroh-pg-arrow-bg-hover: rgba( 0, 0, 0, 0.8 );
    --dauroh-pg-dot-color: rgba( 0, 0, 0, 0.25 );
    --dauroh-pg-dot-active: #1e1e1e;

    position: relative;
    width: 100%;
    margin: 0 auto 32px;
    box-sizing: border-box;
    font-family: inherit;
}

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

/* ----------------------- Header ----------------------- */
.dauroh-pg__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid var( --dauroh-pg-accent );
}

.dauroh-pg__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dauroh-pg__eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dauroh-pg__title {
    margin: 0;
    font-size: clamp( 22px, 3.2vw, 32px );
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #111;
    text-transform: uppercase;
}

.dauroh-pg__more {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.dauroh-pg__more:hover,
.dauroh-pg__more:focus {
    color: var( --dauroh-pg-accent );
    text-decoration: none;
}

/* ----------------------- Slider ----------------------- */
.dauroh-pg__viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.dauroh-pg__track {
    display: flex;
    flex-wrap: nowrap;
    gap: var( --dauroh-pg-gap );
    transition: transform 0.45s cubic-bezier( 0.22, 0.61, 0.36, 1 );
    will-change: transform;
    touch-action: pan-y;
    transform: translate3d( 0, 0, 0 );
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Default: 2 cards desktop. JS override via inline width per slide. */
.dauroh-pg__card {
    flex: 0 0 calc( ( 100% - var( --dauroh-pg-gap ) ) / 2 );
    min-width: 0;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* ----------------------- Card content ----------------------- */
.dauroh-pg__media {
    display: block;
    overflow: hidden;
    border-radius: var( --dauroh-pg-radius );
    aspect-ratio: 16 / 10;
    background: #f0f0f0;
    text-decoration: none;
    line-height: 0;
}

.dauroh-pg__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.dauroh-pg__media:hover .dauroh-pg__img {
    transform: scale( 1.04 );
}

.dauroh-pg__img--placeholder {
    background: linear-gradient( 135deg, #ececec, #f7f7f7 );
}

.dauroh-pg__body {
    padding: 14px 4px 0;
}

.dauroh-pg__heading-card {
    margin: 0 0 12px;
    font-size: clamp( 16px, 1.8vw, 22px );
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dauroh-pg__link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dauroh-pg__link:hover,
.dauroh-pg__link:focus {
    color: var( --dauroh-pg-accent );
}

.dauroh-pg__pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba( 200, 29, 29, 0.1 );
    color: var( --dauroh-pg-accent );
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
}

.dauroh-pg__pill:hover,
.dauroh-pg__pill:focus {
    background: rgba( 200, 29, 29, 0.18 );
    text-decoration: none;
}

/* ----------------------- Arrow nav ----------------------- */
.dauroh-pg__arrow {
    position: absolute;
    top: 35%;
    transform: translateY( -50% );
    width: var( --dauroh-pg-arrow-size );
    height: var( --dauroh-pg-arrow-size );
    border: none;
    border-radius: 50%;
    background: var( --dauroh-pg-arrow-bg );
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.dauroh-pg__arrow:hover { background: var( --dauroh-pg-arrow-bg-hover ); }

.dauroh-pg__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dauroh-pg__arrow[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.dauroh-pg__arrow--prev { left: 8px; }
.dauroh-pg__arrow--next { right: 8px; }

.dauroh-pg__arrow svg { width: 22px; height: 22px; }

/* ----------------------- Dots ----------------------- */
.dauroh-pg__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.dauroh-pg__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var( --dauroh-pg-dot-color );
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dauroh-pg__dot:hover { background: rgba( 0, 0, 0, 0.45 ); }

.dauroh-pg__dot.is-active {
    background: var( --dauroh-pg-accent );
    transform: scale( 1.25 );
}

.dauroh-pg__dot:focus-visible {
    outline: 2px solid var( --dauroh-pg-accent );
    outline-offset: 2px;
}

/* ----------------------- Mobile ----------------------- */
@media ( max-width: 782px ) {
    .dauroh-pg__header {
        padding-left: 10px;
    }

    .dauroh-pg__title {
        font-size: clamp( 20px, 6vw, 26px );
    }

    .dauroh-pg__more {
        font-size: 13px;
    }

    .dauroh-pg__arrow {
        --dauroh-pg-arrow-size: 36px;
    }

    .dauroh-pg__arrow--prev { left: 4px; }
    .dauroh-pg__arrow--next { right: 4px; }

    .dauroh-pg__heading-card {
        font-size: 18px;
    }
}

@media ( prefers-reduced-motion: reduce ) {
    .dauroh-pg__track,
    .dauroh-pg__img,
    .dauroh-pg__more {
        transition: none;
    }
}
