/* ═══════════════════════════════════════════════════
   Honey Hero Widget — v1.0.0
   Full-width hero carousel for MagSoul Pro / ThemesDNA
═══════════════════════════════════════════════════ */

/* ── BASE ───────────────────────────────────────── */
.hhw-widget *,
.hhw-widget *::before,
.hhw-widget *::after { box-sizing: border-box; }

.hhw-widget {
    width: 100%;
    font-family: inherit;
    overflow: hidden;
}

/* ── WIDGET TITLE ───────────────────────────────── */
.hhw-header       { padding: 10px 0 8px; }
.hhw-widget-title { margin: 0; padding: 0; line-height: 1.3; }

/* ══════════════════════════════════════════════════
   VIEWPORT  — the visible window for the carousel
══════════════════════════════════════════════════ */
.hhw-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0d1b2a;  /* dark fallback behind images */
}

/* Hero heights */
.hhw-height-compact    { height: 320px; }
.hhw-height-medium     { height: 520px; }
.hhw-height-large      { height: 650px; }
.hhw-height-fullscreen { height: 100vh; }

/* Responsive height scaling */
@media (max-width: 1024px) {
    .hhw-height-compact    { height: 240px; }
    .hhw-height-medium     { height: 380px; }
    .hhw-height-large      { height: 480px; }
}
@media (max-width: 640px) {
    .hhw-height-compact    { height: 200px; }
    .hhw-height-medium     { height: 280px; }
    .hhw-height-large      { height: 340px; }
    .hhw-height-fullscreen { height: 60vh; }
}

/* ══════════════════════════════════════════════════
   SLIDES
══════════════════════════════════════════════════ */
.hhw-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hhw-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Background image ── */
.hhw-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 8s ease; /* Ken Burns slow zoom */
}
.hhw-slide-active .hhw-slide-bg {
    transform: scale(1.06);
}

/* ── Content wrapper ── */
.hhw-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* default: bottom */
}

/* Title position variants */
.hhw-pos-overlay-top    { justify-content: flex-start; }
.hhw-pos-overlay-center { justify-content: center; }
.hhw-pos-overlay-bottom { justify-content: flex-end; }

/* For "below" position, content is below viewport — handled separately */
.hhw-pos-below { position: relative; background: #fff; }

/* ── Overlay inner (text area on image) ── */
.hhw-overlay-inner {
    padding: 24px 36px;
    max-width: 860px;
}

/* Gradient backgrounds per position */
.hhw-pos-overlay-bottom .hhw-overlay-inner {
    background: linear-gradient(transparent, rgba(0,0,0,0.80) 40%);
    padding-top: 80px;
    max-width: 100%;
}
.hhw-pos-overlay-top .hhw-overlay-inner {
    background: linear-gradient(rgba(0,0,0,0.75) 60%, transparent);
    padding-bottom: 60px;
    max-width: 100%;
}
.hhw-pos-overlay-center .hhw-overlay-inner {
    background: rgba(0,0,0,0.52);
    align-self: center;
    border-radius: 6px;
    text-align: center;
    margin: 0 auto;
}

/* ── Below-image text body ── */
.hhw-below-body {
    padding: 18px 24px 20px;
    background: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── CATEGORY BADGE ── */
.hhw-cat-wrap { margin-bottom: 6px; }
.hhw-cat-badge {
    display: inline-block;
    background: #c0872a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: background 0.2s;
}
.hhw-cat-badge:hover { background: #1a3a5c; color: #fff; }

/* ── META ── */
.hhw-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}
.hhw-date,
.hhw-author,
.hhw-comments,
.hhw-likes {
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    white-space: nowrap;
}
/* Meta on "below" layout */
.hhw-below-body .hhw-date,
.hhw-below-body .hhw-author,
.hhw-below-body .hhw-comments,
.hhw-below-body .hhw-likes { color: #777; }

/* ── POST TITLE ── */
.hhw-post-title {
    font-size: clamp(18px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.25;
    margin: 6px 0 8px;
    color: #fff;
}
.hhw-post-title a { text-decoration: none; color: inherit; }
.hhw-post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hhw-title-overlay,
.hhw-title-overlay a { color: #fff !important; }

/* Title on "below" layout */
.hhw-below-body .hhw-post-title {
    font-size: clamp(16px, 1.6vw, 26px);
    color: #1a1a1a;
}
.hhw-below-body .hhw-post-title a { color: #1a1a1a; }

/* ── TITLE STYLES ── */
.hhw-title-style-uppercase { text-transform: uppercase; letter-spacing: 0.5px; }
.hhw-title-style-lowercase { text-transform: lowercase; }
.hhw-title-style-underline { text-decoration: underline; text-underline-offset: 4px; }
.hhw-title-style-marker a  {
    background: linear-gradient(transparent 55%, rgba(255,224,80,0.55) 55%);
    padding-bottom: 2px;
}
.hhw-title-style-box a {
    background: rgba(255,255,255,0.18);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline;
}

/* ── EXCERPT & FULL POST ── */
.hhw-excerpt {
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
    margin: 0 0 8px;
    max-width: 680px;
}
.hhw-excerpt p { margin: 0; }
.hhw-below-body .hhw-excerpt { color: #555; }

.hhw-fullpost { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.7; }
.hhw-fullpost p { margin: 0 0 8px; }
.hhw-below-body .hhw-fullpost { color: #444; }

/* ── FOOTER ── */
.hhw-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.hhw-readmore {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.18);
    padding: 7px 18px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: background 0.25s, border-color 0.25s;
}
.hhw-readmore:hover {
    background: #c0872a;
    border-color: #c0872a;
    color: #fff;
}
.hhw-below-body .hhw-readmore {
    background: #1a3a5c;
    border-color: #1a3a5c;
    color: #fff;
}
.hhw-below-body .hhw-readmore:hover { background: #c0872a; border-color: #c0872a; }

/* ── SHARE BUTTONS ── */
.hhw-share { display: flex; gap: 5px; }
.hhw-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none !important;
    color: #fff !important;
    transition: opacity 0.2s, transform 0.15s;
}
.hhw-share-btn:hover { opacity: 0.82; transform: scale(1.12); }
.hhw-share-fb { background: #1877f2; }
.hhw-share-x  { background: #000; }
.hhw-share-li { background: #0077b5; }
.hhw-share-wa { background: #25d366; }

/* ══════════════════════════════════════════════════
   CAROUSEL TRANSITIONS
══════════════════════════════════════════════════ */

/* ── FADE ── */
.hhw-transition-fade .hhw-slide {
    opacity: 0;
    transition: opacity 0.9s ease;
    z-index: 1;
}
.hhw-transition-fade .hhw-slide.hhw-slide-active { opacity: 1; z-index: 2; }

/* ── SLIDE ── */
.hhw-transition-slide .hhw-slide {
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.hhw-transition-slide .hhw-slide.hhw-slide-active  { transform: translateX(0);    z-index: 2; }
.hhw-transition-slide .hhw-slide.hhw-slide-out-left{ transform: translateX(-100%); z-index: 3; }
.hhw-transition-slide .hhw-slide.hhw-slide-in-right{ transform: translateX(100%); }
.hhw-transition-slide .hhw-slide.hhw-slide-out-right{ transform: translateX(100%); z-index: 3; }
.hhw-transition-slide .hhw-slide.hhw-slide-in-left { transform: translateX(-100%); }

/* ── ZOOM ── */
.hhw-transition-zoom .hhw-slide {
    opacity: 0;
    transform: scale(1.07);
    transition: opacity 0.85s ease, transform 0.85s ease;
    z-index: 1;
}
.hhw-transition-zoom .hhw-slide.hhw-slide-active { opacity: 1; transform: scale(1); z-index: 2; }

/* ══════════════════════════════════════════════════
   NAVIGATION ARROWS
══════════════════════════════════════════════════ */
.hhw-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
.hhw-arrow:hover { background: rgba(0,0,0,0.65); transform: translateY(-50%) scale(1.1); }
.hhw-arrow-prev { left: 14px; }
.hhw-arrow-next { right: 14px; }

@media (max-width: 480px) {
    .hhw-arrow { width: 36px; height: 36px; font-size: 22px; }
    .hhw-arrow-prev { left: 8px; }
    .hhw-arrow-next { right: 8px; }
}

/* ══════════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════════ */
.hhw-progress {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.25);
    z-index: 10;
}
.hhw-progress-bar {
    height: 100%;
    background: #c0872a;
    width: 0%;
}

/* ══════════════════════════════════════════════════
   NAVIGATION DOTS
══════════════════════════════════════════════════ */
.hhw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 4px;
}
.hhw-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.2s;
}
.hhw-dot:hover { background: #999; transform: scale(1.2); }
.hhw-dot.hhw-dot-active { background: #1a3a5c; transform: scale(1.25); }

/* ══════════════════════════════════════════════════
   SCROLL ANIMATIONS — PROGRESSIVE ENHANCEMENT
   Widget is always visible. JavaScript adds
   "hhw-js-ready" before hiding anything.
══════════════════════════════════════════════════ */
.hhw-scroll-fade,
.hhw-scroll-slide,
.hhw-scroll-zoom {
    transition: opacity 0.9s ease, transform 0.9s ease;
}
.hhw-js-ready .hhw-scroll-fade  { opacity: 0; }
.hhw-js-ready .hhw-scroll-slide { opacity: 0; transform: translateY(40px); }
.hhw-js-ready .hhw-scroll-zoom  { opacity: 0; transform: scale(0.94); }

.hhw-anim-visible {
    opacity: 1 !important;
    transform: none !important;
}

/* ══════════════════════════════════════════════════
   HOVER EFFECTS  (applied to .hhw-viewport)
══════════════════════════════════════════════════ */
.hhw-hover-lift {
    transition: box-shadow 0.3s ease;
}
.hhw-hover-lift:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.hhw-hover-glow {
    transition: box-shadow 0.3s ease;
}
.hhw-hover-glow:hover {
    box-shadow: 0 0 0 4px #c0872a, 0 12px 40px rgba(192,135,42,0.3);
}

.hhw-hover-colorshift .hhw-slide-bg {
    transition: filter 0.4s ease, transform 8s ease;
}
.hhw-hover-colorshift:hover .hhw-slide-bg {
    filter: sepia(0.25) saturate(1.3) brightness(1.05);
}

.hhw-hover-tilt {
    transition: transform 0.15s ease;
    transform-style: preserve-3d;
}

/* ══════════════════════════════════════════════════════════════
   IMAGE FIT — v1.2.0
   ══════════════════════════════════════════════════════════════ */

/* Cover (default) is the existing background-size:cover behaviour.
   Adding the class just makes the default explicit. */
.hhw-img-fit-cover .hhw-slide-bg {
    background-size: cover;
}

/* Contain — show the full image, no cropping.
   The viewport background colour fills any letterbox bars. */
.hhw-img-fit-contain .hhw-slide-bg {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}
/* Disable Ken Burns zoom in contain mode (would expose the background) */
.hhw-img-fit-contain .hhw-slide-active .hhw-slide-bg {
    transform: none !important;
    transition: none !important;
}

/* ══════════════════════════════════════════════════════════════
   BELOW-IMAGE TEXT PANELS — v1.2.0
   ══════════════════════════════════════════════════════════════ */

.hhw-below-container {
    width: 100%;
    position: relative;
}

.hhw-below-panel {
    display: none;
    padding: 18px 22px 20px;
    background: #fff;
    border-top: 3px solid #0d1b2a;
}

.hhw-below-panel.hhw-below-active {
    display: block;
}

/* Fade transition between panels when carousel advances */
.hhw-below-panel {
    opacity: 0;
    transition: opacity 0.35s ease;
}
.hhw-below-panel.hhw-below-active {
    opacity: 1;
}

/* Tighten up typography inside below panels */
.hhw-below-panel .hhw-below-body { padding: 0; background: transparent; }
.hhw-below-panel .hhw-title      { font-size: 1.25rem; margin: 6px 0 8px; line-height: 1.35; }
.hhw-below-panel .hhw-meta       { font-size: 0.78rem; margin-bottom: 8px; }
.hhw-below-panel .hhw-excerpt    { font-size: 0.9rem; line-height: 1.6; }
.hhw-below-panel .hhw-footer     { margin-top: 12px; }

/* ══════════════════════════════════════════════════════════════
   CONTAIN MODE BLUR FILL + EXCERPT FIX — v1.2.1
   ══════════════════════════════════════════════════════════════ */

/* Blurred fill layer — same image, cover+blur, sits behind .hhw-slide-bg
   because it comes earlier in the DOM (no explicit z-index needed). */
.hhw-slide-blur {
    position: absolute;
    inset: -8%;           /* overshoot slightly to hide blur halo at edges  */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(24px) brightness(0.45) saturate(1.4);
}

/* Slide-bg in contain mode: show full image above the blur layer */
.hhw-img-fit-contain .hhw-slide-bg {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: transparent !important; /* let blur show through bars */
}

/* Ken Burns disabled in contain mode (scale reveals the blur fill) */
.hhw-img-fit-contain .hhw-slide-active .hhw-slide-bg {
    transform: none !important;
    transition: none !important;
}

/* ── EXCERPT READABILITY ──────────────────────────────────────── */
/* Global minimum — covers both overlay and below-image modes */
.hhw-excerpt,
.hhw-excerpt p {
    font-size: 1rem !important;    /* ≈ 16 px at browser default */
    line-height: 1.7  !important;
    margin-top: 0     !important;
    margin-bottom: 0  !important;
}

/* Overlay excerpts — slightly smaller so they fit inside the image */
.hhw-overlay-inner .hhw-excerpt,
.hhw-overlay-inner .hhw-excerpt p {
    font-size: 0.95rem !important;
    line-height: 1.65  !important;
}

/* ══════════════════════════════════════════════════════════════
   v1.2.2 — TITLE ALIGNMENT + EXCERPT SIZE
   ══════════════════════════════════════════════════════════════ */

/* ── Widget title centred ── */
.hhw-header-center { text-align: center; }

/* ── Post title centred (overlay + below-image modes) ── */
.hhw-align-center .hhw-post-title,
.hhw-align-center .hhw-post-title a {
    display: block;
    text-align: center;
}

/* Centre cat badge row, meta row, footer row when centred */
.hhw-align-center .hhw-cat-wrap  { text-align: center; }
.hhw-align-center .hhw-meta      { justify-content: center; text-align: center; }
.hhw-align-center .hhw-footer    { justify-content: center; }
.hhw-align-center .hhw-readmore  { display: inline-block; }

/* ── Excerpt — readable size (absolute px overrides any theme rem base) ── */
.hhw-excerpt,
.hhw-excerpt p {
    font-size:   15px !important;
    line-height: 1.7  !important;
    margin-top:  0    !important;
    margin-bottom: 0  !important;
}

/* Overlay excerpts a touch smaller so they fit within the image frame */
.hhw-overlay-inner .hhw-excerpt,
.hhw-overlay-inner .hhw-excerpt p {
    font-size: 14px !important;
}

/* ══════════════════════════════════════════════════════════════
   v1.2.3 — EXCERPT FULL-WIDTH FIX
   ══════════════════════════════════════════════════════════════ */

/* Force excerpt to span the full panel width regardless of theme constraints */
.hhw-excerpt,
.hhw-excerpt p {
    display:   block      !important;
    width:     100%       !important;
    max-width: 100%       !important;
    box-sizing: border-box !important;
}
