/* ==========================================================================
   Homepage — Editorial layout (Sprint 2 Phase 7)
   Source of truth for these patterns lives in /style-guide.
   Tokens come from assets/styles/app.css; nothing here is hardcoded.
   ========================================================================== */

/* Section titles & subtitles now live in components/section.css */

/* --------------------------------------------------------------------------
   1. Quick stats — section wrapper only; .stat-* lives in components/stat.css
   -------------------------------------------------------------------------- */
.quick-stats-section {
    background: var(--cream);
    padding: clamp(40px, 5vw, 64px) 0;
    border-bottom: 1px solid var(--hairline);
}

/* Stat strip layout in this section uses the canonical .stat-strip grid;
   homepage adds a 4-column override on desktop because the 4 stat items
   fit the brand header treatment. */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

@media (min-width: 768px) {
    .quick-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Section base — alternating cream / warm-white surfaces
   -------------------------------------------------------------------------- */
.seo-intro-section,
.neighborhoods-section,
.market-overview-section,
.property-types-section,
.location-section,
.seo-footer-section,
.featured-listings-section,
.articles-section,
.faq-section,
.popular-searches-section {
    padding: clamp(56px, 7vw, 96px) 0;
}

.seo-intro-section { background: var(--warm-white); border-bottom: 1px solid var(--hairline); }
.popular-searches-section { background: var(--cream); border-bottom: 1px solid var(--hairline); }
.featured-listings-section { background: var(--warm-white); border-bottom: 1px solid var(--hairline); }
.neighborhoods-section { background: var(--cream); border-bottom: 1px solid var(--hairline); }
.property-types-section { background: var(--warm-white); border-bottom: 1px solid var(--hairline); }
.market-overview-section { background: var(--cream); border-bottom: 1px solid var(--hairline); }
.articles-section { background: var(--warm-white); border-bottom: 1px solid var(--hairline); }
.location-section { background: var(--cream); border-bottom: 1px solid var(--hairline); }
.faq-section { background: var(--warm-white); border-bottom: 1px solid var(--hairline); }
.seo-footer-section { background: var(--cream); border-bottom: 1px solid var(--hairline); }

/* --------------------------------------------------------------------------
   SEO 2-column layout — text + contextual aside (fills the right rail)
   -------------------------------------------------------------------------- */
.seo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: start;
}

.seo-layout .seo-content {
    max-width: 65ch;
    min-width: 0;
}

@media (max-width: 880px) {
    .seo-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* ----- Side panel (aside) ---------------------------------------------- */
.seo-aside {
    position: relative;
    padding: clamp(24px, 3vw, 36px);
    background: var(--warm-white);
    border: 1px solid var(--hairline-strong);
    border-radius: 0;
}

.seo-aside::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--terracotta);
}

/* Spaced variant — adds top margin when aside sits below a grid (property types, neighborhoods) */
.seo-layout--spaced {
    margin-top: clamp(32px, 4vw, 56px);
}

.seo-aside__eyebrow {
    margin: 12px 0 16px;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--taupe);
}

.seo-aside__note {
    margin: 0 0 18px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink);
    opacity: 0.85;
}

.seo-aside__eyebrow--spaced {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
}

.seo-aside__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0 0 18px;
    border-top: 1px solid var(--hairline);
}

.seo-aside__stats--single {
    grid-template-columns: 1fr;
}

.seo-aside__stats > div {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
}

.seo-aside__stats--single > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.seo-aside__stats:not(.seo-aside__stats--single) > div + div {
    border-left: 1px solid var(--hairline);
    padding-left: 14px;
}

.seo-aside__stats:not(.seo-aside__stats--single) > div:first-child {
    padding-right: 14px;
}

.seo-aside__stats dt {
    margin: 0 0 6px;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--taupe);
    line-height: 1.4;
}

.seo-aside__stats--single dt {
    margin: 0;
}

.seo-aside__stats dd {
    margin: 0;
    font-family: var(--font-display);
    font-feature-settings: "tnum" 1;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--ink);
}

.seo-aside__stats--single dd {
    font-size: 1.25rem;
}

.seo-aside__stats-text {
    font-family: var(--font-display) !important;
    font-feature-settings: normal !important;
    font-size: 1rem !important;
    font-style: italic;
    color: var(--ink);
}

/* ----- Aside link list ------------------------------------------------- */
.seo-aside__links {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    border-top: 1px solid var(--hairline);
}

.seo-aside__links li {
    border-bottom: 1px solid var(--hairline);
    margin: 0;
}

.seo-aside__links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--ink);
    text-decoration: none;
    border: none;
    transition: color 0.2s, padding-left 0.2s;
}

.seo-aside__links a span[aria-hidden] {
    color: var(--terracotta);
    font-family: var(--font-display);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.seo-aside__links a:hover {
    color: var(--terracotta);
    padding-left: 6px;
}

.seo-aside__links a:hover span[aria-hidden] {
    transform: translateX(4px);
}

/* Card-style link list (used in footer section) */
.seo-aside__links--cards {
    border-top: none;
}

.seo-aside__links--cards li {
    border-bottom: 1px solid var(--hairline);
}

.seo-aside__links--cards li:first-child {
    border-top: 1px solid var(--hairline);
}

.seo-aside__links--cards a {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 0;
}

.seo-aside__links--cards a:hover {
    padding-left: 6px;
}

.seo-aside__link-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.3;
}

.seo-aside__links--cards a:hover .seo-aside__link-title {
    color: var(--terracotta);
}

.seo-aside__link-meta {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--taupe);
}

/* .seo-aside__cta is now a layout-only hook applied alongside .btn .btn-primary/.btn-outline
   so context spacing (width:100%, font-size override for caps) stays here. */

/* --------------------------------------------------------------------------
   Prose — editorial reading layout for SEO content blocks
   -------------------------------------------------------------------------- */
.seo-content.prose {
    max-width: 65ch;
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink);
}

.seo-content.prose p {
    margin: 0 0 1.25rem;
    text-align: left;
}

.seo-content.prose p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.6em;
    line-height: 0.9;
    padding-right: 0.05em;
    color: var(--terracotta);
}

.seo-content.prose p:last-child {
    margin-bottom: 0;
}

.seo-content.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.seo-content.prose a {
    color: var(--terracotta);
    text-decoration: none;
    border-bottom: 1px solid var(--terracotta);
    transition: color 0.2s, border-color 0.2s;
}

.seo-content.prose a:hover {
    color: var(--terracotta-d);
    border-color: var(--terracotta-d);
}

.seo-content.prose h2,
.seo-content.prose h3 {
    margin: 2rem 0 0.75rem;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.2;
}

.seo-content.prose h2 { font-size: 1.65rem; }
.seo-content.prose h3 { font-size: 1.3rem; }

.seo-content.prose ul,
.seo-content.prose ol {
    margin: 0 0 1.25rem 1.25rem;
    padding: 0;
}

.seo-content.prose li {
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Popular searches — caps tracking-wide tag grid
   -------------------------------------------------------------------------- */
.popular-searches-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0;
    border-top: 1px solid var(--hairline);
    border-left: 1px solid var(--hairline);
}

.popular-search-item {
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.popular-search-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: background-color 0.2s, color 0.2s;
}

.popular-search-link:hover {
    background: var(--warm-white);
    color: var(--terracotta);
}

.popular-search-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    color: var(--taupe);
    font-size: 0.7rem;
    transition: border-color 0.2s, color 0.2s;
}

.popular-search-link:hover .popular-search-icon {
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.popular-search-label {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Featured ads — editorial card grid
   -------------------------------------------------------------------------- */
/* .ads-grid now lives in components/ads-grid.css — only context margin here */
.featured-listings-section .ads-grid { margin-bottom: 40px; }

.featured-listings-section .ad-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.featured-listings-section .ad-card:hover {
    transform: translateY(-3px);
}

.featured-listings-section .ad-image,
.featured-listings-section .ad-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--paper);
    margin-bottom: 16px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.featured-listings-section .ad-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hairline-strong);
    font-size: 2rem;
}

.featured-listings-section .ad-info h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--ink);
}

.featured-listings-section .ad-price {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-feature-settings: "tnum" 1;
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    color: var(--terracotta);
}

.featured-listings-section .ad-location {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--taupe);
}

/* Homepage "Najtraženija naselja" → canonical .place-card iz components/place-card.css.
   Grid je .place-card-grid (auto-fill minmax 280px), kartica je .place-card. */

/* --------------------------------------------------------------------------
   Property types — flat editorial cards
   -------------------------------------------------------------------------- */
.property-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-bottom: 40px;
    border-top: 1px solid var(--hairline);
    border-left: 1px solid var(--hairline);
}

@media (min-width: 768px) {
    .property-types-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.property-type-card {
    padding: 28px 22px;
    background: transparent;
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    text-align: left;
    transition: background-color 0.2s;
}

.property-type-card:hover {
    background: var(--cream);
    transform: none;
    box-shadow: none;
}

.property-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border: 1px solid var(--hairline-strong);
    border-radius: 50%;
    color: var(--terracotta);
    font-size: 1rem;
}

.property-type-card h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--ink);
}

.property-type-card p {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink);
    opacity: 0.78;
}

/* --------------------------------------------------------------------------
   Articles teaser — editorial cards
   -------------------------------------------------------------------------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(20px, 2.5vw, 32px);
    margin-bottom: 40px;
}

.article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: none;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-3px);
}

.article-image,
.article-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--paper);
    margin-bottom: 16px;
    overflow: hidden;
}

.article-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hairline-strong);
    font-size: 2rem;
}

.article-info h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--ink);
}

.article-excerpt {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink);
    opacity: 0.78;
}

/* FAQ accordion now uses the shared .accordion component
   (assets/styles/components/accordion.css). The .faq-section wrapper
   below still controls the cream/warm-white band; the accordion itself
   pulls from the shared component. */

/* .cta-section now lives in components/cta.css */

/* --------------------------------------------------------------------------
   "Pogledaj sve" link below grids (text-center mt-6)
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.mt-6 { margin-top: clamp(20px, 2.5vw, 32px); }
.mt-8 { margin-top: clamp(28px, 3vw, 40px); }

.featured-listings-section .btn,
.articles-section .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: 4px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.featured-listings-section .btn:hover,
.articles-section .btn:hover {
    background: var(--ink);
    color: var(--cream);
    filter: none;
}

/* --------------------------------------------------------------------------
   Mobile polish
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .section-title { font-size: 1.6rem; }
    .stat-number { font-size: 1.85rem; }
    .stat-item { padding: 22px 18px; }
    .property-types-grid { grid-template-columns: 1fr; }
    .property-type-card { padding: 22px 18px; }
}
