/* Toolbox page — [thch_toolbox] shortcode */

/* --------------------------------------------------------
   Hero
   -------------------------------------------------------- */
/* Page background */
.thch-toolbox {
    background: var(--Neutral-500, #EAECF0);
}

.thch-toolbox__hero-wrap {
    padding: 3rem 0 0;
    margin-bottom: 3rem;
}

.thch-toolbox__hero {
    background: linear-gradient(90deg, #171B37 0%, #0066FF 100%);
    border-radius: 1.5rem;
    padding: 1.5rem 2rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.thch-toolbox__hero-img {
    width: 16rem;
    height: 16rem;
    object-fit: contain;
    padding: 1rem;
}

.thch-toolbox__hero-title {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 3rem;
    text-transform: uppercase;
    color: var(--Typography-White-High-Emphasis, #FAFAFA);
    text-align: center;
    margin: 1rem 0 0;
}

.thch-toolbox__hero-subtitle {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 2.5rem;
    color: #FAFAFA;
    margin: 1rem 0 0;
}

/* Search bar */
.thch-toolbox__search {
    width: 100%;
    max-width: 36.5rem;
    margin-top: 1.5rem;
}

.thch-toolbox__search-bar {
    display: flex;
    gap: 0.5rem;
}

.thch-toolbox__search-input {
    flex: 1;
    border-radius: 30px;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(23, 27, 55, 0.3);
    background: #fff;
    color: var(--thch-color-primary, #1D245D);
    font-family: var(--thch-font-body, 'Aptos', system-ui, sans-serif);
    font-size: 1rem;
    line-height: 1.5rem;
    outline: none;
    transition: border-color 0.2s;
}

.thch-toolbox__search-input::placeholder {
    color: rgba(23, 27, 55, 0.8);
}

.thch-toolbox__search-input:focus {
    border-color: rgba(23, 27, 55, 0.5);
}

.thch-toolbox__search-btn {
    border-radius: 30px;
    padding: 0.5rem 1.25rem;
    background: var(--thch-color-primary, #1D245D);
    color: #EAECF0;
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.thch-toolbox__search-btn:hover {
    background: #161B37;
}

/* --------------------------------------------------------
   Main content container — override base .thch-section padding (6rem → 3rem)
   -------------------------------------------------------- */
.thch-toolbox .thch-section:first-of-type {
    padding: 0;
}

.thch-toolbox__categories {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.thch-toolbox__results {
    padding-top: 0 !important;
}

/* --------------------------------------------------------
   Section title (shared)
   -------------------------------------------------------- */
.thch-toolbox__section-title {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 2.5rem;
    color: var(--thch-color-primary, #1D245D);
    text-align: center;
    margin-bottom: 3rem;
}

/* --------------------------------------------------------
   Category cards
   -------------------------------------------------------- */
.thch-toolbox__category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.thch-toolbox__category-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--thch-color-primary, #1D245D);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.thch-toolbox__category-item:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.thch-toolbox__category-card-top {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    padding: 1rem;
    color: #fff;
}

.thch-toolbox__category-badge svg {
    width: 3rem;
    height: 3rem;
}

.thch-toolbox__category-card-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 1rem;
    flex: 1;
}

.thch-toolbox__category-label {
    font-family: var(--thch-font-body, 'Aptos', system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--thch-color-primary, #1D245D);
    line-height: 1.5;
}

/* --------------------------------------------------------
   Contact section
   -------------------------------------------------------- */
.thch-toolbox__contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.thch-toolbox__contact-header .thch-toolbox__section-title {
    margin-bottom: 0;
}

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

.thch-toolbox__contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--thch-color-primary, #1D245D);
    color: #FAFAFA;
    border-radius: 1.5rem;
    padding: 2rem;
    min-height: 22rem;
    text-decoration: none;
    transition: background 0.2s;
}

.thch-toolbox__contact-card:first-child {
    background: var(--Secondary-500, #171B37);
}

.thch-toolbox__contact-card:hover {
    background: #161B37;
}

.thch-toolbox__contact-card:last-child {
    background: #ADA791;
    color: var(--thch-color-primary, #1D245D);
}

.thch-toolbox__contact-card:last-child:hover {
    background: #9e9882;
}

.thch-toolbox__contact-icon-wrap svg {
    width: 3rem;
    height: 3rem;
}

.thch-toolbox__contact-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.thch-toolbox__contact-title {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
}

.thch-toolbox__contact-desc {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
}

/* Arrow icon — bottom right */
.thch-toolbox__contact-arrow {
    display: flex;
    align-self: flex-end;
    margin-top: auto;
    color: #FAFAFA;
    transition: transform 0.2s;
}

.thch-toolbox__contact-arrow-icon {
    width: 3rem;
    height: 3rem;
}

.thch-toolbox__contact-card:hover .thch-toolbox__contact-arrow {
    transform: translateX(4px);
}

.thch-toolbox__contact-card:last-child .thch-toolbox__contact-arrow {
    color: var(--thch-color-primary, #1D245D);
}

/* --------------------------------------------------------
   Hero — compact (category results mode)
   -------------------------------------------------------- */
.thch-toolbox__hero--compact {
    padding: 2rem 2rem;
    gap: 1.5rem;
}

.thch-toolbox__hero--compact .thch-toolbox__hero-subtitle {
    font-size: 1.5rem;
    line-height: 2rem;
}

/* --------------------------------------------------------
   Search results (category filter)
   -------------------------------------------------------- */
.thch-toolbox__results-label {
    font-family: var(--thch-font-body, 'Aptos', system-ui, sans-serif);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.75rem;
    color: rgba(23, 27, 55, 0.8);
    margin-bottom: 1rem;
}

.thch-toolbox__result-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.thch-toolbox__result-heading {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
    color: var(--thch-color-primary, #1D245D);
    margin: 0;
}

/* File row (PDFs) */
.thch-toolbox__result-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 3rem;
    height: 4.75rem;
    background: #fff;
    border: 1px solid #EAECF0;
    border-radius: 1.25rem;
}

.thch-toolbox__result-file + .thch-toolbox__result-file {
    margin-top: 0.25rem;
}

.thch-toolbox__result-file-name {
    font-family: var(--thch-font-body, 'Aptos', system-ui, sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.75rem;
    color: var(--thch-color-primary, #1D245D);
    flex: 1;
    min-width: 0;
}

.thch-toolbox__result-file-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Info / page row (cards with thumbnail) */
.thch-toolbox__result-info {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 2rem 3rem;
    background: #fff;
    border: 1px solid #EAECF0;
    border-radius: 1.25rem;
}

.thch-toolbox__result-info + .thch-toolbox__result-info {
    margin-top: 0.25rem;
}

.thch-toolbox__result-info-thumb {
    width: 6.25rem;
    height: 6.25rem;
    border-radius: 1rem;
    object-fit: cover;
    flex-shrink: 0;
}

.thch-toolbox__result-info-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.thch-toolbox__result-info-title {
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.75rem;
    color: var(--thch-color-primary, #1D245D);
    margin: 0;
}

.thch-toolbox__result-info-desc {
    font-family: var(--thch-font-body, 'Aptos', system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.25rem;
    color: rgba(23, 27, 55, 0.8);
    margin: 0;
}

/* Pill buttons */
.thch-toolbox__result-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 30px;
    font-family: var(--thch-font-heading, 'Aptos', system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

/* Standalone icon buttons — mobile only (hidden on desktop) */
.thch-toolbox__result-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--thch-color-primary, #1D245D);
    text-decoration: none;
}

.thch-toolbox__result-icon-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.thch-toolbox__result-pill--primary {
    background: var(--thch-color-primary, #1D245D);
    color: #EAECF0;
}

.thch-toolbox__result-pill--primary:hover {
    background: #161B37;
    color: #EAECF0;
}

.thch-toolbox__result-pill--outline {
    background: transparent;
    color: var(--thch-color-primary, #1D245D);
    border: 1.5px solid var(--thch-color-primary, #1D245D);
}

.thch-toolbox__result-pill--outline:hover {
    background: var(--thch-color-primary, #1D245D);
    color: #EAECF0;
}

.thch-toolbox__no-results {
    text-align: center;
    font-size: 1.125rem;
    color: #646970;
    padding: 3rem 0;
}

/* --------------------------------------------------------
   Responsive
   -------------------------------------------------------- */

/* Tablet — category grid 3 cols */
@media (max-width: 64rem) {
    .thch-toolbox__category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile — category grid horizontal scroll */
@media (max-width: 40rem) {
    .thch-toolbox__category-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 0.5rem;
    }

    .thch-toolbox__category-item {
        flex: 0 0 8.5rem;
        scroll-snap-align: start;
    }
}

/* Contact cards stack + hero adjustments at 48rem */
@media (max-width: 48rem) {
    .thch-toolbox__contact-grid {
        grid-template-columns: 1fr;
    }

    .thch-toolbox__contact-card {
        min-height: auto;
        padding: 1.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .thch-toolbox__hero-wrap {
        padding: 1rem 0 0;
        margin-bottom: 3rem;
    }

    .thch-toolbox__hero {
        border-radius: 1rem;
        padding: 2rem 1.5rem;
        gap: 0;
    }

    .thch-toolbox__hero-img {
        width: 10rem;
        height: 10rem;
    }

    .thch-toolbox__hero-title {
        font-size: 2rem;
        line-height: 2rem;
    }

    .thch-toolbox__hero-subtitle {
        font-size: 1.5rem;
        line-height: 1.75rem;
    }

    .thch-toolbox__section-title {
        font-size: 1.75rem;
        line-height: 2rem;
    }

    .thch-toolbox__result-file {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    /* Mobile: show icon-only buttons, hide pill buttons in file rows */
    .thch-toolbox__result-file .thch-toolbox__result-pill {
        display: none;
    }

    .thch-toolbox__result-file .thch-toolbox__result-icon-btn {
        display: inline-flex;
    }

    .thch-toolbox__result-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
    }

    .thch-toolbox__result-info-thumb {
        width: 100%;
        height: 10rem;
    }
}

/* Small — search bar stacks */
@media (max-width: 40rem) {
    /* Info-Karten: "Aufrufen"/"Weiterleiten" nebeneinander, wenn Platz ist,
       sonst untereinander in voller Breite; 44px Tap-Target. */
    .thch-toolbox__result-info .thch-toolbox__result-file-actions {
        gap: 0.75rem;
    }

    .thch-toolbox__result-info .thch-toolbox__result-pill {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 2.75rem;
        box-sizing: border-box;
    }

    .thch-toolbox__search-bar {
        flex-direction: column;
    }

    .thch-toolbox__search-btn {
        width: 100%;
    }
}
