/* =========================================
   Hero Banner System
   Loaded only on homepage
   Path: public/assets/css/hero-banners.css
========================================= */

/* ── Base structure ── */
.k-hero {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-bottom: 140px;
}

.k-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.k-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Overlay base ── */
.k-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Overlay direction — driven by content_position ── */
.k-hero-pos-left .k-hero-overlay {
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.65) 0%,
        rgba(0,0,0,0.35) 45%,
        rgba(0,0,0,0)    75%
    );
}

.k-hero-pos-right .k-hero-overlay {
    background: linear-gradient(
        270deg,
        rgba(0,0,0,0.65) 0%,
        rgba(0,0,0,0.35) 45%,
        rgba(0,0,0,0)    75%
    );
}

.k-hero-pos-center .k-hero-overlay {
    background: rgba(0,0,0,0.45);
}

/* ── Overlay intensity modifiers ── */
.k-hero-intensity-low .k-hero-overlay {
    opacity: 0.5;
}

.k-hero-intensity-medium .k-hero-overlay {
    opacity: 1;
}

.k-hero-intensity-high .k-hero-overlay {
    opacity: 1;
    filter: brightness(0.75);
}

/* ── Content wrapper ── */
.k-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 40px;
    color: #ffffff;
}

/* ── Content horizontal position ── */
.k-hero-pos-left .k-hero-content {
    text-align: left;
    margin-left: 0;
    padding-left: 20px;
}

.k-hero-pos-right .k-hero-content {
    text-align: left;
    margin-left: auto;
    margin-right: 0;
    padding-right: 20px;
}

.k-hero-pos-center .k-hero-content {
    text-align: center;
    margin: auto;
}

/* ── Content vertical position ── */
.k-hero-vert-top {
    align-items: flex-start;
    padding-top: 60px;
}

.k-hero-vert-middle {
    align-items: center;
}

.k-hero-vert-bottom {
    align-items: flex-end;
    padding-bottom: 180px;
}

/* ── Eyebrow label ── */
.k-hero-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
}

/* ── Badge ── */
.k-hero-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #ff4500;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* ── Title ── */
.k-hero-content h1,
.k-hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 12px;
    max-width: 580px;
    color: #ffffff;
}

.k-hero-pos-center .k-hero-content h1,
.k-hero-pos-center .k-hero-title {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Subtitle ── */
.k-hero-content p,
.k-hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 500px;
    color: rgba(255,255,255,0.85);
}

.k-hero-pos-center .k-hero-content p,
.k-hero-pos-center .k-hero-subtitle {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── CTA buttons ── */
.k-hero-ctas {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.k-hero-pos-center .k-hero-ctas {
    justify-content: center;
}

.k-hero-btn {
    display: inline-block;
    background: #ff4500;
    color: #ffffff;
    padding: 13px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.k-hero-btn:hover {
    background: #e63d00;
    color: #ffffff;
    text-decoration: none;
}

.k-hero-btn-ghost {
    display: inline-block;
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.45);
    padding-bottom: 2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.k-hero-btn-ghost:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.8);
    text-decoration: none;
}

/* ── Template specific overlays ── */
.k-hero-story .k-hero-overlay {
    background: rgba(0,0,0,0.48);
}

.k-hero-flash .k-hero-overlay {
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.42) 45%,
        rgba(0,0,0,0.05) 75%
    );
}

/* ── Minimal template ── */
.k-hero-minimal {
    background: #f8f8f6;
    height: 360px;
}

.k-hero-minimal .k-hero-overlay {
    display: none;
}

.k-hero-minimal .k-hero-content {
    color: #1a1a1a;
}

.k-hero-minimal .k-hero-eyebrow {
    color: rgba(0,0,0,0.45);
}

.k-hero-minimal .k-hero-content h1,
.k-hero-minimal .k-hero-title {
    color: #1a1a1a;
}

.k-hero-minimal .k-hero-content p,
.k-hero-minimal .k-hero-subtitle {
    color: rgba(0,0,0,0.65);
}

.k-hero-minimal-accent {
    display: block;
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: #ff4500;
}

.k-hero-minimal .k-hero-bg img {
    opacity: 0.18;
}

/* ── Mosaic template ── */
.k-hero-mosaic {
    height: 480px;
}

.k-hero-mosaic-grid {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 38%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    z-index: 2;
    overflow: hidden;
    height: 100%;
    background: transparent;
    padding: 55px;
    box-sizing: border-box;
}

.k-hero-mosaic-grid .mosaic-main {
    grid-column: 1;
    grid-row: 1 / 3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.k-hero-mosaic-grid img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    min-height: 0;
    background: transparent;
    mix-blend-mode: multiply;
}

.k-hero-mosaic .k-hero-content {
    max-width: 58%;
}

/* ── Split template ── */
.k-hero-split {
    height: 480px;
}

.k-hero-split-grid {
    position: absolute;
    right: 0;
    top: -30px;
    bottom: 0;
    width: 38%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    z-index: 2;
    overflow: hidden;
    height: 100%;
    background: transparent;
    padding: 90px;
    box-sizing: border-box;
}

.k-hero-split-grid img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    min-height: 0;
    background: transparent;
    mix-blend-mode: multiply;
}

.k-hero-split .k-hero-content {
    max-width: 58%;
}

/* ── Decorative image — right side on gradient/solid banners ── */
.k-hero-deco {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 2;
}

.k-hero-deco img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ── Showcase template ── */
.k-hero-showcase {
    height: 480px;
}

.k-hero-showcase .k-hero-content {
    max-width: 52%;
    position: relative;
    z-index: 3;
}

.k-hero-showcase-img {
    position: absolute;
    right: 40px;
    top: 16px;
    bottom: 16px;
    width: 38%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.k-hero-showcase-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 6px;
}

/* ── Desktop/Mobile background switching ── */
@media (min-width: 769px) {
    .k-hero-bg-mobile { display: none !important; }
    .k-hero-overlay-mobile { display: none !important; }
}

/* ── Mobile visibility controls ── */
@media (max-width: 768px) {
    .k-hero-bg-desktop { display: none !important; }
    .k-hero-overlay-desktop { display: none !important; }

    .k-hero-mobile-hide-image .k-hero-bg {
        display: none;
    }

    .k-hero-mobile-hide-image .k-hero-overlay {
        display: none;
    }

    .k-hero-mobile-hide-image {
        background: #1a2535;
    }

    .k-hero-mobile-hide-content .k-hero-content {
        display: none;
    }

    .k-hero-split-grid,
    .k-hero-mosaic-grid {
        display: none;
    }

    .k-hero-split .k-hero-content,
    .k-hero-mosaic .k-hero-content {
        max-width: 100%;
    }

    .k-hero-deco {
        display: none;
    }

    .k-hero-showcase-img {
        display: none;
    }

    .k-hero-showcase .k-hero-content {
        max-width: 100%;
    }
}

/* ── Mobile general adjustments ── */
@media (max-width: 768px) {
    .k-hero {
        height: 440px;
        padding-bottom: 120px;
    }

    .k-hero-pos-left .k-hero-content {
        padding-left: 20px;
    }

    .k-hero-content {
        padding: 0 20px;
        margin-top: 20px;
    }

    .k-hero-content h1,
    .k-hero-title {
        font-size: 28px;
    }

    .k-hero-content p,
    .k-hero-subtitle {
        font-size: 15px;
    }

    .k-hero-minimal {
        height: 280px;
    }
}

/* =========================================
   HERO FLOATING SECTION
========================================= */
#section_home_category_rotation {
    position: relative;
    z-index: 10;
    margin-top: -70px;
}

@media (max-width: 768px) {
    #section_home_category_rotation {
        margin-top: -70px;
    }
}
