/*
 * Home page of deskmanager.ch (plugins/Kreezalid/Core/templates/Home/display.php).
 * Scoped under .dm-home so the Bootstrap 3 theme (css/assets/style.css) keeps
 * the rest of the site unchanged. Brand: green #9acc2f, Jost.
 */
.dm-home {
    --dmh-green: #9acc2f;
    --dmh-green-ink: #5f8418;
    --dmh-ink: #222;
    --dmh-muted: #5f5f5f;
    --dmh-line: #e6e6e1;
    --dmh-sand: #f6f5f1;
    --dmh-radius: 14px;
    font-family: 'Jost', 'Source Sans Pro', Helvetica, Arial, sans-serif;
    color: var(--dmh-ink);
    font-size: 16px;
    line-height: 1.55;
    clear: both; /* the header floats left */
}
/* The old home slid its carousel under an absolutely positioned header: the new one starts below it. */
.homepage-body header#header { position: relative; overflow-x: clip; }

.dm-home h1, .dm-home h2, .dm-home h3 { font-family: inherit; color: var(--dmh-ink); letter-spacing: -.01em; }
.dm-home img { max-width: 100%; height: auto; }
.dmh-wrap { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.dmh-section { padding: clamp(40px, 6vw, 72px) 0; }
.dmh-section--sand { background: var(--dmh-sand); }
.dmh-section--flush { padding-bottom: 0; }
.dmh-section--tight { padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--dmh-line); }
.dmh-clients .dmh-head { margin-bottom: 16px; }
.dm-home .dmh-clients h2 { font-size: clamp(20px, 2vw, 24px); }
.dmh-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dmh-green-ink); }
.dmh-lead { font-size: 18px; color: var(--dmh-muted); margin: 0 0 24px; }

/* Buttons */
.dmh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.dmh-actions--center { justify-content: center; margin-top: 32px; }
.dm-home .dmh-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px;
    border: 1.5px solid var(--dmh-ink); border-radius: 999px; color: var(--dmh-ink); background: transparent;
    font-weight: 600; font-size: 16px; text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.dm-home .dmh-btn:hover, .dm-home .dmh-btn:focus { background: var(--dmh-ink); color: #fff; text-decoration: none; }
.dm-home .dmh-btn--primary { background: var(--dmh-green); border-color: var(--dmh-green); color: #1d2a05; }
.dm-home .dmh-btn--primary:hover, .dm-home .dmh-btn--primary:focus { background: #86b524; border-color: #86b524; color: #1d2a05; }
.dm-home .dmh-btn--light { border-color: #fff; color: #fff; }
.dm-home .dmh-btn--light:hover { background: #fff; color: var(--dmh-ink); }

/* Hero */
.dmh-hero { padding: clamp(28px, 5vw, 56px) 0 0; background: linear-gradient(180deg, #fff 0%, var(--dmh-sand) 100%); }
.dmh-hero__inner { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 992px) {
    .dmh-hero__inner { grid-template-columns: 1fr 1.05fr; }
    /* The category bar (.category-menu-wrapper, 82px) hangs absolutely under the header from 992px. */
    .dmh-hero { padding-top: calc(82px + clamp(28px, 4vw, 48px)); }
}
.dm-home .dmh-hero h1 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.1; font-weight: 600; margin: 0 0 16px; }
.dmh-hero__media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--dmh-radius); }
.dmh-searchbox { position: relative; margin: 0 0 16px; }
.dmh-search { display: flex; align-items: stretch; height: 58px; background: #fff; border: 2px solid var(--dmh-ink); border-radius: 12px; overflow: hidden; }
.dmh-search:focus-within { box-shadow: 0 0 0 4px rgb(154 204 47 / .35); }
.dmh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 18px; font-size: 17px; }
.dmh-search input::-webkit-search-cancel-button { cursor: pointer; }
.dmh-search button { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; border-left: 2px solid var(--dmh-ink); background: var(--dmh-green); color: #1d2a05; font-weight: 600; font-size: 16px; padding: 0 24px; }
.dmh-search button .fa { font-size: 19px; }
.dmh-search button:hover { background: #86b524; }

/* Suggestions */
.dmh-suggest { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 520px); overflow-y: auto; background: #fff; border: 1px solid var(--dmh-line); border-radius: 12px; box-shadow: 0 18px 40px rgb(40 35 30 / .14); }
.dmh-suggest[hidden] { display: none; }
.dmh-suggest__list { list-style: none; margin: 0; padding: 6px; }
.dm-home .dmh-suggest__list a { display: flex; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--dmh-ink); text-decoration: none; }
.dm-home .dmh-suggest__list a:hover, .dm-home .dmh-suggest__list a:focus { background: #f2f7e6; outline: 0; }
.dm-home .dmh-suggest__list img { flex: none; width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--dmh-line); border-radius: 8px; padding: 3px; }
.dmh-suggest__title { display: block; font-size: 15px; line-height: 1.3; }
.dmh-suggest__code { display: block; font-size: 13px; color: var(--dmh-muted); margin-top: 2px; }
.dm-home .dmh-suggest__all { display: block; padding: 12px 16px; border-top: 1px solid var(--dmh-line); font-weight: 600; color: var(--dmh-green-ink); text-decoration: none; position: sticky; bottom: 0; background: #fff; }
.dm-home .dmh-suggest__all:hover, .dm-home .dmh-suggest__all:focus { background: #f2f7e6; }
.dmh-suggest__empty { margin: 0; padding: 16px; color: var(--dmh-muted); font-size: 15px; }
.dm-home .dmh-suggest__empty a { color: var(--dmh-green-ink); font-weight: 600; }
.dmh-trust { list-style: none; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: clamp(28px, 4vw, 48px) auto 0; padding-top: 24px; padding-bottom: 28px; border-top: 1px solid var(--dmh-line); }
.dmh-trust li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--dmh-muted); }
.dmh-trust strong { display: block; color: var(--dmh-ink); font-weight: 600; }
.dmh-trust .fa { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--dmh-green-ink); display: grid; place-items: center; font-size: 17px; border: 1px solid var(--dmh-line); }

/* Section heads */
.dmh-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.dmh-head--center { justify-content: center; text-align: center; }
.dm-home .dmh-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; margin: 0; }
.dm-home .dmh-more { color: var(--dmh-ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--dmh-green); padding-bottom: 2px; }
.dm-home .dmh-more:hover { color: var(--dmh-green-ink); }

/* Category tiles */
.dmh-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 768px) { .dmh-cats { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; } }
.dm-home .dmh-cats a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--dmh-line); border-radius: var(--dmh-radius); overflow: hidden; color: var(--dmh-ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.dm-home .dmh-cats a:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgb(40 35 30 / .09); }
.dmh-cats__img { position: relative; display: block; aspect-ratio: 4 / 3; background: #fafaf8; }
.dm-home .dmh-cats__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.dmh-cats__name { padding: 12px 14px 14px; font-weight: 600; font-size: 15px; line-height: 1.3; }

/* Products */
.dmh-products { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .dmh-products { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.dm-home .dmh-products a { display: flex; flex-direction: column; height: 100%; color: var(--dmh-ink); text-decoration: none; }
.dmh-products__img { position: relative; display: block; aspect-ratio: 1; background: #fff; border: 1px solid var(--dmh-line); border-radius: var(--dmh-radius); overflow: hidden; }
.dm-home .dmh-products__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .2s; }
.dm-home .dmh-products a:hover img { transform: scale(1.04); }
.dmh-products__title { margin: 12px 0 6px; font-size: 15px; line-height: 1.35; flex: 1; }
.dmh-products__title strong { display: block; font-size: 17px; font-weight: 600; }
.dmh-products__title span { display: block; color: var(--dmh-muted); font-size: 14px; margin-top: 2px; }
.dmh-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #1d2a05; color: #e6f5c2; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.dmh-badge .fa { color: var(--dmh-green); }
.dmh-products__cta { font-size: 14px; font-weight: 600; color: var(--dmh-green-ink); }

/* Carousel kept from the CMS (Diaporama in the back office) */
.dmh-carousel { padding-bottom: clamp(40px, 6vw, 72px); }
.dmh-carousel #carousel-homepage { border-radius: var(--dmh-radius); overflow: hidden; }
.dmh-carousel #carousel-homepage .item { position: relative; height: clamp(320px, 38vw, 500px); background-position: center !important; }
.dmh-carousel .slide-text { left: 6%; width: auto; max-width: min(460px, 88%); }
.dmh-carousel .slide-text .slide-overlay { padding: clamp(20px, 3vw, 40px); border-radius: var(--dmh-radius); background: rgb(20 24 20 / .72); }
.dm-home .dmh-carousel .slide-text h2.owl-title { color: #fff; font-size: clamp(22px, 2.4vw, 32px); margin: 0 0 8px; }
.dm-home .dmh-carousel .slide-text a { background: var(--dmh-green); border-color: var(--dmh-green); color: #1d2a05; text-transform: none; font-weight: 600; border-radius: 999px; }
@media (max-width: 767px) { .dmh-carousel .slide-text { left: 16px; right: 16px; width: auto; max-width: none; } }

/* Studio */
.dmh-studio { background: #1f2420; color: #e9ece6; }
.dmh-studio__inner { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 992px) { .dmh-studio__inner { grid-template-columns: 1.1fr 1fr; } }
.dmh-studio__media img { display: block; width: 100%; border-radius: var(--dmh-radius); aspect-ratio: 3 / 2; object-fit: cover; }
.dm-home .dmh-studio h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); font-weight: 600; margin: 0 0 14px; }
.dmh-studio .dmh-eyebrow { color: var(--dmh-green); }
.dmh-studio p { color: #cfd5cb; font-size: 17px; }
.dm-home .dmh-studio .dmh-btn:not(.dmh-btn--primary) { border-color: #fff; color: #fff; }
.dm-home .dmh-studio .dmh-btn:not(.dmh-btn--primary):hover { background: #fff; color: var(--dmh-ink); }

/* Business account */
.dmh-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dmh-benefits li { background: #fff; border-radius: var(--dmh-radius); padding: 24px; border: 1px solid var(--dmh-line); }
.dmh-benefits .fa { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #f0f7e0; color: var(--dmh-green-ink); font-size: 19px; margin-bottom: 14px; }
.dm-home .dmh-benefits h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.dmh-benefits p { margin: 0; color: var(--dmh-muted); font-size: 15px; }

/* Client logos */
.dmh-logos { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px clamp(28px, 5vw, 56px); }
.dmh-logos img { display: block; height: 40px; width: auto; max-width: 40vw; filter: grayscale(1); opacity: .85; transition: filter .2s, opacity .2s; }
.dmh-logos li:hover img { filter: none; opacity: 1; }

/* Contact */
.dmh-contact { background: var(--dmh-green-ink); color: #fff; }
.dmh-contact__inner { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.dm-home .dmh-contact h2 { color: #fff; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; margin: 0 0 8px; }
.dmh-contact p { margin: 0; color: #eef5df; max-width: 640px; }
.dm-home .dmh-contact .dmh-btn--primary { background: #fff; border-color: #fff; color: var(--dmh-ink); }
.dm-home .dmh-contact .dmh-btn--primary:hover { background: #f0f0f0; }

@media (max-width: 767px) {
    .dmh-search { height: 54px; }
    .dmh-search button { padding: 0 18px; }
    .dmh-search__label { display: none; }
    .dm-home .dmh-btn { width: 100%; justify-content: center; }
}
