/* v2 public home — Občina Ljutomer */

body.v2-home-body {
  margin: 0;
  background: #f9fafb;
  overflow-x: hidden;
}

.v2-home,
.v2-home * {
  font-family: "Be Vietnam Pro", sans-serif !important;
  box-sizing: border-box;
}

.v2-home {
  --v2-green: #198754;
  --v2-black: #212529;
  --v2-grey: #7d7d7d;
  --v2-bg: #f9fafb;
  --v2-white: #ffffff;
  --v2-danger: #dc3545;
  --v2-warning: #ffbe00;
  --v2-shadow: 0 10px 26px rgba(0, 0, 0, 0.15);
  --v2-radius: 25px;
  --v2-max: 1300px;
  --v2-gutter: 1.25rem;

  background: var(--v2-bg);
  color: var(--v2-black);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

.v2-home a {
  text-decoration: none;
  color: inherit;
}

.v2-container {
  width: min(100% - (var(--v2-gutter) * 2), var(--v2-max));
  margin-inline: auto;
}

/* Header */
.v2-header {
  padding: 1.5rem 0 1rem;
}

.v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.v2-brand__logo {
  width: 46px;
  height: 55px;
  object-fit: contain;
  display: block;
}

.v2-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: #000;
  font-size: 1.04rem;
}

.v2-brand__text strong {
  font-weight: 700;
}

/* Hero */
.v2-hero {
  padding: 2.5rem 0 2rem;
}

.v2-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 22ch;
}

.v2-hero__lead {
  margin: 0;
  max-width: 28rem;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--v2-black);
}

/* Stats */
.v2-stats {
  margin: 2.5rem auto 3.5rem;
  background: var(--v2-green);
  color: var(--v2-white);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  padding: 2.5rem 2rem 2.75rem;
}

.v2-stats__title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v2-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  justify-items: center;
  text-align: left;
}

.v2-stats__value {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.v2-stats__label {
  margin: 0.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.2;
  max-width: 7rem;
}

/* Section titles */
.v2-section-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v2-black);
}

/* Featured */
.v2-featured {
  padding-bottom: 3.5rem;
}

.v2-featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

.v2-card {
  background: var(--v2-white);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  color: inherit;
  text-decoration: none;
}

a.v2-card:hover .v2-card__cta,
a.v2-card:focus-visible .v2-card__cta {
  text-decoration: underline;
}

a.v2-card:focus-visible {
  outline: 2px solid var(--v2-green);
  outline-offset: 3px;
}

.v2-card--hero {
  grid-column: 1 / span 2;
  grid-row: 1;
  flex-direction: row;
  min-height: 422px;
}

.v2-card--side {
  grid-column: 3;
  grid-row: 1;
  min-height: 422px;
}

.v2-card__media {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.v2-card--hero .v2-card__media {
  width: 46%;
  min-height: 100%;
}

.v2-card--side .v2-card__media,
.v2-card--stack .v2-card__media {
  width: 100%;
  height: 205px;
}

.v2-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v2-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.v2-card__media--placeholder img {
  width: auto;
  height: auto;
  max-width: 40%;
  max-height: 55%;
  object-fit: contain;
}

.v2-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
}

.v2-card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.v2-card--hero .v2-card__body {
  width: 54%;
  justify-content: center;
  padding: 2rem 2rem 2rem 1.5rem;
}

.v2-card__category {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v2-grey);
}

.v2-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--v2-black);
}

.v2-card--hero .v2-card__title {
  font-size: 1.75rem;
}

.v2-card--stack .v2-card__title {
  font-size: 1.5rem;
}

.v2-card__meta {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--v2-grey);
}

.v2-card__meta strong {
  color: var(--v2-black);
  font-weight: 700;
}

.v2-card__meta .sep {
  font-weight: 600;
  margin: 0 0.15rem;
}

.v2-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--v2-green);
  font-size: 1rem;
  font-weight: 600;
  padding-top: 0.75rem;
}

.v2-card__cta img {
  width: 20px;
  height: 16px;
  display: block;
  transform: rotate(180deg);
}

/* Status pills */
.v2-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  padding: 0 15px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v2-white);
  line-height: 1.1;
  white-space: nowrap;
}

.v2-pill--finished {
  background: var(--v2-danger);
}

.v2-pill--progress {
  background: var(--v2-green);
}

.v2-pill--planned {
  background: var(--v2-warning);
}

/* Search panel */
.v2-search {
  margin: 0 auto 2.5rem;
  background: var(--v2-green);
  color: var(--v2-white);
  border-radius: var(--v2-radius);
  box-shadow: var(--v2-shadow);
  padding: 2rem 2.5rem 2.25rem;
}

.v2-search__title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.v2-search__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

.v2-search__filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(14rem, 1.4fr);
  gap: 0.9rem;
  width: 100%;
}

.v2-search__cats-label {
  display: block;
  margin: 0 0 0.85rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--v2-white);
}

.v2-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--v2-white);
  border-radius: 10px;
  background: transparent;
}

.v2-field--search {
  padding-left: 3rem;
}

.v2-field__icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 31px;
  height: 31px;
  overflow: hidden;
}

.v2-field__icon img {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleX(-1);
}

.v2-field__input,
.v2-field__select {
  width: 100%;
  height: 52px;
  border: 0;
  background: transparent;
  color: var(--v2-white);
  font-size: 1.125rem;
  font-weight: 500;
  padding: 0 1rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.v2-field__select {
  padding-right: 2.25rem;
  cursor: pointer;
}

.v2-field__select option {
  color: var(--v2-black);
  background: var(--v2-white);
}

.v2-field__input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.v2-field__chevron {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
}

.v2-field__chevron img {
  width: 100%;
  height: 100%;
  display: block;
}

.v2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.v2-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--v2-white);
  background: transparent;
  color: var(--v2-white);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.v2-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.v2-chip--active {
  background: var(--v2-white);
  border-color: var(--v2-white);
  color: #0f5132;
  font-weight: 700;
}

.v2-chip--active .v2-chip__label {
  color: #0f5132;
}

.v2-chip__label {
  color: inherit;
}

.v2-chip__close {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

/* Results */
.v2-results {
  padding-bottom: 4rem;
}

.v2-results__title {
  margin: 0 0 1.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.1;
}

.v2-table-wrap {
  overflow-x: auto;
}

.v2-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.v2-table thead th {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-grey);
  text-align: left;
  border-bottom: 1px solid rgba(33, 37, 41, 0.08);
}

.v2-table tbody tr {
  background: var(--v2-bg);
}

.v2-table tbody tr:nth-child(odd) {
  background: #eaeaea;
}

.v2-table tbody td {
  padding: 1.1rem 1rem;
  vertical-align: middle;
  font-size: 1.125rem;
}

.v2-table__title {
  font-weight: 700;
  line-height: 1.1;
  color: var(--v2-black);
}

.v2-table__title:hover {
  color: var(--v2-green);
}

.v2-table__sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--v2-grey);
}

.v2-table__price {
  font-weight: 700;
  white-space: nowrap;
}

.v2-table__year {
  font-weight: 300;
}

.v2-empty {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--v2-grey);
}

.v2-mobile-list {
  display: none;
}

.v2-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50px;
  flex-shrink: 0;
}

.v2-dot--finished {
  background: var(--v2-danger);
}

.v2-dot--progress {
  background: var(--v2-green);
}

.v2-dot--planned {
  background: var(--v2-warning);
}

/* Footer */
.v2-footer {
  background: var(--v2-black);
  color: var(--v2-white);
  padding: 2rem 0;
}

.v2-footer p {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.45;
}

.v2-footer a {
  color: var(--v2-white);
  text-decoration: underline;
}

.v2-footer__cookies {
  margin-top: 0.85rem;
}

.v2-footer__cookies .cookiereset {
  display: inline-block;
  margin: 0;
}

.v2-footer__cookies .cookiereset__link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
}

.v2-footer__cookies .cookiereset__link:hover,
.v2-footer__cookies .cookiereset__link:focus {
  color: #fff;
}

/* Tablet */
@media (max-width: 1100px) {
  .v2-card--hero {
    grid-column: 1 / -1;
    flex-direction: column;
    min-height: 0;
  }

  .v2-card--hero .v2-card__media,
  .v2-card--hero .v2-card__body {
    width: 100%;
  }

  .v2-card--hero .v2-card__media {
    height: 240px;
    min-height: 0;
  }

  .v2-card--side {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .v2-featured__grid {
    grid-template-columns: 1fr 1fr;
  }

  .v2-search__row {
    grid-template-columns: 1fr;
  }

  .v2-search__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }
}

/* Mobile — matches Figma "mobile - home" (390px) */
@media (max-width: 767px) {
  .v2-home {
    --v2-gutter: 1.5625rem;
  }

  .v2-container {
    width: min(100% - (var(--v2-gutter) * 2), var(--v2-max));
  }

  .v2-header {
    padding: 1.6rem 0 0.5rem;
  }

  .v2-brand {
    gap: 0.85rem;
  }

  .v2-brand__logo {
    width: 40px;
    height: 47px;
  }

  .v2-brand__text {
    font-size: 0.89rem;
  }

  .v2-hero {
    padding: 2rem 0 1.25rem;
  }

  .v2-hero__title {
    margin-bottom: 1.25rem;
    font-size: 2.125rem;
    max-width: none;
  }

  .v2-hero__lead {
    max-width: none;
    font-size: 1.125rem;
  }

  .v2-hero__lead br {
    display: none;
  }

  .v2-hero__break {
    display: none;
  }

  .v2-stats {
    margin: 1.5rem auto 2.75rem;
    padding: 2.25rem 1.5rem 2.5rem;
  }

  .v2-stats__title {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    letter-spacing: 0.1em;
  }

  .v2-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 1.5rem;
    justify-items: start;
    padding: 0 1.25rem;
  }

  .v2-stats__value {
    font-size: 3.4rem;
  }

  .v2-stats__label {
    max-width: 6rem;
  }

  .v2-section-title {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
  }

  .v2-featured {
    padding-bottom: 2.5rem;
  }

  .v2-featured__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .v2-card,
  .v2-card--hero,
  .v2-card--side,
  .v2-card--stack {
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
    min-height: 0;
  }

  .v2-card--hero .v2-card__media,
  .v2-card--hero .v2-card__body,
  .v2-card--side .v2-card__media,
  .v2-card--stack .v2-card__media {
    width: 100%;
  }

  .v2-card__media,
  .v2-card--hero .v2-card__media,
  .v2-card--side .v2-card__media,
  .v2-card--stack .v2-card__media {
    height: 205px;
    min-height: 0;
  }

  .v2-card__body,
  .v2-card--hero .v2-card__body {
    padding: 1.15rem 1.15rem 1.35rem;
    justify-content: flex-start;
    overflow: visible;
  }

  .v2-card__title,
  .v2-card--hero .v2-card__title,
  .v2-card--stack .v2-card__title {
    font-size: 1.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .v2-card__cta {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding-top: 0.35rem;
    min-height: 44px;
  }

  .v2-search {
    margin-bottom: 2rem;
    padding: 2rem 1.2rem 1.75rem;
  }

  .v2-search__title {
    margin-bottom: 1.75rem;
    font-size: 1.125rem;
    letter-spacing: 0.08em;
  }

  .v2-search__row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .v2-search__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 0.75rem;
  }

  .v2-search__cats-label {
    display: block;
  }

  .v2-chips {
    gap: 0.55rem;
  }

  .v2-chip {
    min-height: 32px;
    padding: 0.3rem 1rem;
    font-size: 0.875rem;
  }

  .v2-field {
    min-height: 48px;
  }

  .v2-field__input,
  .v2-field__select {
    height: 48px;
    font-size: 1rem;
    font-weight: 500;
  }

  .v2-results {
    width: calc(100% + (var(--v2-gutter) * 2));
    max-width: none;
    margin-left: calc(var(--v2-gutter) * -1);
    margin-right: calc(var(--v2-gutter) * -1);
    padding: 0 0 3rem;
  }

  .v2-results__title {
    margin: 0 var(--v2-gutter) 1.25rem;
    font-size: 1.375rem;
  }

  .v2-empty {
    margin: 0 var(--v2-gutter);
  }

  .v2-table-wrap--desktop {
    display: none !important;
  }

  .v2-mobile-list {
    display: block;
  }

  .v2-mobile-list__head {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) minmax(6.75rem, 8.5rem);
    gap: 0.65rem;
    align-items: end;
    padding: 0 var(--v2-gutter) 0.65rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v2-grey);
  }

  .v2-mobile-list__col-name {
    grid-column: 2;
  }

  .v2-mobile-list__col-meta {
    text-align: right;
  }

  .v2-mobile-row {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) minmax(6.75rem, 8.5rem);
    gap: 0.65rem;
    align-items: start;
    padding: 0.85rem var(--v2-gutter);
    background: #eaeaea;
    color: inherit;
  }

  .v2-mobile-row:nth-child(even) {
    background: var(--v2-bg);
  }

  .v2-mobile-row .v2-dot {
    margin-top: 0.2rem;
  }

  .v2-mobile-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
  }

  .v2-mobile-row__title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--v2-black);
  }

  .v2-mobile-row__updated {
    font-size: 0.5625rem;
    font-weight: 300;
    color: var(--v2-grey);
  }

  .v2-mobile-row__category {
    margin-top: 0.35rem;
    font-size: 0.625rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--v2-black);
  }

  .v2-mobile-row__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    min-width: 0;
    text-align: right;
  }

  .v2-mobile-row__price {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .v2-mobile-row__year {
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.2;
    text-align: right;
  }

  .v2-footer {
    padding: 1.55rem 0;
  }

  .v2-footer p {
    font-size: 0.875rem;
  }
}

@media (max-width: 420px) {
  .v2-home {
    --v2-gutter: 1.25rem;
  }

  .v2-stats__grid {
    padding: 0 0.5rem;
  }

  .v2-search__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  }

  .v2-mobile-list__head,
  .v2-mobile-row {
    grid-template-columns: 14px minmax(0, 1fr) minmax(6.25rem, 7.75rem);
    gap: 0.5rem;
  }
}
