/* =========================
   THEME TWEAKS
========================= */

/* Header padding with responsive clamp */
.site-header {
    padding-inline: clamp(1rem, 0.848rem + 0.758vw, 1.5rem);
}

/* Typography wrapping */
/* Balance headings and elements with `.balance` class */
:is(h1, h2, h3, h4, h5, h6),
.balance {
    text-wrap: balance;
}

/* Use pretty wrapping for body text elements */
p,
blockquote,
li {
    text-wrap: pretty;
}

/* Remove bottom margin from final paragraph */
p:last-child:last-of-type {
    margin-bottom: 0px;
}


/* =========================
   UTILITIES
========================= */

/* Line Clamping */
.line-limit-3,
.line-limit-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-limit-3 {
    -webkit-line-clamp: 3;
}

.line-limit-2 {
    -webkit-line-clamp: 2;
}

/* Visually Hidden (accessible to screen readers) */
.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Smooth Transition Utility */
.transition {
    transition: all 0.25s ease-in-out;
}


/* =========================
   GP MENU ACCESSIBILITY TWEAKS
========================= */

#site-navigation ul.sub-menu {
    display: block;
}

#site-navigation li:hover .gp-icon svg {
    transform: rotate(180deg);
}

#site-navigation li:hover .sub-menu {
    visibility: visible;
}


/* =========================
   STRETCH LINK (from Bootstrap)
   Source: https://youtu.be/HBriBrnRlQE?si=DLiSXEiBHt6lw91l
   Note: Only use ONE link per card or this breaks!
========================= */

.stretch-link {
    position: relative;
}

.stretch-link a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.stretch-link a:is(:focus-visible)::after {
    outline: 2px solid;
}

.stretch-link a:is(:hover, :focus) {
    outline: none;
}


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

.site-wrapper {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    background: var(--neutral-50);
}


/* =========================
   SERVICE CARD ICONS
========================= */

.service-icon {
    margin: 0 0 16px 0;
}

.service-icon img {
    width: 80px;
    height: 80px;
    display: block;
}

/* ==================================================
   INHALTSVERZEICHNIS (TOC) — match old Elementor style
================================================== */
#ez-toc-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px 25px;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}
#ez-toc-container .ez-toc-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#ez-toc-container .ez-toc-title {
    font-family: Manrope, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
#ez-toc-container nav ul {
    margin-top: 12px;
}
#ez-toc-container nav ul li {
    padding: 4px 0;
    font-size: 15px;
    line-height: 1.5;
}
#ez-toc-container nav ul li a {
    color: #555;
    text-decoration: none;
}
#ez-toc-container nav ul li a:hover {
    color: #e9917e;
}

/* ==================================================
   SIDEBAR WIDGETS
================================================== */
.sidebar .widget {
    margin-bottom: 2rem;
}
.sidebar .widget-title,
.sidebar .wp-block-heading {
    font-family: Manrope, sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Hast Du Fragen & Newsletter — styled sidebar blocks */
.sidebar-block-bg {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 30px 25px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.sidebar-block-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 0;
}
.sidebar-block-bg > * {
    position: relative;
    z-index: 1;
}
.sidebar-block-bg h3 {
    font-family: Manrope, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px 0;
}
.sidebar-block-bg p {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}
.sidebar-block-bg a {
    color: #e9917e;
    text-decoration: none;
}
.sidebar-block-bg a:hover {
    color: #fff;
}

/* Recent posts with thumbnails */
.sidebar-recent-post {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.sidebar-recent-post img {
    min-width: 80px;
    max-width: 80px;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.sidebar-recent-post a {
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    text-decoration: none;
}
.sidebar-recent-post a:hover {
    color: #e9917e;
}

/* Kategorien links */
.sidebar .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar .widget_categories li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar .widget_categories li a {
    color: #e9917e;
    text-decoration: none;
    font-size: 15px;
}
.sidebar .widget_categories li a:hover {
    color: #d47a68;
}

/* ==================================================
   WOOCOMMERCE LAYOUT & COLORS
================================================== */

/* Shop archive container */
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main {
    max-width: var(--gb-container-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* WooCommerce buttons — accent color instead of defaults */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: #e9917e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    font-weight: 500;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #d47a68 !important;
    color: #fff !important;
}

/* WooCommerce notices — accent color */
.woocommerce-message {
    border-top-color: #e9917e !important;
}
.woocommerce-message::before {
    color: #e9917e !important;
}
.woocommerce-info {
    border-top-color: #e9917e !important;
}
.woocommerce-info::before {
    color: #e9917e !important;
}
.woocommerce-info a {
    color: #e9917e !important;
}

/* Remove blue/green WooCommerce defaults */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
    background-color: #fdf8f5;
}

/* Product links — accent color */
.woocommerce-cart .product-name a,
.woocommerce-checkout .product-name a {
    color: #e9917e;
}

/* Price badge */
.woocommerce span.onsale {
    background-color: #e9917e !important;
}

/* Star rating */
.woocommerce .star-rating span::before {
    color: #e9917e !important;
}

/* ==================================================
   FOOTER SPACING
================================================== */
.site-footer {
    margin-top: 60px;
}

/* Home page — CTA section already has bottom margin, reduce */
.home .site-footer {
    margin-top: 0;
}

/* ==================================================
   PARAGRAPH SPACING (match old site)
================================================== */
.entry-content p {
    margin-bottom: 1.6em;
}
.entry-content p:last-child {
    margin-bottom: 0;
}

/* ==================================================
   HEADING TYPOGRAPHY (match old site: Manrope, 600 weight)
   Scoped to content area — sidebar uses its own sizes
================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Content headings only — not sidebar */
.site-main h2,
.entry-content h2,
.fs-h2 {
    font-size: 35px;
    line-height: 1.3;
}

.site-main h3,
.entry-content h3,
.fs-h3 {
    font-size: 28px;
    line-height: 1.3;
}

.site-main h4,
.entry-content h4,
.fs-h4 {
    font-size: 22px;
    line-height: 1.3;
}

/* Sidebar headings stay small */
.sidebar h2,
.sidebar h3 {
    font-size: 20px;
    line-height: 1.4;
}

/* Responsive heading sizes */
@media (max-width: 768px) {
    .site-main h2, .fs-h2 { font-size: 24px; }
    .site-main h3, .fs-h3 { font-size: 22px; }
}
