/*
Theme Name: Ensemble Theme
Theme URI: https://ensemble-plugin.com
Author: Kraftwerk Marketing
Author URI: https://kraftwerk-marketing.de
Description: Companion theme for Ensemble Plugin. Simple header/footer/blog layouts that inherit colors and fonts from Ensemble Designer.
Version: 2.7.0
Text Domain: ensemble-theme
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================
   CSS VARIABLES - Inherited from Ensemble Designer
   ============================================ */

:root {
    /* Spacing */
    --et-space-xs: 0.5rem;
    --et-space-sm: 1rem;
    --et-space-md: 1.5rem;
    --et-space-lg: 2rem;
    --et-space-xl: 3rem;
    
    /* Container - uses Designer variable */
    --et-container-width: var(--ensemble-container-width, 1200px);
    --et-container-narrow: 800px;
    --et-container-wide: 1400px;
    
    /* Transitions */
    --et-transition-fast: 0.15s ease;
    --et-transition-normal: 0.3s ease;
    --et-transition-slow: 0.5s ease;
    
    /* Shadows */
    --et-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --et-shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --et-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --et-shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* Z-Index */
    --et-z-dropdown: 100;
    --et-z-sticky: 200;
    --et-z-modal: 300;
    --et-z-overlay: 400;
    
    /* Grid - from Designer */
    --et-grid-columns: var(--ensemble-grid-columns, 3);
    --et-card-gap: var(--ensemble-card-gap, 24px);
    --et-section-spacing: var(--ensemble-section-spacing, 40px);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base styles - only when NO Ensemble layout is active */
body:not(.et-layout-pure):not(.et-layout-stage):not(.et-layout-lovepop):not(.et-layout-classic):not(.et-layout-magazine) {
    font-family: var(--ensemble-font-body, system-ui, -apple-system, sans-serif);
    font-size: var(--ensemble-body-size, 16px);
    line-height: var(--ensemble-line-height-body, 1.6);
    color: var(--ensemble-text, #1a1a1a);
    background-color: var(--ensemble-bg, #f8f9fa);
}

/* ============================================
   TYPOGRAPHY - ONLY theme-specific elements
   DO NOT style anything that could be Ensemble content
   ============================================ */

/* Theme content areas only - NOT .et-site-content which contains shortcodes */
.et-content h1,
.et-content h2,
.et-content h3,
.et-content h4,
.et-content h5,
.et-content h6,
.et-page-content h1,
.et-page-content h2,
.et-page-content h3,
.et-page-content h4,
.et-single-content h1,
.et-single-content h2,
.et-single-content h3,
.et-single-content h4,
.et-post-card h2,
.et-archive-title,
.et-page-title,
.et-single-title {
    font-family: var(--ensemble-font-heading, system-ui, sans-serif);
    font-weight: var(--ensemble-heading-weight, 600);
    line-height: var(--ensemble-line-height-heading, 1.3);
    margin: 0 0 0.6em;
    color: var(--ensemble-text, #1a1a1a);
}

.et-content h1 { font-size: var(--ensemble-h1-size, 2.5rem); }
.et-content h2 { font-size: var(--ensemble-h2-size, 2rem); }
.et-content h3 { font-size: var(--ensemble-h3-size, 1.5rem); }
.et-content h4 { font-size: var(--ensemble-h4-size, 1.25rem); }
.et-content h5 { font-size: 1.1rem; }
.et-content h6 { font-size: 1rem; }

.et-content p,
.et-page-content p,
.et-single-content p {
    margin: 0 0 1em;
}

/* Links - only in theme containers */
.et-content a,
.et-page-content a,
.et-single-content a {
    color: var(--ensemble-primary, #2563eb);
    text-decoration: none;
    transition: color 0.15s ease;
}

.et-content a:hover,
.et-page-content a:hover,
.et-single-content a:hover {
    color: var(--ensemble-hover, #1d4ed8);
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */

.et-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.et-site-main {
    flex: 1 0 auto;
}

.et-site-header,
.et-site-footer {
    flex-shrink: 0;
}

/* Containers */
.et-container {
    width: 100%;
    max-width: var(--et-container-width);
    margin: 0 auto;
    padding: 0 var(--et-space-md);
}

.et-container--narrow {
    max-width: var(--et-container-narrow);
}

.et-container--wide {
    max-width: var(--et-container-wide);
}

.et-container--full {
    max-width: 100%;
    padding: 0;
}

/* Content wrapper */
.et-content {
    background: var(--ensemble-card-bg, #ffffff);
    border-radius: var(--ensemble-card-radius, 12px);
    padding: var(--et-space-lg);
    margin: var(--et-space-lg) 0;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--ensemble-primary, #2563eb);
    outline-offset: 2px;
}

/* ============================================
   BUTTONS - Theme elements only
   Ensemble layouts have their own button styles
   ============================================ */

/* Theme-specific buttons - only in theme containers */
.et-button,
.et-content button,
.et-content input[type="submit"],
.et-content input[type="button"],
.et-page-content button,
.et-page-content input[type="submit"],
.et-single-content button,
.et-single-content input[type="submit"],
.et-page-content .wp-block-button__link,
.et-single-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: var(--ensemble-button-padding-v, 12px) var(--ensemble-button-padding-h, 24px);
    font-family: inherit;
    font-size: var(--ensemble-body-size, 1rem);
    font-weight: var(--ensemble-button-weight, 500);
    line-height: 1;
    color: var(--ensemble-button-text, #ffffff);
    background: var(--ensemble-button-bg, #1a1a1a);
    border: none;
    border-radius: var(--ensemble-button-radius, 8px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.et-button:hover,
.et-content button:hover,
.et-content input[type="submit"]:hover,
.et-content input[type="button"]:hover,
.et-page-content button:hover,
.et-page-content input[type="submit"]:hover,
.et-single-content button:hover,
.et-single-content input[type="submit"]:hover,
.et-page-content .wp-block-button__link:hover,
.et-single-content .wp-block-button__link:hover {
    background: var(--ensemble-button-hover-bg, #000);
    color: var(--ensemble-button-hover-text, #fff);
    transform: translateY(-1px);
    box-shadow: var(--et-shadow-md);
}

/* ============================================
   FORMS - Theme elements only
   ============================================ */

/* Only style forms in theme containers */
.et-content input[type="text"],
.et-content input[type="email"],
.et-content input[type="url"],
.et-content input[type="password"],
.et-content input[type="search"],
.et-content input[type="number"],
.et-content input[type="tel"],
.et-content input[type="date"],
.et-content textarea,
.et-content select,
.et-form input[type="text"],
.et-form input[type="email"],
.et-form input[type="url"],
.et-form input[type="password"],
.et-form input[type="search"],
.et-form input[type="number"],
.et-form input[type="tel"],
.et-form input[type="date"],
.et-form textarea,
.et-form select {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ensemble-text, #1a1a1a);
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e0e0e0);
    border-radius: var(--ensemble-button-radius, 8px);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.et-content input:focus,
.et-content textarea:focus,
.et-content select:focus,
.et-form input:focus,
.et-form textarea:focus,
.et-form select:focus {
    outline: none;
    border-color: var(--ensemble-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.et-content label,
.et-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --et-container-width: 100%;
    }
    
    .et-container {
        padding: 0 var(--et-space-md);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .et-content {
        padding: var(--et-space-md);
    }
}

@media (max-width: 480px) {
    .et-container {
        padding: 0 var(--et-space-sm);
    }
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

.et-single-hero {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.et-single-hero img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.et-single-header {
    margin-bottom: 2rem;
}

.et-single-title {
    font-size: 2.5rem;
    margin: 0.5rem 0;
}

.et-single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--ensemble-text-secondary, #6b7280);
}

.et-single-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.et-single-content p {
    margin-bottom: 1.5rem;
}

.et-single-content h2 {
    margin-top: 2rem;
}

.et-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.et-single-content blockquote {
    border-left: 4px solid var(--ensemble-primary, #2563eb);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--ensemble-text-secondary, #6b7280);
}

.et-single-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ensemble-card-border, #e5e7eb);
}

.et-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.et-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--ensemble-card-bg, #f3f4f6);
    border: 1px solid var(--ensemble-card-border, #e5e7eb);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--ensemble-text-secondary, #6b7280);
    text-decoration: none;
    transition: all var(--et-transition-fast);
}

.et-tag:hover {
    background: var(--ensemble-primary, #2563eb);
    border-color: var(--ensemble-primary, #2563eb);
    color: #ffffff;
}

/* Post Navigation */
.et-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.et-post-navigation .nav-previous,
.et-post-navigation .nav-next {
    padding: 1.5rem;
    background: var(--ensemble-card-bg, #f8f9fa);
    border-radius: 8px;
}

.et-post-navigation .nav-next {
    text-align: right;
}

.et-post-navigation .et-nav-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ensemble-text-secondary, #6b7280);
    margin-bottom: 0.5rem;
}

.et-post-navigation .et-nav-title {
    font-weight: 600;
    color: var(--ensemble-text, #1a1a1a);
}

/* ============================================
   PAGE STYLES
   ============================================ */

.et-page-header {
    margin-bottom: 2rem;
    padding: 2rem 24px 0;
}

/* Content width variations for page header */
.et-content-wide .et-page-header {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.et-content-boxed .et-page-header {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.et-content-narrow .et-page-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.et-content-full .et-page-header {
    max-width: none;
}

.et-page-title {
    font-size: 2.5rem;
    margin: 0;
}

.et-page-content {
    font-size: 1.05rem;
    line-height: 1.7;
    padding-top: 1rem;
}

/* ============================================
   404 STYLES
   ============================================ */

.et-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.et-404-code {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--ensemble-card-border, #e5e7eb);
    margin-bottom: 1rem;
}

.et-404-title {
    font-size: 2rem;
    margin: 0 0 1rem;
}

.et-404-text {
    color: var(--ensemble-text-secondary, #6b7280);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.et-404-search {
    margin-top: 2rem;
}

.et-404-search p {
    margin-bottom: 1rem;
    color: var(--ensemble-text-secondary, #6b7280);
}

/* ============================================
   SEARCH STYLES
   ============================================ */

.et-search-header {
    margin-bottom: 2rem;
}

.et-search-title {
    font-size: 2rem;
    margin: 0 0 1rem;
}

.et-search-title span {
    color: var(--ensemble-primary, #2563eb);
}

.et-search-form-wrap {
    max-width: 500px;
}

.et-search-count {
    color: var(--ensemble-text-secondary, #6b7280);
    margin-bottom: 2rem;
}

/* ============================================
   HERO STYLES
   ============================================ */

.et-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
}

.et-hero__media {
    position: absolute;
    inset: 0;
}

.et-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.et-hero__overlay {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 400px;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    color: #ffffff;
}

.et-hero__content {
    max-width: 700px;
    padding: 4rem 0;
}

.et-hero__title {
    font-size: 3rem;
    margin: 0 0 1rem;
    color: #ffffff;
}

.et-hero__subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0;
}

@media (max-width: 768px) {
    .et-hero__title {
        font-size: 2rem;
    }
    
    .et-single-title,
    .et-page-title {
        font-size: 2rem;
    }
    
    .et-post-navigation {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ENSEMBLE LAYOUT COMPATIBILITY
   Theme steps back when Ensemble layouts are active.
   Layouts bring their own styles - theme only sets
   body-level backgrounds.
   ============================================ */

/* Lovepop Layout - Dark background */
body:has(.es-lovepop-layout),
body:has(.es-lovepop-single),
body:has(.es-lovepop-event),
body:has(.es-layout-lovepop),
body.et-layout-lovepop {
    background: var(--ensemble-dark-bg, linear-gradient(180deg, #0a0a0f 0%, #12121c 50%, #0f0f18 100%));
}

/* Pure Layout - Adapts to mode */
body:has(.es-layout-pure),
body:has(.es-pure-single-event),
body.et-layout-pure {
    background: var(--ensemble-bg, #ffffff);
}

body.es-mode-dark:has(.es-layout-pure),
body.es-mode-dark:has(.es-pure-single-event),
body.et-layout-pure.es-mode-dark {
    background: var(--ensemble-bg-dark, #0a0a0a);
}

/* Stage Layout */
body:has(.es-layout-stage),
body.et-layout-stage {
    background: var(--ensemble-bg, #f8f8f8);
}

/* Classic Layout */
body:has(.es-layout-classic),
body.et-layout-classic {
    background: var(--ensemble-bg, #f8f9fa);
}

/* Magazine Layout */
body:has(.es-layout-magazine),
body.et-layout-magazine {
    background: var(--ensemble-bg, #ffffff);
}

/* ============================================
   DO NOT STYLE .es-* ELEMENTS
   Ensemble layouts control their own:
   - Typography (h1-h6, p, span, li)
   - Buttons
   - Forms
   - Cards
   - Colors
   ============================================ */
/* ============================================
   ENHANCED FORM STYLES
   Adapts to all layouts
   ============================================ */

.et-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.et-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.et-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.et-form-group label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ensemble-text-muted, #666666);
}

.et-form-group input,
.et-form-group select,
.et-form-group textarea {
    width: 100%;
}

.et-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.et-form-submit {
    margin-top: 12px;
}

/* Checkbox / Radio */
.et-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.et-form-check input[type="checkbox"],
.et-form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--ensemble-primary, #111111);
}

.et-form-check label {
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ensemble-text, #111111);
    margin-bottom: 0;
}

/* Form success/error */
.et-form-message {
    padding: 16px;
    border: 1px solid;
    font-size: 14px;
}

.et-form-message--success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #15803d;
}

.et-form-message--error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

/* Dark mode forms */
.es-mode-dark .et-form-group label {
    color: var(--ensemble-text-muted-dark, #666666);
}

.es-mode-dark .et-form-check label {
    color: var(--ensemble-text-dark, #f5f5f5);
}

/* ============================================
   SVG LOGO ADAPTATION
   Inherits text color for monochrome SVGs
   ============================================ */

.et-logo-svg {
    fill: currentColor;
    max-height: 50px;
    width: auto;
}

.et-logo-svg path,
.et-logo-svg polygon,
.et-logo-svg rect,
.et-logo-svg circle {
    fill: inherit;
}

/* Light mode logo */
.et-logo-svg {
    color: var(--ensemble-text, #111111);
}

/* Dark mode logo */
.es-mode-dark .et-logo-svg,
.et-mode-dark .et-logo-svg {
    color: var(--ensemble-text-dark, #f5f5f5);
}

/* Transparent header logo (always white) */
.et-header-transparent .et-logo-svg {
    color: #ffffff;
}

/* ============================================
   COMMENTS - ADAPTIVE
   ============================================ */

.et-comments {
    margin-top: var(--et-section-spacing, 64px);
    padding-top: var(--et-section-spacing, 64px);
    border-top: 1px solid var(--ensemble-card-border, #e8e8e8);
}

.et-comments-title {
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.et-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.et-comment {
    padding: 24px 0;
    border-bottom: 1px solid var(--ensemble-card-border, #e8e8e8);
}

.et-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.et-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.et-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.et-comment-author {
    font-weight: 500;
}

.et-comment-date {
    font-size: 13px;
    color: var(--ensemble-text-muted, #666666);
}

.et-comment-content {
    font-size: 15px;
    line-height: 1.6;
}

.es-mode-dark .et-comments {
    border-top-color: var(--ensemble-card-border-dark, #222222);
}

.es-mode-dark .et-comment {
    border-bottom-color: var(--ensemble-card-border-dark, #222222);
}

.es-mode-dark .et-comment-date {
    color: var(--ensemble-text-muted-dark, #666666);
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.et-breadcrumbs {
    padding: 16px 0;
    font-size: 14px;
}

.et-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.et-breadcrumbs__item {
    display: flex;
    align-items: center;
}

.et-breadcrumbs__link {
    color: var(--ensemble-text-muted, #666666);
    text-decoration: none;
    transition: color var(--et-transition-fast);
}

.et-breadcrumbs__link:hover {
    color: var(--ensemble-primary, #0066cc);
}

.et-breadcrumbs__separator {
    display: flex;
    align-items: center;
    color: var(--ensemble-text-muted, #666666);
    opacity: 0.5;
}

.et-breadcrumbs__item--current span {
    color: var(--ensemble-text, #1a1a1a);
    font-weight: 500;
}

.es-mode-dark .et-breadcrumbs__link {
    color: var(--ensemble-text-muted-dark, #888888);
}

.es-mode-dark .et-breadcrumbs__link:hover {
    color: var(--ensemble-primary-dark, #4da3ff);
}

.es-mode-dark .et-breadcrumbs__item--current span {
    color: var(--ensemble-text-dark, #f5f5f5);
}

/* ============================================
   SHARE BUTTONS
   ============================================ */

.et-share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.et-share-buttons__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ensemble-text-muted, #666666);
}

.et-share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--ensemble-text, #1a1a1a);
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e8e8e8);
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--et-transition-fast);
}

.et-share-button:hover {
    color: #ffffff;
    border-color: transparent;
}

.et-share-button--twitter:hover {
    background: #1da1f2;
}

.et-share-button--facebook:hover {
    background: #1877f2;
}

.et-share-button--linkedin:hover {
    background: #0a66c2;
}

.et-share-button--email:hover {
    background: var(--ensemble-primary, #0066cc);
}

.es-mode-dark .et-share-buttons__label {
    color: var(--ensemble-text-muted-dark, #888888);
}

.es-mode-dark .et-share-button {
    color: var(--ensemble-text-dark, #f5f5f5);
    background: var(--ensemble-card-bg-dark, #111111);
    border-color: var(--ensemble-card-border-dark, #222222);
}

/* ============================================
   BACK TO TOP
   ============================================ */

.et-back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ensemble-text, #1a1a1a);
    background: var(--ensemble-card-bg, #ffffff);
    border: 1px solid var(--ensemble-card-border, #e8e8e8);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--et-transition-normal);
    z-index: var(--et-z-sticky);
    box-shadow: var(--et-shadow-md);
}

.et-back-to-top:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.et-back-to-top:hover {
    color: #ffffff;
    background: var(--ensemble-primary, #0066cc);
    border-color: var(--ensemble-primary, #0066cc);
    transform: translateY(-4px);
}

.es-mode-dark .et-back-to-top {
    color: var(--ensemble-text-dark, #f5f5f5);
    background: var(--ensemble-card-bg-dark, #111111);
    border-color: var(--ensemble-card-border-dark, #222222);
}

/* ============================================
   RELATED POSTS (Extra Styles)
   ============================================ */

.et-related-post {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.et-related-post__image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--ensemble-radius, 8px);
}

.et-related-post__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--et-transition-normal);
}

.et-related-post__image:hover img {
    transform: scale(1.05);
}

.et-related-post__title {
    font-family: var(--ensemble-font-heading, inherit);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.et-related-post__title a {
    color: var(--ensemble-text, #1a1a1a);
    text-decoration: none;
    transition: color var(--et-transition-fast);
}

.et-related-post__title a:hover {
    color: var(--ensemble-primary, #0066cc);
}

.et-related-post__date {
    font-size: 13px;
    color: var(--ensemble-text-muted, #666666);
}

.es-mode-dark .et-related-post__title a {
    color: var(--ensemble-text-dark, #f5f5f5);
}

.es-mode-dark .et-related-post__title a:hover {
    color: var(--ensemble-primary-dark, #4da3ff);
}

.es-mode-dark .et-related-post__date {
    color: var(--ensemble-text-muted-dark, #888888);
}
