/* Homepage. Uses the shared tokens from style.css. */

/* The homepage uses roomier spacing than other pages. */
main>section.wrap{margin:var(--fa-space-8) auto}
@media(max-width:750px){main>section.wrap{margin:var(--fa-space-7) auto}}

/* Hero: text on the left, cover photo on the right (below the text on phones). */
.home-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:var(--fa-space-7);align-items:center;margin-top:var(--fa-space-7);margin-bottom:var(--fa-space-8)}
.home-hero h1{margin-top:var(--fa-space-3)}
/* Less empty space above "Second-hand" (owner's request, 15. 11. 2026): a small top margin, and the text starts at the top of the photo. */
main>section.home-hero{margin-top:var(--fa-space-5)}
.home-hero-text{align-self:start;padding-top:var(--fa-space-4)}
.home-hero-text h1{margin-top:0}
/* Izlog and Istaknuto follow the hero closely, 32px apart, just as the title sits close to the header (owner's request, 15. 11. 2026). */
main>section.home-hero{margin-bottom:var(--fa-space-6)}
main>section.promo-public{margin-top:var(--fa-space-6);margin-bottom:var(--fa-space-6)}
.home-lead{font-size:var(--fa-text-lg);color:var(--fa-ink-soft);max-width:34rem;margin:0 0 var(--fa-space-5)}
.home-actions{display:flex;gap:var(--fa-space-3);flex-wrap:wrap}
.home-hero-photo{margin:0}
.home-hero-photo img{display:block;width:100%;height:auto;aspect-ratio:3 / 2;object-fit:cover;object-position:35% 40%;border-radius:var(--fa-radius-lg);background:var(--fa-rose-soft);box-shadow:var(--fa-shadow)}
.home-hero-photo figcaption{margin-top:var(--fa-space-3);color:var(--fa-ink-soft);font:italic 400 var(--fa-text-lg)/1.3 var(--fa-font-serif);text-align:center}

/* Section heading with a text link on the right. */
.home-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:var(--fa-space-4);margin-bottom:var(--fa-space-5)}
.home-section-head h2{margin:0}
.home-section-head .muted{margin:6px 0 0}
.home-section-head .link{white-space:nowrap}

/* Category tiles: a fixed line icon per category in the brand rose, name below. */
.home-categories{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:var(--fa-space-3)}
.home-category{position:relative;display:flex;flex-direction:column;align-items:stretch;aspect-ratio:3 / 4;border-radius:var(--fa-radius);overflow:hidden;background:#fdf6f8;border:1px solid var(--fa-line);isolation:isolate}
/* Category photos (owner's images): fill the card above the name; a two-line name only shrinks the photo. */
.home-category-icon{flex:1 1 auto;min-height:0;overflow:hidden}
.home-category-icon img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s}
.home-category:hover .home-category-icon img,.home-category:focus-visible .home-category-icon img{transform:scale(1.05)}
.home-category-name{display:block;width:100%;padding:var(--fa-space-3) var(--fa-space-4);font:400 22px/1.15 var(--fa-font-serif);color:var(--fa-ink)}

/* How it works: three steps on a soft background. */
.home-how{background:var(--fa-rose-wash);padding:var(--fa-space-8) 0;margin:var(--fa-space-8) 0}
.home-how h2{text-align:center;margin-bottom:var(--fa-space-6)}
.home-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--fa-space-6);counter-reset:none}
.home-steps li{text-align:center;padding:0 var(--fa-space-3)}
.home-step-no{display:inline-grid;place-items:center;width:52px;height:52px;border-radius:50%;border:1px solid var(--fa-rose-mid);font:400 26px/1 var(--fa-font-serif);color:var(--fa-rose);margin-bottom:var(--fa-space-3)}
.home-steps p{color:var(--fa-ink-soft);margin:0 auto;max-width:30ch}

/* Trust row. */
.home-trust{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--fa-space-5)}
.home-trust-item{display:flex;gap:var(--fa-space-4);align-items:flex-start}
.home-trust-item svg{flex:0 0 28px;width:28px;height:28px;fill:none;stroke:var(--fa-rose);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin-top:2px}
.home-trust-item h3{font:600 var(--fa-text-base)/1.3 var(--fa-font-sans);margin:0 0 4px}
.home-trust-item p{margin:0;color:var(--fa-ink-soft);font-size:var(--fa-text-sm)}

@media(max-width:980px){
 .home-categories{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
 .home-hero{grid-template-columns:1fr;gap:var(--fa-space-6);margin-top:var(--fa-space-5)}
 .home-hero-photo img{aspect-ratio:4 / 3}
 .home-steps,.home-trust{grid-template-columns:1fr;gap:var(--fa-space-5)}
 .home-steps li{display:grid;grid-template-columns:52px 1fr;column-gap:var(--fa-space-4);text-align:left;padding:0}
 .home-step-no{grid-row:1 / 3;margin:0}
 .home-steps h3{margin:4px 0 2px}
 .home-steps p{margin:0}
}
@media(max-width:560px){
 /* Phones: smaller tiles, three in a row (owner, 18. 11. 2026). */
 .home-categories{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .home-category{aspect-ratio:4 / 5;border-radius:12px}
 .home-category-name{padding:6px 8px 8px;font-size:15px;line-height:1.15}
 .home-how{padding:var(--fa-space-7) 0}
 .home-actions .btn{flex:1 1 auto}
}

@media(min-width:981px){.home-category-name{font-size:17px;padding:var(--fa-space-3)}}


/* Automoto i Nekretnine in the top block instead of the founder photo (owner, 18. 11. 2026). */
.home-hero-og{align-self:center;min-width:0}
.home-hero-og-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
/* Computer too: a compact card, picture beside the text (owner, 18. 11. 2026: the big cards were too large). */
/* A little bigger again (owner, 18. 11. 2026). */
.home-hero-og-card{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;border:1px solid var(--fa-line);border-radius:16px;background:#fff;color:var(--fa-ink);text-decoration:none}
.home-hero-og-card img{display:block;flex:none;width:100%;height:auto;aspect-ratio:4 / 3;border-radius:0;object-fit:cover;background:var(--fa-rose-soft)}
.home-hero-og-card span{display:grid;gap:4px;min-width:0;padding:12px 14px 14px}
.home-hero-og-card strong{font:500 24px/1.15 var(--fa-font-serif)}
.home-hero-og-card small{color:var(--fa-ink-soft);font-size:14px;line-height:1.4}
.home-hero-og-card:hover,.home-hero-og-card:active{border-color:var(--fa-accent)}
.home-hero-og-card:hover strong,.home-hero-og-card:active strong{color:var(--fa-accent)}
@media(max-width:560px){
 /* Phones: two slim cards, a small picture beside the name (owner, 18. 11. 2026). */
 .home-hero-og-grid{gap:8px}
 .home-hero-og-card{border-radius:14px}
 .home-hero-og-card span{padding:8px 10px 10px;min-width:0}
 .home-hero-og-card strong{font-size:19px}
 .home-hero-og-card small{display:none}
}

/* Computer: everything on Početna a size smaller (owner, 18. 11. 2026: "preveliko je sve skupa"). */
@media(min-width:821px){
 .home-hero-text h1{font-size:clamp(40px,4vw,52px)}
 .home-lead{font-size:16px;margin-bottom:var(--fa-space-4)}
 main>section.wrap{margin:var(--fa-space-7) auto}
 .home-section-head{margin-bottom:var(--fa-space-4)}
 .home-section-head h2,.home-how h2{font-size:32px}
 .home-how{padding:var(--fa-space-7) 0}
}
@media(min-width:981px){
 .home-categories{gap:10px}
 .home-category{aspect-ratio:1 / 1.1;border-radius:12px}
 .home-category-name{padding:8px 10px;font-size:15px}
}

/* Phones and the app: smaller category tiles and Automoto/Nekretnine pictures (owner, 18. 11. 2026); computers unchanged. */
@media(max-width:560px){
 .home-categories{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .home-category{aspect-ratio:1 / 1;border-radius:10px}
 .home-category-name{padding:3px 7px 5px;font-size:13px;line-height:1.15}
 .home-hero-og-card img{aspect-ratio:16 / 9;object-fit:contain;background:#fcf3f5}
 .home-hero-og-card span{padding:6px 10px 8px}
 .home-hero-og-card strong{font-size:17px}
}
