/**
 * Petalya OptimBlog Fashion Motion
 * Version 2.0.0
 */

:root {
    --petalya-blog-accent: #a88a62;
    --petalya-blog-accent-soft: #d7c7ad;
    --petalya-blog-paper: #fffdf9;
    --petalya-blog-text: #3b342e;
    --petalya-blog-line: rgba(168, 138, 98, .42);
    --petalya-blog-shadow: 0 18px 45px rgba(67, 52, 36, .10);
}

/* -------------------------------------------------
   Shared reveal animation
   ------------------------------------------------- */
.information-layout[data-petalya-reveal="1"] {
    --petalya-x: 0px;
    --petalya-y: 34px;
    opacity: 0;
    transform: translate3d(var(--petalya-x), var(--petalya-y), 0);
    transition:
        opacity .72s cubic-bezier(.22, 1, .36, 1) var(--petalya-delay, 0ms),
        transform .86s cubic-bezier(.22, 1, .36, 1) var(--petalya-delay, 0ms);
    will-change: opacity, transform;
}

.information-layout[data-petalya-direction="left"] {
    --petalya-x: -42px;
    --petalya-y: 18px;
}

.information-layout[data-petalya-direction="right"] {
    --petalya-x: 42px;
    --petalya-y: 18px;
}

.information-layout[data-petalya-visible="1"] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

.information-layout[data-petalya-reveal="1"] .image {
    overflow: hidden;
}

.information-layout[data-petalya-reveal="1"] .image img {
    transform: scale(1.045);
    transition: transform 1.15s cubic-bezier(.22, 1, .36, 1) calc(var(--petalya-delay, 0ms) + 40ms);
    backface-visibility: hidden;
}

.information-layout[data-petalya-visible="1"] .image img {
    transform: scale(1);
}

/* Soft tactile feedback without hijacking touch scrolling. */
@media (hover: hover) and (pointer: fine) {
    .information-layout[data-petalya-visible="1"] > .thumbnail {
        transition: transform .35s ease, box-shadow .35s ease;
    }

    .information-layout[data-petalya-visible="1"] > .thumbnail:hover {
        transform: translateY(-5px);
        box-shadow: var(--petalya-blog-shadow);
    }
}

@media (hover: none) and (pointer: coarse) {
    .information-layout[data-petalya-visible="1"] > .thumbnail:active {
        transform: scale(.992);
        transition: transform .12s ease;
    }
}

/* -------------------------------------------------
   Homepage editorial timeline
   ------------------------------------------------- */
#common-home .petalya-fashion-timeline {
    position: relative;
    margin: 28px -15px 55px;
    padding: 12px 0 18px;
}

#common-home .petalya-fashion-timeline::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent 0, var(--petalya-blog-line) 6%, var(--petalya-blog-line) 94%, transparent 100%);
    transform: translateX(-.5px);
}

#common-home .petalya-fashion-timeline::after {
    content: "";
    display: table;
    clear: both;
}

#common-home .petalya-fashion-timeline > .information-layout {
    position: relative;
    z-index: 1;
    float: left !important;
    width: 50% !important;
    max-width: 50%;
    margin: 0 0 58px;
    padding-top: 0;
    clear: none !important;
}

#common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="left"] {
    padding-left: 15px;
    padding-right: 68px;
    clear: left !important;
}

#common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="right"] {
    float: right !important;
    padding-left: 68px;
    padding-right: 15px;
    margin-top: 92px;
}

#common-home .petalya-fashion-timeline > .information-layout > .information-thumb,
#common-home .petalya-fashion-timeline > .information-layout > .thumbnail {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background-color: var(--petalya-blog-paper);
    box-shadow: 0 10px 32px rgba(67, 52, 36, .07);
}

#common-home .petalya-fashion-timeline .image,
#common-home .petalya-fashion-timeline .image a,
#common-home .petalya-fashion-timeline .image img {
    display: block;
    width: 100%;
}

#common-home .petalya-fashion-timeline .image img {
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

#common-home .petalya-fashion-timeline .caption {
    padding: 22px 24px 25px;
    color: var(--petalya-blog-text);
}

#common-home .petalya-fashion-timeline .caption h4 {
    margin: 0 0 12px;
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: .015em;
}

#common-home .petalya-fashion-timeline .caption h4 a {
    color: var(--petalya-blog-text);
}

#common-home .petalya-fashion-timeline .caption > p {
    margin-bottom: 18px;
    color: #81786f;
    line-height: 1.75;
}

#common-home .petalya-fashion-timeline .caption .btn-primary {
    padding: 0 0 4px;
    border: 0;
    border-bottom: 1px solid var(--petalya-blog-accent);
    border-radius: 0;
    background: transparent;
    color: var(--petalya-blog-accent);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    box-shadow: none;
}

#common-home .petalya-fashion-timeline .caption .btn-primary:hover,
#common-home .petalya-fashion-timeline .caption .btn-primary:focus {
    background: transparent;
    color: #765b3c;
    border-bottom-color: #765b3c;
}

#common-home .petalya-fashion-timeline .petalya-date-source {
    display: none !important;
}

.petalya-timeline-marker {
    position: absolute;
    z-index: 4;
    top: 24px;
    width: 68px;
    height: 36px;
    pointer-events: none;
}

[data-petalya-side="left"] > .petalya-timeline-marker {
    right: -34px;
}

[data-petalya-side="right"] > .petalya-timeline-marker {
    left: -34px;
}

.petalya-timeline-dot {
    position: absolute;
    top: 12px;
    left: 28px;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--petalya-blog-accent);
    box-shadow: 0 0 0 1px var(--petalya-blog-accent-soft), 0 4px 10px rgba(77, 59, 39, .14);
    transform: scale(.65);
    transition: transform .55s cubic-bezier(.22, 1, .36, 1) calc(var(--petalya-delay, 0ms) + 180ms);
}

[data-petalya-visible="1"] > .petalya-timeline-marker .petalya-timeline-dot {
    transform: scale(1);
}

.petalya-timeline-date {
    position: absolute;
    top: -22px;
    left: 50%;
    min-width: 92px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--petalya-blog-accent);
    color: #fff;
    text-align: center;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .05em;
    transform: translateX(-50%);
    box-shadow: 0 6px 16px rgba(90, 67, 42, .14);
}

/* -------------------------------------------------
   Category/search cards: keep existing layout
   ------------------------------------------------- */
#information-category .information-layout[data-petalya-reveal="1"] > .thumbnail,
#information-search .information-layout[data-petalya-reveal="1"] > .thumbnail {
    transform: translateZ(0);
}

/* -------------------------------------------------
   Mobile: keep the fashion-style two-column timeline
   ------------------------------------------------- */
@media (max-width: 767px) {
    .information-layout[data-petalya-direction="left"] {
        --petalya-x: -28px;
        --petalya-y: 12px;
    }

    .information-layout[data-petalya-direction="right"] {
        --petalya-x: 28px;
        --petalya-y: 12px;
    }

    #common-home .petalya-fashion-timeline {
        margin: 18px -4px 38px;
        padding: 8px 0 10px;
    }

    #common-home .petalya-fashion-timeline::before {
        left: 50%;
        transform: translateX(-.5px);
    }

    #common-home .petalya-fashion-timeline > .information-layout {
        float: left !important;
        width: 50% !important;
        max-width: 50% !important;
        clear: none !important;
        margin-bottom: 34px !important;
    }

    #common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="left"] {
        float: left !important;
        clear: left !important;
        padding: 0 24px 0 4px !important;
        margin-top: 0 !important;
    }

    #common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="right"] {
        float: right !important;
        padding: 0 4px 0 24px !important;
        margin-top: 68px !important;
    }

    #common-home .petalya-fashion-timeline > .information-layout > .information-thumb,
    #common-home .petalya-fashion-timeline > .information-layout > .thumbnail {
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(67, 52, 36, .09);
    }

    #common-home .petalya-fashion-timeline .image img {
        aspect-ratio: 4 / 5;
    }

    #common-home .petalya-fashion-timeline .caption {
        padding: 11px 10px 13px;
    }

    #common-home .petalya-fashion-timeline .caption h4 {
        display: -webkit-box;
        overflow: hidden;
        min-height: 38px;
        margin: 0 0 7px;
        font-size: 14px;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    #common-home .petalya-fashion-timeline .caption > p {
        display: -webkit-box;
        overflow: hidden;
        margin: 0 0 9px;
        color: #81786f;
        font-size: 11px;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    #common-home .petalya-fashion-timeline .caption ul.list-inline {
        margin-bottom: 7px;
        font-size: 9px;
    }

    #common-home .petalya-fashion-timeline .caption .btn-primary {
        font-size: 9px;
        letter-spacing: .08em;
    }

    #common-home .petalya-fashion-timeline .petalya-timeline-marker {
        top: 18px;
        width: 48px;
        height: 30px;
    }

    #common-home .petalya-fashion-timeline [data-petalya-side="left"] > .petalya-timeline-marker {
        right: -24px;
        left: auto;
    }

    #common-home .petalya-fashion-timeline [data-petalya-side="right"] > .petalya-timeline-marker {
        left: -24px;
        right: auto;
    }

    #common-home .petalya-fashion-timeline .petalya-timeline-dot {
        top: 9px;
        left: 19px;
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    #common-home .petalya-fashion-timeline .petalya-timeline-date {
        top: -18px;
        min-width: 68px;
        padding: 4px 6px;
        font-size: 8px;
        letter-spacing: .02em;
    }
}

/* Very narrow phones: retain two columns, but simplify content further. */
@media (max-width: 374px) {
    #common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="left"] {
        padding-right: 20px !important;
    }

    #common-home .petalya-fashion-timeline > .information-layout[data-petalya-side="right"] {
        padding-left: 20px !important;
    }

    #common-home .petalya-fashion-timeline .caption {
        padding: 9px 8px 11px;
    }

    #common-home .petalya-fashion-timeline .caption h4 {
        min-height: 35px;
        font-size: 13px;
    }

    #common-home .petalya-fashion-timeline .caption > p {
        display: none;
    }

    #common-home .petalya-fashion-timeline .petalya-timeline-date {
        min-width: 62px;
        font-size: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .information-layout[data-petalya-reveal="1"],
    .information-layout[data-petalya-reveal="1"] .image img,
    .petalya-timeline-dot {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}
