/* Početna: hero, usluge, zašto ZETRA, česta pitanja (prefiks hm-).
   Tokeni iz site.css, zajedničke komponente iz sales.css. */

/* ---------- Hero ---------- */
.hm-hero { padding-block: clamp(2rem, 1rem + 3vw, 4rem) clamp(3rem, 2rem + 3vw, 5rem); }
.hm-hero-layout { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
.hm-hero-copy h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.08; max-width: 15ch; margin-bottom: 1.1rem; }
.hm-hero-copy h1 span { color: var(--ui-link); }
.hm-hero-lead { color: var(--ui-muted); font-size: var(--t-lg); max-width: 44ch; margin: 0; }
.hm-hero-visual { position: relative; padding: 0 0 3rem 0; }
.hm-hero-photo { width: 88%; margin-left: auto; }
.hm-hero-screen { position: absolute; left: 0; bottom: 0; width: 56%; }
@media (prefers-reduced-motion: no-preference) {
    .hm-hero-copy, .hm-hero-photo { animation: hm-rise 0.8s var(--ease) both; }
    .hm-hero-photo { animation-delay: 0.1s; }
    .hm-hero-screen { animation: hm-rise 0.9s var(--ease) 0.3s both; }
}
@keyframes hm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Usluge (4 ćelije, asimetrično) ---------- */
.hm-services { margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(170px, auto); gap: 1rem; }
.hm-service {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    padding: clamp(1.15rem, 0.9rem + 0.8vw, 1.6rem);
    color: var(--ui-text); text-decoration: none;
    background: var(--ui-bg); border: 1px solid var(--ui-border); border-radius: var(--r-card);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.hm-service:hover { color: var(--ui-text); border-color: var(--ui-border-strong); box-shadow: var(--ui-shadow); transform: translateY(-2px); }
.hm-service h3 { font-size: var(--t-lg); display: flex; align-items: center; gap: 0.6rem; }
.hm-service h3 i { color: var(--ui-link); width: 1.2rem; text-align: center; }
.hm-service p { color: var(--ui-muted); font-size: var(--t-sm); margin-bottom: 1rem; }
.hm-link { margin-top: auto; color: var(--ui-link); font-weight: 600; font-size: var(--t-sm); display: inline-flex; align-items: center; gap: 0.4rem; }

.hm-service-wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.hm-service-wide .hm-service-copy { display: flex; flex-direction: column; height: 100%; }
.hm-service-wide img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-control); max-height: 260px; }

.hm-service-accent { background: var(--ui-accent); border-color: var(--ui-accent); color: var(--ui-on-accent); }
.hm-service-accent:hover { color: var(--ui-on-accent); border-color: var(--ui-accent-hover); }
.hm-service-accent h3, .hm-service-accent h3 i, .hm-service-accent p, .hm-service-accent .hm-link { color: var(--ui-on-accent); }

.hm-service-erp { grid-column: span 2; }
.hm-service-erp .s-browser { margin-top: 1rem; box-shadow: var(--ui-shadow); }
.hm-service-erp .hm-link { margin-top: 0; }
.hm-service-erp .s-browser img { max-height: 250px; object-fit: cover; object-position: top left; }

/* Kratke činjenice u uskim ćelijama (SABAH, Fleet) */
.hm-service-meta { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: var(--t-sm); }
.hm-service-meta li { display: flex; align-items: baseline; gap: 0.55rem; padding: 0.6rem 0; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.hm-service-meta li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.hm-service-meta i { width: 1.1rem; text-align: center; }

.hm-service-rail { background: var(--ui-rail); border-color: var(--ui-rail); }
.hm-service-rail h3, .hm-service-rail h3 i { color: #ffffff; }
.hm-service-rail p { color: var(--ui-rail-muted); }
.hm-service-rail:hover { color: #ffffff; }
.hm-service-rail .hm-service-meta { color: #ffffff; }
.hm-service-rail .hm-service-meta i { color: var(--ui-link); }
.hm-service-rail .hm-service-meta li { border-color: rgba(255, 255, 255, 0.12); }

/* ---------- Zašto ZETRA ---------- */
.hm-why { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start; }
.hm-why-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2.5rem; }
.hm-why-list div { padding-top: 1rem; border-top: 2px solid var(--ui-accent); }
.hm-why-list dt { font-weight: 600; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.55rem; }
.hm-why-list dt i { color: var(--ui-link); }
.hm-why-list dd { margin: 0; color: var(--ui-muted); font-size: var(--t-sm); }

/* ---------- Česta pitanja ---------- */
.hm-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: start; }
.hm-faq-intro { position: sticky; top: calc(var(--header-height) + 1.5rem); }
.hm-faq-mail { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: var(--t-sm); }
.hm-faq-mail i { color: var(--ui-link); margin-right: 0.35rem; }
.hm-faq-list { border-top: 1px solid var(--ui-border); }
.hm-faq-list details { border-bottom: 1px solid var(--ui-border); }
.hm-faq-list summary {
    list-style: none; cursor: pointer; position: relative;
    padding: 1.15rem 3rem 1.15rem 0.25rem; font-weight: 600; font-size: var(--t-base);
}
.hm-faq-list summary::-webkit-details-marker { display: none; }
.hm-faq-list summary::before, .hm-faq-list summary::after {
    content: ""; position: absolute; right: 0.9rem; top: 50%; width: 14px; height: 2px;
    background: var(--ui-accent); border-radius: 2px; transition: transform 0.25s var(--ease);
}
.hm-faq-list summary::after { transform: rotate(90deg); }
.hm-faq-list details[open] summary::after { transform: rotate(0deg); }
.hm-faq-list summary:hover { color: var(--ui-link); }
.hm-faq-list details p { margin: 0 0 1.25rem 0.25rem; color: var(--ui-muted); max-width: 62ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hm-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-service-wide, .hm-service-erp { grid-column: span 2; }
}
@media (max-width: 991px) {
    .hm-hero-layout, .hm-why, .hm-faq { grid-template-columns: minmax(0, 1fr); }
    .hm-faq-intro { position: static; }
}
@media (max-width: 767px) {
    .hm-services { grid-template-columns: minmax(0, 1fr); }
    .hm-service-wide, .hm-service-erp { grid-column: auto; }
    .hm-service-wide { grid-template-columns: minmax(0, 1fr); }
    .hm-why-list { grid-template-columns: minmax(0, 1fr); }
    .hm-hero-visual { padding-bottom: 2rem; }
    .hm-hero-photo { width: 100%; }
    .hm-hero-screen { width: 62%; bottom: -0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hm-hero-copy, .hm-hero-photo, .hm-hero-screen { animation: none !important; }
    .hm-service, .hm-faq-list summary::before, .hm-faq-list summary::after { transition: none; }
}
