/* =========================================================
 * RankwellPress — Hero Single Post Layout
 *
 * Full-width image header with overlay title, meta, and
 * share buttons. Used when single_post_layout = hero.
 *
 * @package RankwellPress
 * @since   3.4.0
 * ========================================================= */

/* =========================================================
 * WRAPPER
 * ========================================================= */

.single-hero-template {
    margin-bottom: calc(var(--rw-space-8, 3rem) * 0.5);
}

/* =========================================================
 * HERO SECTION
 * ========================================================= */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    margin-bottom: calc(var(--rw-space-5, 1.5rem) * 0.5);
    overflow: hidden;
}

/* Fallback when there's no featured image */
.hero-section--no-image {
    background: linear-gradient(
        135deg,
        var(--rw-color-accent, #0f1e33) 0%,
        color-mix(in srgb, var(--rw-color-accent, #0f1e33) 70%, #000) 100%
    );
    min-height: 300px;
}

/* =========================================================
 * OVERLAY
 * ========================================================= */

.hero-overlay {
    width: 100%;
    padding: 60px 0 40px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* =========================================================
 * CATEGORY BADGE
 * ========================================================= */

.hero-category {
    margin-bottom: 16px;
}

.hero-category a {
    display: inline-block;
    background: var(--rw-color-primary, #0d7c3e);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 6px;
    transition: opacity 0.15s ease;
    line-height: 1;
}

.hero-category a:hover {
    opacity: 0.85;
}

/* =========================================================
 * TITLE
 * ========================================================= */

.hero-title {
    font-family: var(--rw-font-heading, 'Lexend', system-ui, sans-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 20px;
    text-wrap: pretty;
}

/* =========================================================
 * META ROW
 * ========================================================= */

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.hero-author span {
    font-weight: 600;
    color: #ffffff;
}

.hero-date,
.hero-reading-time,
.hero-views,
.hero-comments {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
 * SHARE BUTTONS INSIDE HERO
 * ========================================================= */

.hero-share {
    margin-top: 20px;
}

.hero-share .rwp-share-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.hero-share .rwp-share-btn {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff;
}

.hero-share .rwp-share-btn:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* =========================================================
 * DARK MODE
 * ========================================================= */

html[data-theme="dark"] .hero-section--no-image {
    background: linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
}

html[data-theme="dark"] .hero-share .rwp-share-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .hero-share .rwp-share-btn:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
    }

    .hero-section--no-image {
        min-height: 220px;
    }

    .hero-overlay {
        padding: 40px 0 30px;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .hero-meta {
        gap: 12px;
        font-size: 0.8rem;
    }

    .hero-author img {
        width: 32px;
        height: 32px;
    }
}