/**
 * Shared Styles für alle Shortcodes
 * Einheitliche Typografie, Abstände und Elemente
 */

/* ========================================
   CSS Custom Properties (Variablen)
   ======================================== */
:root {
    /* Schriftgrößen - Desktop */
    --shortcode-title-large: 1.35rem;
    --shortcode-title-small: 1rem;
    --shortcode-excerpt: 0.95rem;
    --shortcode-label: 15px;
    --shortcode-badge: 12px;
    --shortcode-badge-small: 10px;
    --shortcode-tabs: 13px;

    /* Schriftgrößen - Tablet (1200px) */
    --shortcode-title-large-tablet: 1.25rem;
    --shortcode-title-small-tablet: 0.95rem;
    --shortcode-excerpt-tablet: 0.9rem;
    --shortcode-tabs-tablet: 12px;

    /* Schriftgrößen - Mobile Landscape (768px) */
    --shortcode-title-large-mobile-l: 1.3rem;
    --shortcode-title-small-mobile-l: 1.05rem;
    --shortcode-excerpt-mobile-l: 0.9rem;
    --shortcode-label-mobile-l: 13px;
    --shortcode-tabs-mobile-l: 11px;

    /* Schriftgrößen - Mobile Portrait (480px) */
    --shortcode-title-large-mobile-p: 1.15rem;
    --shortcode-title-small-mobile-p: 0.95rem;
    --shortcode-excerpt-mobile-p: 0.85rem;
    --shortcode-label-mobile-p: 11px;
    --shortcode-badge-mobile-p: 10px;
    --shortcode-badge-small-mobile-p: 9px;

    /* Line Heights */
    --shortcode-line-height-tight: 1.3;
    --shortcode-line-height-normal: 1.4;
    --shortcode-line-height-relaxed: 1.6;

    /* Abstände - Desktop */
    --shortcode-section-margin: 40px;
    --shortcode-grid-gap: 30px;
    --shortcode-grid-gap-small: 26px;
    --shortcode-header-bottom: 24px;
    --shortcode-thumb-bottom: 14px;
    --shortcode-title-bottom: 12px;

    /* Abstände - Tablet */
    --shortcode-grid-gap-tablet: 24px;
    --shortcode-grid-gap-small-tablet: 20px;

    /* Abstände - Mobile */
    --shortcode-section-margin-mobile: 20px;
    --shortcode-grid-gap-mobile: 20px;
    --shortcode-grid-gap-small-mobile: 16px;
    --shortcode-header-bottom-mobile: 16px;

    /* Padding */
    --shortcode-label-padding: 7px 16px;
    --shortcode-label-padding-mobile: 6px 12px;
    --shortcode-badge-padding: 4px 10px;
    --shortcode-badge-padding-small: 3px 8px;
    --shortcode-badge-padding-mobile: 3px 8px;
    --shortcode-badge-padding-mobile-small: 2px 6px;

    /* Badge Positions */
    --shortcode-badge-top: 16px;
    --shortcode-badge-left: 16px;
    --shortcode-badge-gap: 6px;
    --shortcode-badge-top-small: 8px;
    --shortcode-badge-left-small: 8px;
    --shortcode-badge-top-mobile: 12px;
    --shortcode-badge-left-mobile: 12px;

    /* Thumbnail Aspect Ratios - 16:9 Format */
    --shortcode-thumb-ratio: 56.25%;
    --shortcode-thumb-ratio-mobile: 56.25%;
    --shortcode-thumb-small-ratio: 56.25%;
    --shortcode-thumb-small-ratio-mobile: 56.25%;

    /* Farben */
    --shortcode-border-color: #000;
    --shortcode-text-primary: #000;
    --shortcode-text-secondary: #555;
    --shortcode-bg-white: #fff;

    /* Letter Spacing */
    --shortcode-letter-spacing: 0.08em;
    --shortcode-badge-letter-spacing: 0.5px;
}

/* ========================================
   Gemeinsame Basis-Styles
   ======================================== */

/* Section Container */
.ak-section,
.bl-section,
.bk-section {
    margin: var(--shortcode-section-margin) 0;
    font-family: inherit;
}

/* Header mit Border und Label */
.ak-header,
.bl-header,
.bk-header {
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: var(--shortcode-header-bottom);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid var(--shortcode-border-color);
}

/* Label (Badge oben links) */
.ak-label,
.bl-label,
.bk-label {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--shortcode-label);
    letter-spacing: var(--shortcode-letter-spacing);
    padding: var(--shortcode-label-padding);
    background: var(--theme-palette-color-2);
    color: var(--shortcode-text-primary);
}

/* Tabs Navigation */
.ak-tabs,
.bl-tabs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ak-tabs li,
.bl-tabs li {
    display: inline-block;
    margin-left: 18px;
}

.ak-tabs li:first-child,
.bl-tabs li:first-child {
    margin-left: 0;
}

.ak-tabs a,
.bl-tabs a {
    text-decoration: none;
    font-size: var(--shortcode-tabs);
    text-transform: uppercase;
    letter-spacing: var(--shortcode-letter-spacing);
    font-weight: 600;
    color: var(--shortcode-text-secondary);
}

.ak-tabs li.active a,
.ak-tabs a:hover,
.bl-tabs li.active a,
.bl-tabs a:hover {
    color: var(--shortcode-text-primary);
}

/* Mobile Dropdown Styles */
.ak-mobile-dropdown,
.bl-mobile-dropdown {
    display: none;
}

.ak-category-select,
.bl-category-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    font-size: var(--shortcode-tabs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--shortcode-letter-spacing);
    color: var(--shortcode-text-primary);
    background-color: var(--shortcode-bg-white);
    border: 1px solid var(--shortcode-border-color);
    border-radius: 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.ak-category-select:focus,
.bl-category-select:focus {
    outline: 1px solid var(--shortcode-border-color);
    outline-offset: 2px;
}

/* Category Badges auf Thumbnails */
.ak-category-badges,
.bl-category-badges,
.bk-category-badges {
    position: absolute;
    top: var(--shortcode-badge-top);
    left: var(--shortcode-badge-left);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: var(--shortcode-badge-gap);
}

.ak-category-badge,
.bl-category-badge,
.bk-category-badge {
    padding: var(--shortcode-badge-padding);
    font-size: var(--shortcode-badge);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0;
    background: var(--theme-palette-color-2);
    color: var(--shortcode-text-primary);
    border: none;
    letter-spacing: var(--shortcode-badge-letter-spacing);
    display: inline-block;
}

.ak-category-badges--small,
.bl-category-badges--small,
.bk-category-badges--small {
    top: var(--shortcode-badge-top-small);
    left: var(--shortcode-badge-left-small);
}

.ak-category-badges--small .ak-category-badge,
.bl-category-badges--small .bl-category-badge,
.bk-category-badges--small .bk-category-badge {
    padding: var(--shortcode-badge-padding-small);
    font-size: var(--shortcode-badge-small);
}

/* Thumbnail Links */
.ak-thumb-link,
.bl-thumb-link,
.bk-thumb-link,
.ak-thumb-link-small,
.bl-thumb-link-small,
.bk-thumb-link-small {
    display: block;
    position: relative;
}

/* Große Thumbnails */
.ak-thumb,
.bl-thumb,
.bk-thumb {
    width: 100%;
    padding-top: var(--shortcode-thumb-ratio);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Kleine Thumbnails */
.ak-thumb-small,
.bl-thumb-small,
.bk-thumb-small {
    width: 100%;
    padding-top: var(--shortcode-thumb-small-ratio);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Große Titel */
.ak-title-large,
.bl-title-large,
.bk-title-large {
    font-size: var(--shortcode-title-large);
    line-height: var(--shortcode-line-height-tight);
    margin: 0 0 var(--shortcode-title-bottom);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(var(--shortcode-title-large) * var(--shortcode-line-height-tight) * 2);
}

.ak-title-large a,
.bl-title-large a,
.bk-title-large a {
    text-decoration: none;
    color: inherit;
}

.ak-title-large a:hover,
.bl-title-large a:hover,
.bk-title-large a:hover {
    text-decoration: underline;
}

/* Kleine Titel */
.ak-title-small,
.bl-title-small,
.bk-title-small {
    font-size: var(--shortcode-title-small);
    line-height: var(--shortcode-line-height-normal);
    margin: 0;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ak-title-small a,
.bl-title-small a,
.bk-title-small a {
    text-decoration: none;
    color: inherit;
}

.ak-title-small a:hover,
.bl-title-small a:hover,
.bk-title-small a:hover {
    text-decoration: underline;
}

/* Excerpt Text */
.ak-excerpt,
.bl-excerpt,
.bk-excerpt {
    font-size: var(--shortcode-excerpt);
    line-height: var(--shortcode-line-height-relaxed);
    color: var(--shortcode-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(var(--shortcode-excerpt) * var(--shortcode-line-height-relaxed) * 3);
}

/* ========================================
   Responsive Anpassungen - Gemeinsam
   ======================================== */

/* iPad Pro und größere Tablets (1200px) */
@media (max-width: 1200px) {
    .ak-title-large,
    .bl-title-large,
    .bk-title-large {
        font-size: var(--shortcode-title-large-tablet);
    }

    .ak-title-small,
    .bl-title-small,
    .bk-title-small {
        font-size: var(--shortcode-title-small-tablet);
    }

    .ak-excerpt,
    .bl-excerpt,
    .bk-excerpt {
        font-size: var(--shortcode-excerpt-tablet);
    }

    .ak-tabs a,
    .bl-tabs a {
        font-size: var(--shortcode-tabs-tablet);
    }
}

/* Mobile Landscape (768px) */
@media (max-width: 768px) {
    .ak-section,
    .bl-section,
    .bk-section {
        margin: 30px 0;
    }

    .ak-header,
    .bl-header,
    .bk-header {
        flex-direction: row;
        align-items: center;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 12px;
        margin-bottom: 20px;
    }

    .ak-label,
    .bl-label,
    .bk-label {
        font-size: var(--shortcode-label-mobile-l);
        padding: var(--shortcode-label-padding-mobile);
    }

    .ak-header-right,
    .bl-header-right {
        text-align: right;
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }

    /* Desktop Tabs verstecken */
    .ak-tabs-desktop,
    .bl-tabs-desktop {
        display: none;
    }

    /* Mobile Dropdown zeigen */
    .ak-mobile-dropdown,
    .bl-mobile-dropdown {
        display: block;
        flex: 1;
        max-width: 200px;
    }

    .ak-category-select,
    .bl-category-select {
        font-size: 11px;
        padding: 6px 24px 6px 8px;
        border: 1px solid var(--shortcode-border-color);
    }

    .ak-title-large,
    .bl-title-large,
    .bk-title-large {
        font-size: var(--shortcode-title-large-mobile-l);
        margin-bottom: 10px;
    }

    .ak-title-small,
    .bl-title-small,
    .bk-title-small {
        font-size: var(--shortcode-title-small-mobile-l);
    }

    .ak-excerpt,
    .bl-excerpt,
    .bk-excerpt {
        font-size: var(--shortcode-excerpt-mobile-l);
        line-height: 1.5;
    }

    .ak-thumb,
    .bl-thumb,
    .bk-thumb {
        padding-top: var(--shortcode-thumb-ratio-mobile);
    }
}

/* Mobile Portrait (480px) */
@media (max-width: 480px) {
    .ak-section,
    .bl-section,
    .bk-section {
        margin: var(--shortcode-section-margin-mobile) 0;
    }

    .ak-header,
    .bl-header,
    .bk-header {
        margin-bottom: var(--shortcode-header-bottom-mobile);
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .ak-label,
    .bl-label,
    .bk-label {
        font-size: var(--shortcode-label-mobile-p);
        padding: var(--shortcode-label-padding-mobile);
    }

    .ak-category-select,
    .bl-category-select {
        font-size: 11px;
        padding: 7px 26px 7px 9px;
        background-position: right 10px center;
        background-size: 10px;
    }

    .ak-category-badges,
    .bl-category-badges,
    .bk-category-badges {
        top: var(--shortcode-badge-top-mobile);
        left: var(--shortcode-badge-left-mobile);
        gap: 4px;
    }

    .ak-category-badge,
    .bl-category-badge,
    .bk-category-badge {
        padding: var(--shortcode-badge-padding-mobile);
        font-size: var(--shortcode-badge-mobile-p);
    }

    .ak-category-badges--small,
    .bl-category-badges--small,
    .bk-category-badges--small {
        top: 6px;
        left: 6px;
    }

    .ak-category-badges--small .ak-category-badge,
    .bl-category-badges--small .bl-category-badge,
    .bk-category-badges--small .bk-category-badge {
        padding: var(--shortcode-badge-padding-mobile-small);
        font-size: var(--shortcode-badge-small-mobile-p);
    }

    .ak-title-large,
    .bl-title-large,
    .bk-title-large {
        font-size: var(--shortcode-title-large-mobile-p);
        margin-bottom: 8px;
        min-height: calc(var(--shortcode-title-large-mobile-p) * var(--shortcode-line-height-tight) * 2);
    }

    .ak-title-small,
    .bl-title-small,
    .bk-title-small {
        font-size: var(--shortcode-title-small-mobile-p);
        line-height: 1.35;
        -webkit-line-clamp: 4;
    }

    .ak-excerpt,
    .bl-excerpt,
    .bk-excerpt {
        font-size: var(--shortcode-excerpt-mobile-p);
        -webkit-line-clamp: 2;
        height: calc(var(--shortcode-excerpt-mobile-p) * 1.5 * 2);
    }

    .ak-thumb-small,
    .bl-thumb-small,
    .bk-thumb-small {
        padding-top: var(--shortcode-thumb-small-ratio-mobile);
    }
}

/* Extra kleine Mobile-Geräte (360px) */
@media (max-width: 360px) {
    .ak-title-large,
    .bl-title-large,
    .bk-title-large {
        font-size: 1.1rem;
    }

    .ak-title-small,
    .bl-title-small,
    .bk-title-small {
        font-size: 0.95rem;
    }
}

