/* ==========================================================================
   Thomas Schuh Möbelschreinerei - Custom Styles
   Styles that cannot be expressed via theme.json
   ========================================================================== */

/* Landing Layout — vertically center on viewport */
.ts-landing {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent WordPress default column stacking */
.ts-landing-columns {
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
}

.ts-landing-content {
    max-width: 500px;
}

.ts-name {
    white-space: nowrap;
}

/* Title Bar — blue strip with negative margin overlap */
.ts-title-bar {
    display: inline-block;
    margin-left: -1rem;
}

.ts-title {
    white-space: nowrap;
}

/* Contact — small-caps for address and phone */
.ts-address,
.ts-phone {
    font-variant: small-caps;
    letter-spacing: 0.05em;
}

/* Logo — constrain width and overlap toward content */
.ts-logo-column {
    margin-left: -110px;
    flex-shrink: 0;
}

.ts-logo img {
    width: 220px;
    height: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media screen and (max-width: 768px) {
    .ts-landing {
        min-height: auto;
    }

    .ts-landing-columns {
        flex-direction: column-reverse !important;
        align-items: center !important;
        text-align: center;
        gap: 1.5rem !important;
    }

    .ts-landing-content,
    .ts-logo-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    .ts-title-bar {
        margin-left: 0;
    }

    .ts-logo-column {
        margin-left: 0;
        display: flex;
        justify-content: center;
    }

    .ts-logo img {
        width: 180px;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .ts-landing-columns {
        gap: 1rem !important;
    }

    .ts-name {
        font-size: 1.75rem !important;
    }

    .ts-title {
        font-size: 1rem !important;
    }

    .ts-contact {
        font-size: 0.9rem !important;
    }

    .ts-logo img {
        width: 150px;
    }
}

/* Small Mobile */
@media screen and (max-width: 360px) {
    .ts-name {
        font-size: 1.5rem !important;
    }

    .ts-title {
        font-size: 0.875rem !important;
    }

    .ts-contact {
        font-size: 0.85rem !important;
    }

    .ts-logo img {
        width: 120px;
    }
}

/* Footer — remove any borders, center copyright, hide leftover navigation */
footer.wp-block-group {
    border: none !important;
    justify-content: center !important;
}

@media screen and (max-width: 768px) {
    footer.wp-block-group .wp-block-navigation {
        display: none !important;
    }
}

/* Header — hide site title, center nav */
header.wp-block-group .wp-block-site-title {
    display: none !important;
}

header.wp-block-group {
    justify-content: center !important;
}

/* Hide footer-only links on desktop, show in mobile overlay */
.wp-block-navigation-item.ts-mobile-only {
    display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.ts-mobile-only {
    display: block !important;
}

/* Mobile menu overlay — fix fitting */
.wp-block-navigation__responsive-container.is-menu-open {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    padding: 2rem !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    align-items: center !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
    font-size: 1rem !important;
    letter-spacing: 0.02em !important;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    body {
        background: none;
        padding: 0;
    }

    .ts-landing {
        max-width: 100%;
        min-height: auto;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #999;
    }
}
