/*
 * STW Widgets – Steuerberatung Wolf
 * Custom Elementor widgets CSS
 *
 * Markenfarben (als CSS-Custom-Properties – im Theme-Root definiert):
 *   --stw-blue:       #283583  Dunkelblau (Navigation, rechte Spalten, Button-Titel)
 *   --stw-lightblue:  #5a93e3  Hellblau (H1, Büroklammer-Buttons, Hervorhebungen)
 *   --stw-btn-bg:     #eef4fc  Hellblau Button-Hintergrund
 *   --stw-heading:    #acc9f1  Hellblau Überschriften (H2, H3)
 *   --stw-textbox-bg: #cee3fc  Hellblau Textbox-Hintergrund
 *   --stw-green-bg:   #eff8f6  Hellgrün (Immobilien, Team, News-Vorschau)
 */

/* ─── Icon Button ─────────────────────────────────────────────────────────── */
.stw-icon-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: var(--stw-btn-bg, #eef4fc);
    border-radius: var(--stw-border-radius);
    padding: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.stw-icon-button:hover {
    box-shadow: 0 4px 18px rgba(40, 53, 131, 0.15);
    transform: translateY(-1px);
}

.stw-icon-button__label {
    color: var(--stw-blue, #283583);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    flex: 1;
}

.stw-icon-button__icon {
    width: auto;
    height: 32px !important;
    object-fit: contain;
    flex-shrink: 0;
}


/* ─── News-Vorschau (Sidebar, mit linkem Rand) ────────────────────────────── */

.stw-news-preview {
    border-left: 3px solid var(--stw-lightblue, #5a93e3);
    padding: 6px 14px;
    margin-bottom: 0;
}

.stw-news-preview__title {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.5;
    margin: 0 0 8px;
}

.stw-news-preview__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--stw-lightblue, #5a93e3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.15s;
}

.stw-news-preview__link:hover {
    opacity: 0.8;
}

.stw-news-preview__link-icon {
    flex-shrink: 0;
}


/* ─── News-Karte (Wissenswert-Gitter) ────────────────────────────────────── */

.stw-news-card {
    background-color: var(--stw-green-bg, #eff8f6);
    border-radius: var(--stw-border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stw-news-card__image-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.stw-news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.stw-news-card__image-wrap:hover .stw-news-card__image {
    transform: scale(1.04);
}

.stw-news-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stw-news-card__title {
    color: var(--stw-blue, #283583);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}

.stw-news-card__excerpt {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    flex: 1;
    margin: 0 0 16px;
}

.stw-news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.stw-news-card__meta {
    font-size: 12px;
    color: #666;
}

.stw-news-card__category {
    font-weight: 600;
}

.stw-news-card__arrow {
    width: 34px;
    height: 34px;
    background-color: var(--stw-blue, #283583);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.stw-news-card__arrow:hover {
    background-color: var(--stw-lightblue, #5a93e3);
}


/* ─── Mitarbeiter-Karte ───────────────────────────────────────────────────── */

.stw-team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 56px;
    position: relative;
    margin-top: 56px;
}

.stw-team-member__avatar-wrap {
    position: absolute;
    top: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: 112px;
    height: 112px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, var(--stw-blue, #283583), var(--stw-lightblue, #5a93e3));
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(40, 53, 131, 0.2);
    flex-shrink: 0;
}

.stw-team-member__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stw-team-member__avatar-placeholder {
    width: 100%;
    height: 100%;
}

.stw-team-member__card {
    background-color: var(--stw-green-bg, #eff8f6);
    border-radius: var(--stw-border-radius);
    padding: 60px 10px 20px 10px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: -55px;
}

.stw-team-member__name {
    color: var(--stw-blue, #283583);
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 4px;
}

.stw-team-member__qualification {
    color: var(--stw-lightblue, #5a93e3);
    font-size: 13px;
    margin: 0 0 2px;
}

.stw-team-member__role {
    color: var(--stw-lightblue, #5a93e3);
    font-size: 13px;
    margin: 0 0 12px;
}

.stw-team-member__email {
    display: inline-flex;
    align-items: start;
    gap: 5px;
    color: var(--stw-blue, #283583);
    font-size: 13px;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.15s;
    font-weight: normal;
}


.stw-team-member__email:hover {
    color: var(--stw-lightblue, #5a93e3);
}

.stw-team-member__email svg {
    margin-top: .5rem;
}


/* ─── Fristenkalender-Eintrag ────────────────────────────────────────────── */

.stw-deadline-item {
    background-color: var(--stw-textbox-bg, #cee3fc);
    border-radius: var(--stw-border-radius);
    padding: 14px 18px;
    display: block;
    text-decoration: none;
    transition: filter 0.15s ease;
    margin-bottom: 10px;
}

.stw-deadline-item:hover {
    filter: brightness(0.97);
}

.stw-deadline-item--highlighted {
    background-color: var(--stw-heading, #acc9f1);
}

.stw-deadline-item__description {
    color: #283583;
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 4px;
}

.stw-deadline-item__date {
    color: #283583;
    font-weight: 700;
    font-size: 15px;
    margin: 0;
}


/* ─── Textbox und Textbox mit linkem Rand ─────────────────────────────────────────────── */

.stw-text-box-bordered, .stw-text-box {

}

.stw-text-box-bordered > div {
    border-left: 3px solid var(--stw-heading, #5a93e3);
}

.stw-text-box-bordered > div, .stw-text-box > div {
    padding: 8px 18px;
}

.stw-text-box-bordered > .page, .stw-text-box > .page {
    padding: 0;
}

.stw-text-box-bordered__title, .stw-text-box__title {
    color: var(--stw-lightblue, #5a93e3);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.stw-text-box-bordered__content, .stw-text-box__content {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.65;
}

.stw-text-box-bordered__content p, .stw-text-box__content p {
    margin: 0 0 0.5em;
}

.stw-text-box-bordered__content p:last-child, .stw-text-box__content p:last-child {
    margin-bottom: 0;
}

.stw-text-box-bordered__link, .stw-text-box__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--stw-lightblue, #5a93e3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 10px;
    transition: opacity 0.15s;
}

.stw-text-box-bordered__link:hover, .stw-text-box__link:hover {
    opacity: 0.8;
}


/* ─── Überschrift mit Icon ────────────────────────────────────────────────── */

.stw-icon-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stw-icon-heading__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.stw-icon-heading__text {
    color: var(--stw-blue, #283583);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}


/* ─── Situations-Panel (Branchen-Seiten) ─────────────────────────────────── */

.stw-situation-panel {
    background-color: var(--stw-green-bg, #eff8f6);
    border-radius: var(--stw-border-radius);
    padding: 22px 24px;
    box-sizing: border-box;
}

.stw-situation-panel__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.stw-situation-panel__icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 2px;
}

.stw-situation-panel__heading {
    color: var(--stw-blue, #283583);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.stw-situation-panel__quote {
    background-color: var(--stw-textbox-bg, #cee3fc);
    border-radius: var(--stw-border-radius);
    padding: 12px 16px 14px;
    margin-bottom: 16px;
}

.stw-situation-panel__quote-mark {
    display: block;
    color: var(--stw-lightblue, #5a93e3);
    font-size: 40px;
    line-height: 0.75;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 6px;
    user-select: none;
}

.stw-situation-panel__quote-text {
    font-style: italic;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.65;
    margin: 0;
}

.stw-situation-panel__bullets {
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.6;
}

.stw-situation-panel__bullets ul {
    padding-left: 18px;
    margin: 0;
}

.stw-situation-panel__bullets li {
    margin-bottom: 5px;
}

.stw-situation-panel__bullets li:last-child {
    margin-bottom: 0;
}


/* ─── Google-Bewertungs-Box ──────────────────────────────────────────────── */

.stw-google-review {
    background-color: var(--stw-green-bg, #eff8f6);
    border-radius: var(--stw-border-radius);
    padding: 18px 20px;
}

.stw-google-review__header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.stw-google-review__name {
    color: var(--stw-blue, #283583);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.stw-google-review__google-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.stw-google-review__stars {
    color: #fbbc04;
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1;
}

.stw-google-review__text {
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.65;
    margin: 0;
}


/* ─── Globale STW-Helfer (Elementor-Kontext) ─────────────────────────────── */

/* Sicherstellen, dass Widgets in voller Breite laufen */
.elementor-widget-stw-icon-button,
.elementor-widget-stw-news-preview-item,
.elementor-widget-stw-news-card,
.elementor-widget-stw-team-member,
.elementor-widget-stw-deadline-item,
.elementor-widget-stw-text-box-bordered,
.elementor-widget-stw-text-box,
.elementor-widget-stw-google-review,
.elementor-widget-stw-situation-panel {
    width: 100%;
}

/* Einheitliche abgerundete Ecken bei Elementor-Bildern */
.elementor-image img,
.elementor-widget-image img {
    border-radius: var(--stw-border-radius);
}


/* ─── Mobile-first Anpassungen ───────────────────────────────────────────── */

/* Icon Button – kompakter auf sehr kleinen Screens */
@media screen and (max-width: 380px) {
    .stw-icon-button {
        padding: 12px 14px;
    }

    .stw-icon-button__icon {
        width: auto;
        height: 32px !important;
    }

    .stw-icon-button__label {
        font-size: 14px;
    }
}

/* Team Member – reduzierter Avatar-Überlauf auf kleinen Screens */
@media screen and (max-width: 480px) {
    .stw-team-member {
        padding-top: 48px;
        margin-top: 48px;
    }

    .stw-team-member__avatar-wrap {
        top: -48px;
        width: 96px;
        height: 96px;
    }

    .stw-team-member__card {
        padding-top: 52px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .stw-team-member__name {
        font-size: 15px;
    }
}

/* News Card – schlanker Titeltext auf kleinen Screens */
@media screen and (max-width: 480px) {
    .stw-news-card__body {
        padding: 16px;
    }

    .stw-news-card__title {
        font-size: 14px;
    }
}

/* Deadline Item – sicherere Mindesthöhe */
.stw-deadline-item {
    min-height: 56px;
}

/* Text Box Bordered – etwas mehr Padding auf Desktop */
@media screen and (min-width: 62em) {
    .stw-text-box-bordered, .stw-text-box {
        padding: 10px 0;
    }
}

/* Google Review – vollbreit auf Mobile */
.stw-google-review {
    display: block;
}

/* News Preview – Abstand zwischen Einträgen */
.stw-news-preview + .stw-news-preview {
    margin-top: 16px;
}

/* Alle STW-Links – Touch-Target-Mindestgröße */
.stw-news-preview__link,
.stw-text-box-bordered__link,
.stw-text-box__link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

/* ─── Fixed Contacts Sidebar ──────────────────────────────────────────────── */

#sidebar-widgets {
    top: 50%;
    right: 0 !important;
    transform: translateY(-50%);
    z-index: 9000;
    width: auto !important;
}

.elementor-widget-widget-fixedcontact ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.elementor-widget-widget-fixedcontact li {
    background-color: #283583;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.elementor-widget-widget-fixedcontact li:first-child {
    border-top: none;
    border-radius: var(--stw-border-radius) 0 0 0;
}

.elementor-widget-widget-fixedcontact li:last-child {
    border-radius: 0 0 0 var(--stw-border-radius);
}

.elementor-widget-widget-fixedcontact li span {
    display: block;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    padding: 10px 14px;
    white-space: nowrap;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    cursor: default;
}

@media screen and (max-width: 768px) {
    #sidebar-widgets {
        display: none;
    }
}

/* ─── Startseite: Icon-Button-Reihe bündig links/rechts ─────────────────── */
/* Entfernt den äußeren Elementor-Spaltengap, behält nur den Zwischenraum    */
.elementor-element-hp_s2_ic1 {
    padding-left: 0 !important;
}

.elementor-element-hp_s2_ic2 {
    padding-right: 0 !important;
}
