/**
 * HumusZiegel Content Enhancements Styles
 *
 * - Table of Contents
 * - Reading Time
 * - Related Posts
 * - Breadcrumbs
 */

/* =========================================================================
   TABLE OF CONTENTS
   ========================================================================= */
.hz-toc {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f3ef 100%);
    border: 1px solid rgba(166, 124, 82, 0.15);
    border-radius: 16px;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.hz-toc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: rgba(166, 124, 82, 0.08);
    border-bottom: 1px solid rgba(166, 124, 82, 0.1);
    cursor: pointer;
}

.hz-toc-icon {
    width: 20px;
    height: 20px;
    color: #A67C52;
    flex-shrink: 0;
}

.hz-toc-icon svg {
    width: 100%;
    height: 100%;
}

.hz-toc-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1c1917;
    flex: 1;
}

.hz-toc-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #57534e;
    transition: transform 0.3s ease;
}

.hz-toc-toggle[aria-expanded="false"] .hz-toc-chevron {
    transform: rotate(-90deg);
}

.hz-toc-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.hz-toc-list {
    list-style: none;
    margin: 0;
    padding: 20px 24px;
    counter-reset: toc-counter;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
}

.hz-toc-list.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

.hz-toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0;
    padding: 0;
}

.hz-toc-list li:last-child {
    margin-bottom: 0;
}

.hz-toc-list .toc-link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
    margin: 4px 0;
    border-radius: 8px;
    text-decoration: none;
    color: #57534e;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.hz-toc-list .toc-link::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #A67C52;
    opacity: 0.6;
    flex-shrink: 0;
}

.hz-toc-list .toc-link:hover {
    background: rgba(166, 124, 82, 0.1);
    color: #1c1917;
}

.hz-toc-list .toc-link:hover::before {
    opacity: 1;
}

.hz-toc-list .toc-link.active {
    background: #A67C52;
    color: white;
}

.hz-toc-list .toc-link.active::before {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

/* Nested items (h3) */
.hz-toc-list li.ml-4 .toc-link {
    padding-left: 28px;
    font-size: 13px;
}

/* =========================================================================
   READING TIME
   ========================================================================= */
.hz-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #57534e;
    padding: 6px 12px;
    background: rgba(166, 124, 82, 0.08);
    border-radius: 20px;
    cursor: default;
}

.hz-reading-time svg {
    width: 14px;
    height: 14px;
    color: #A67C52;
}

/* =========================================================================
   RELATED POSTS
   ========================================================================= */
.hz-related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e5e5;
}

.hz-related-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hz-related-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #A67C52;
    margin-bottom: 8px;
}

.hz-related-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    color: #1c1917;
    margin: 0;
}

.hz-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .hz-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hz-related-grid {
        grid-template-columns: 1fr;
    }
}

.hz-related-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hz-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.hz-related-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hz-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hz-related-card:hover .hz-related-image img {
    transform: scale(1.05);
}

.hz-related-content {
    padding: 1.5rem;
}

.hz-related-category {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A67C52;
    background: rgba(166, 124, 82, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.hz-related-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px;
}

.hz-related-card-title a {
    color: #1c1917;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hz-related-card-title a:hover {
    color: #A67C52;
}

.hz-related-meta {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #78716c;
}

/* =========================================================================
   BREADCRUMBS
   ========================================================================= */
.hz-breadcrumbs {
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.hz-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hz-breadcrumb-item {
    display: flex;
    align-items: center;
}

.hz-breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #78716c;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hz-breadcrumb-item a:hover {
    color: #A67C52;
    background: rgba(166, 124, 82, 0.08);
}

.hz-breadcrumb-icon {
    display: flex;
    align-items: center;
}

.hz-breadcrumb-icon svg {
    width: 14px;
    height: 14px;
}

.hz-breadcrumb-current {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1c1917;
    padding: 6px 10px;
}

.hz-breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #d4d4d4;
    padding: 0 4px;
}

.hz-breadcrumb-separator svg {
    width: 14px;
    height: 14px;
}

/* =========================================================================
   SCROLL SPY FOR TOC
   ========================================================================= */
.scroll-mt-24 {
    scroll-margin-top: 6rem;
}

/* =========================================================================
   TOC TOGGLE SCRIPT SUPPORT
   ========================================================================= */
@media (max-width: 768px) {
    .hz-toc-list {
        max-height: 300px;
    }

    .hz-related-title {
        font-size: 1.5rem;
    }
}

/* Sticky TOC for desktop */
@media (min-width: 1280px) {
    .hz-toc-sticky {
        position: sticky;
        top: 100px;
    }
}

/* =========================================================================
   BLOG CONTENT VISUAL ENHANCEMENTS
   ========================================================================= */

/* Info Box / Tipp Box */
.hz-info-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-left: 4px solid #22c55e;
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hz-info-box::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
}

.hz-info-box .hz-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #15803d;
    margin-bottom: 8px;
}

.hz-info-box p {
    color: #166534;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Warning Box */
.hz-warning-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    position: relative;
}

.hz-warning-box .hz-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b45309;
    margin-bottom: 8px;
}

.hz-warning-box p {
    color: #92400e;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Fazit / Summary Box */
.hz-fazit-box {
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hz-fazit-box::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(166, 124, 82, 0.2);
    border-radius: 50%;
    filter: blur(20px);
}

.hz-fazit-box .hz-box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #A67C52;
    margin-bottom: 12px;
    position: relative;
}

.hz-fazit-box p,
.hz-fazit-box li {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
}

.hz-fazit-box a {
    color: #A67C52;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hz-fazit-box a:hover {
    color: #c99f6e;
}

/* Highlight / Feature Box */
.hz-highlight-box {
    background: linear-gradient(135deg, #faf5ef 0%, #f5ede3 100%);
    border: 1px solid rgba(166, 124, 82, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.hz-highlight-box .hz-box-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A67C52;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checklist Style */
.hz-checklist {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.hz-checklist li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hz-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Numbered Steps */
.hz-steps {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    counter-reset: step-counter;
}

.hz-steps li {
    position: relative;
    padding-left: 56px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f5f5f4;
    counter-increment: step-counter;
}

.hz-steps li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.hz-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1c1917 0%, #44403c 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

/* Comparison Table Style */
.hz-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hz-comparison th {
    background: #1c1917;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 14px 20px;
    text-align: left;
}

.hz-comparison td {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f4;
    font-size: 0.9rem;
}

.hz-comparison tr:nth-child(even) td {
    background: #fafaf9;
}

.hz-comparison tr:last-child td {
    border-bottom: none;
}

/* Stat / Number Highlight */
.hz-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #faf5ef 0%, #f5ede3 100%);
    border: 1px solid rgba(166, 124, 82, 0.15);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 120px;
}

.hz-stat .hz-stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #A67C52;
    line-height: 1;
    margin-bottom: 4px;
}

.hz-stat .hz-stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #78716c;
}

/* Stats Grid */
.hz-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* CTA Box within Content */
.hz-content-cta {
    background: linear-gradient(135deg, #4a5d44 0%, #2D3A28 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hz-content-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.03);
    transform: rotate(20deg);
}

.hz-content-cta h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
    position: relative;
}

.hz-content-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    position: relative;
}

.hz-content-cta .hz-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #A67C52;
    color: white;
    padding: 12px 28px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.hz-content-cta .hz-cta-btn:hover {
    background: #c99f6e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(166, 124, 82, 0.4);
}

/* Quote / Blockquote Enhancement */
.hz-quote {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f3ef 100%);
    border-left: 4px solid #A67C52;
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: #1c1917;
    line-height: 1.6;
    position: relative;
}

.hz-quote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 4rem;
    color: rgba(166, 124, 82, 0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .hz-fazit-box,
    .hz-highlight-box,
    .hz-content-cta {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .hz-info-box,
    .hz-warning-box {
        padding: 1.25rem 1.5rem;
    }

    .hz-steps li {
        padding-left: 48px;
    }

    .hz-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
