/* ==========================================================================
   ipc Management — main.css
   Faithful replica of ipc-m.com. Brand red #c80129, Karla typeface.
   ========================================================================== */

:root {
    --ipc-red: #c80129;
    --ipc-red-dark: #a30121;
    --ipc-text: #333333;
    --ipc-bg: #ffffff;
    --ipc-rule: #dddddd;
    --ipc-muted: #666666;
    --ipc-radius: 10px;
    --ipc-container: 1200px;
    --ipc-font: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --header-h: 96px;
}

/* ── Reset / base ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--ipc-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ipc-text);
    background: var(--ipc-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--ipc-red);
    text-decoration: none;
    transition: color .18s ease;
}

a:hover {
    color: var(--ipc-red-dark);
}

h1,
h2,
h3,
h4 {
    font-family: var(--ipc-font);
    font-weight: 700;
    color: var(--ipc-red);
    line-height: 1.2;
    margin: 0 0 .5em;
}

h1 {
    font-size: 42px;
}

h2 {
    font-size: 32px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 18px;
}

p {
    margin: 0 0 1.2em;
}

.container {
    width: 100%;
    max-width: var(--ipc-container);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 820px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 16px 34px;
    border-radius: var(--ipc-radius);
    border: 2px solid var(--ipc-red);
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.btn--primary {
    background: var(--ipc-red);
    color: #fff;
}

.btn--primary:hover {
    background: var(--ipc-red-dark);
    border-color: var(--ipc-red-dark);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--ipc-red);
}

.btn--outline:hover {
    background: var(--ipc-red);
    color: #fff;
}

/* ── Top red bar ────────────────────────────────────────── */
.topbar {
    height: 7px;
    background: var(--ipc-red);
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    backdrop-filter: saturate(180%) blur(6px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo img {
    width: auto;
    height: 88px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list > li {
    position: relative;
}

.nav-list a {
    color: var(--ipc-text);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 8px 0;
    display: inline-block;
}

.nav-list a:hover,
.nav-list .current-menu-item > a {
    color: var(--ipc-red);
}

/* Dropdowns */
.nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--ipc-rule);
    border-radius: var(--ipc-radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-list .sub-menu li {
    display: block;
}

.nav-list .sub-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ipc-text);
}

.nav-list .sub-menu a:hover {
    color: var(--ipc-red);
    background: #faf3f4;
}

.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .7;
}

.nav-cta {
    background: var(--ipc-red);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px !important;
    border-radius: var(--ipc-radius);
    transition: background .18s ease;
}

.nav-cta:hover {
    background: var(--ipc-red-dark);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--ipc-text);
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Home title (red, above hero) ───────────────────────── */
.home-title {
    text-align: center;
    padding: 22px 0 20px;
}

.home-title h1 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 38px);
    color: var(--ipc-red);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .18));
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    color: #fff;
    font-family: var(--ipc-font);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: clamp(28px, 4vw, 44px);
    margin: 0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

/* ── Tagline (stacked, red, centered) ───────────────────── */
.tagline {
    padding: 66px 0 44px;
    text-align: center;
}

.tagline-item {
    font-size: clamp(22px, 2.6vw, 30px);
    letter-spacing: .04em;
    margin: 0 0 18px;
}

.tagline-item:last-child {
    margin-bottom: 0;
}

/* ── Value proposition ──────────────────────────────────── */
.value-prop {
    padding: 8px 0 84px;
    text-align: center;
}

.value-prop p {
    font-size: 17px;
    line-height: 1.8;
}

.value-prop-signoff {
    font-weight: 400;
    color: var(--ipc-text);
    margin-top: 22px;
}

.value-prop-cta {
    margin-top: 34px;
}

/* ── Gallery ────────────────────────────────────────────── */
.gallery {
    padding: 0 0 96px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.gallery-item {
    margin: 0;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* ── Interior page hero + content ───────────────────────── */
.page-hero--slim {
    padding: 64px 0 28px;
    border-bottom: 1px solid var(--ipc-rule);
    text-align: center;
}

.page-hero--slim h1 {
    margin: 0;
}

/* Hide Jetpack / WordPress.com sharing ("Teilen mit") and likes ("Gefällt mir") */
#jp-post-flair,
.sharedaddy,
.sd-sharing,
.sd-like,
.jetpack-likes-widget-wrapper,
.jp-relatedposts {
    display: none !important;
}

.page-content {
    padding: 48px 0 88px;
}

.entry-content {
    font-size: 17px;
}

.entry-content h2 {
    margin-top: 1.6em;
}

.entry-content img {
    margin: 1.4em 0;
}

.entry-content a {
    text-decoration: underline;
}

/* Gutenberg preset colors used by imported page/post content (Karuna palette) */
.has-black-color {
    color: #333333;
}

.has-light-gray-background-color {
    background-color: #dddddd;
}

/* Block alignment support — matches the live Karuna layout (full-bleed
   cover/image banners with narrow body text). */
.page-content {
    overflow-x: clip;
}

/* Full/wide blocks break to the viewport (as on live). The Jetpack layout
   grid then sizes its own columns via its span classes, so text width comes
   from the grid — not from a theme container. */
.entry-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.entry-content .alignwide {
    width: min(100vw, 1160px);
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* Cover overlay text stays readable/narrow; group inner containers are left
   full-width so nested layout grids can size their own columns (as on live). */
.entry-content .wp-block-cover__inner-container {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.entry-content .wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 430px;
    overflow: hidden;
}

.entry-content .wp-block-cover img.wp-block-cover__image-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.entry-content .wp-block-image img {
    margin: 0;
    border-radius: 0;
    width: 100%;
    height: auto;
}

.entry-content .aligncenter {
    text-align: center;
}

.entry-content .aligncenter img {
    margin-left: auto;
    margin-right: auto;
}

.entry-content .wp-block-button__link {
    color: #fff;
    text-decoration: none;
    border-radius: var(--ipc-radius);
    padding: 14px 30px;
    display: inline-block;
}

/* ── Blog list ──────────────────────────────────────────── */
.site-main {
    padding: 48px 0 88px;
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.post-card-thumb img {
    border-radius: var(--ipc-radius);
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
}

.post-card-title {
    font-size: 22px;
    margin: 18px 0 6px;
}

.post-card-meta {
    color: var(--ipc-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.pagination {
    margin-top: 56px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--ipc-rule);
    border-radius: 6px;
    margin: 0 3px;
    color: var(--ipc-text);
}

.pagination .page-numbers.current {
    background: var(--ipc-red);
    color: #fff;
    border-color: var(--ipc-red);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: #fff;
    color: var(--ipc-text);
    margin-top: 0;
}

.footer-main {
    text-align: center;
    padding: 56px 0 44px;
}

.footer-logo-link {
    display: inline-block;
}

.footer-logo {
    width: auto;
    height: 96px;
    margin: 0 auto 22px;
}

.footer-address {
    font-style: normal;
    line-height: 1.7;
    font-size: 15px;
}

.footer-address p {
    margin: 0 0 6px;
}

.footer-company {
    font-weight: 700;
}

.footer-contact {
    margin-top: 20px !important;
}

.footer-address a {
    color: var(--ipc-text);
}

.footer-email,
.footer-address a.footer-email {
    color: var(--ipc-red);
}

/* Red legal bar */
.footer-legal {
    background: var(--ipc-red);
    color: #fff;
    padding: 34px 0;
}

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
}

.footer-nav li:last-child {
    border-bottom: 0;
}

.footer-nav a {
    color: #fff;
    font-size: 15px;
}

.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    :root {
        --header-h: 76px;
    }

    .site-logo img,
    .site-logo .custom-logo {
        height: 52px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--ipc-rule);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .12);
        padding: 12px 24px 24px;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        transform: translateY(-120%);
        transition: transform .28s ease;
    }

    .main-nav.is-open {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-list > li {
        border-bottom: 1px solid var(--ipc-rule);
    }

    .nav-list a {
        padding: 14px 0;
    }

    .nav-list .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 0;
        box-shadow: none;
        padding: 0 0 8px 14px;
        min-width: 0;
    }

    .menu-item-has-children > a::after {
        display: none;
    }

    .nav-cta {
        margin-top: 16px;
        text-align: center;
    }

    .hero {
        min-height: 400px;
    }

    .tagline-cols {
        gap: 24px;
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
