/************************************************************
 * AGRITEC – HOMEPAGE (FINÁLNÍ VIZUÁL)
 ************************************************************/

:root {
  --clr-brand-blue: #102a83;
  --clr-brand-green: #2c6e49;
  --clr-brand-orange: #d97706;

  --clr-ink-600: #475569;
  --clr-ink-300: #cbd5e1;

  --clr-surface: #ffffff;
  --clr-line: #e6e6e6;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.25);

  --overlay-dark-1: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55));

  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-40: 40px;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 12px;

  --wrap: 1320px;
}

/* HERO */
.hp-hero {
  height: clamp(260px, 45vw, 420px);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--sp-40);
  isolation: isolate;
}

.hp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-dark-1);
}

.hp-hero-inner {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
}

.hp-hero h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  margin-bottom: var(--sp-24);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.btn-hero {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .2);
  border-radius: var(--radius-sm);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* HLAVNÍ 3 KARTY */
.home-main-cards {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-40) var(--sp-16);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-24);
}

.home-main-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: clamp(220px, 28vw, 300px);
  background-size: cover;
  background-position: center;
  padding: var(--sp-32);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}

.home-main-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-dark-1);
  z-index: 0;
}

.card-blue::before {
  background: linear-gradient(180deg, rgba(16, 42, 131, .25), rgba(16, 42, 131, .65));
}

.card-green::before {
  background: linear-gradient(180deg, rgba(44, 110, 73, .25), rgba(44, 110, 73, .65));
}

.card-orange::before {
  background: linear-gradient(180deg, rgba(217, 119, 6, .25), rgba(217, 119, 6, .65));
}

.home-main-card h2 {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.home-main-card p {
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-16);
}

.home-main-card .cta {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* GRID 4/2/1 */
.hp-section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-40) var(--sp-16);
}

.hp-section-title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--clr-brand-blue);
  margin-bottom: var(--sp-32);
  font-weight: 700;
}

.hp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-24);
}

@media(max-width:1100px) {
  .hp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:600px) {
  .hp-grid {
    grid-template-columns: 1fr;
  }
}

/* KARTY AKTUALIT / PRODEJNY */
.hp-card {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.hp-card-img {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.hp-card h3 {
  margin: var(--sp-16) var(--sp-16) 6px var(--sp-16);
  color: var(--clr-brand-blue);
}

.hp-card p {
  margin: 0 var(--sp-16) var(--sp-16) var(--sp-16);
  color: #333;
}

.hp-card a {
  margin: 0 var(--sp-16) var(--sp-24) var(--sp-16);
  color: var(--clr-brand-blue);
  text-decoration: none;
  font-weight: 600;
}

/* LIDÉ (kruhové fotky) */
.hp-person-card {
  background: #fff;
  border: 1px solid var(--clr-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding-bottom: var(--sp-24);
  text-align: center;
}

.hp-person-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: var(--sp-24) auto var(--sp-16) auto;
  background-size: cover;
  background-position: center;
}

.hp-person-card h3 {
  color: var(--clr-brand-blue);
  margin-bottom: 6px;
}

.hp-person-card p {
  color: var(--clr-ink-600);
  margin-bottom: 6px;
}

/* Volitelný přepínač 16:9 u lidí (třída .is-rect na <section id="lide">) */
#lide.is-rect .hp-person-img {
  border-radius: 0;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 16/9;
}

#lide.is-rect .hp-person-card {
  text-align: left;
}

#lide.is-rect .hp-person-card h3,
#lide.is-rect .hp-person-card p {
  padding: 0 var(--sp-16);
}