/**
 * Home page layout (Home_A mockup).
 */

/* ----- Home: shell header is stripe-only; hero sits flush below ----- */
.edp-page--home .home-hero {
  padding-top: 0;
  margin-top: 0;
}

/* ----- Hero (dark band) ----- */
.home-hero {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  padding: 0 var(--layout-page-padding-x) clamp(3rem, 8vw, 6.25rem);
  padding-bottom: clamp(3rem, 8vw, 6.25rem);
  min-height: min(65vh, 40rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-10);
}

.home-hero__inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.home-hero__title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  max-width: 42rem;
}

.home-hero__byline {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-on-dark);
}

.home-hero__byline strong {
  font-weight: var(--font-weight-bold);
}

.home-hero__doi {
  margin: 0;
}

.home-hero__doi-link {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.home-hero__doi-link img {
  display: block;
  width: 40px;
  height: auto;
}

.home-hero__intro {
  margin: 0;
  max-width: 52rem;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-snug);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.home-hero .edp-btn-pill--primary {
  padding: 0.875rem 2.5rem;
  font-size: 1.0625rem;
  letter-spacing: 0.053em;
}

.home-hero .edp-btn-pill--primary .edp-btn-pill__fa {
  font-size: 1.25rem;
}

/* ----- Teaser / tools strip (Figma: mappa + #E5E5E5, multiply) ----- */
.home-tools {
  /* Auto layout — teaser section */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px clamp(1rem, 3.1vw, 50px) 80px;
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  min-height: min(605.84px, 85vh);
  /* Figma: background: url(mappa_home_grey.png), #E5E5E5; background-blend-mode: multiply; */
  background-color: #e5e5e5;
  background-image: url("../../img/mappa_home_grey.png");
  background-blend-mode: multiply;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-tools__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 32px;
  width: 100%;
  max-width: min(1820px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.home-tools__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  width: 100%;
}

.home-tools__grid > .home-tool-card {
  max-width: 668px;
  width: 100%;
}

@media (min-width: 1000px) {
  .home-tools__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-tools__grid > .home-tool-card {
    max-width: none;
  }

  .home-tools__grid > .home-tool-card:nth-child(4) {
    grid-column: 1;
  }
}

.home-tool-card {
  position: relative;
  background: var(--color-white);
  border-top: 3px solid var(--color-brand-red);
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  padding: var(--space-5) var(--space-5) var(--space-5);
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.home-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: inherit;
}

.home-tool-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.home-tool-card__label {
  font-size: 0.625rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-border-subtle);
  line-height: 1.2;
  padding-top: 0.35rem;
  text-align: right;
}

.home-tool-card__icon-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-tool-card__icon-wrap .fa {
  color: var(--color-brand-red);
  font-size: 1.65rem;
}

.home-tool-card__title {
  margin: 0;
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: var(--line-height-snug);
  color: var(--color-text-primary);
}

.home-tool-card__body {
  margin: 0;
  flex: 1 1 auto;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
}

.home-tool-card__foot {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* DOI: single image inside OpenEO / Maps cards (not a text+link row) */
.home-tool-card__doi-img {
  display: block;
  width: auto;
  height: 38px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.home-tool-card__note {
  color: var(--color-text-muted);
}

/* ----- About ----- */
.home-about {
  background: var(--color-white);
  padding: clamp(3rem, 6vw, 5rem) var(--layout-page-padding-x);
}

.home-about__inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(var(--space-8), 4vw, var(--space-12));
  align-items: flex-start;
  justify-content: space-between;
}

.home-about__text {
  flex: 1 1 20rem;
  max-width: 56rem;
}

.home-about__heading {
  margin: 0 0 var(--space-6);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
}

.home-about__body {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

.home-about__body:last-child {
  margin-bottom: 0;
}

.home-about__body strong {
  font-weight: var(--font-weight-semibold);
}

.home-about__panels {
  flex: 1 18rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: stretch;
  justify-content: center;
}

.home-about__panel {
  position: relative;
  display: block;
  flex: 1 1 1 14rem;
  max-width: 20rem;
  aspect-ratio: 400 / 207;
  overflow: hidden;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-md);
}

.home-about__panel:hover {
  text-decoration: none;
  color: inherit;
}

.home-about__panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.home-about__panel:hover .home-about__panel-img {
  transform: scale(1.03);
}

.home-about__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(64, 70, 73, 0.35);
  pointer-events: none;
}

/* Tecxt pill that appears on the image of 3 boxes in the footer section */
.home-about__panel-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem 0.625rem 1.5rem;
  background: rgba(64, 70, 73, 0.92);
  color: var(--color-text-on-dark);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.home-about__panel .fa-external-link {
  font-size: 0.875rem;
  opacity: 0.95;
}

/* ----- Home footer (Figma footer desktop 1440) ----- */
.home-footer {
  background-color: #f5f5f5;
  width: 100%;
  max-width: 1920px;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 48px clamp(1rem, 3.1vw, 50px) 40px;
}

.home-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  text-align: center;
  max-width: 1920px;
  margin: 0 auto;
}

.home-footer__brands {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  width: 100%;
}

.home-footer__brand {
  display: block;
  line-height: 0;
}

.home-footer__brand--eurac {
  flex: 0 0 auto;
  align-self: flex-start;
}

.home-footer__brand--fesr {
  flex: 0 0 auto;
  margin-left: left;
  align-self: flex-start;
}

.home-footer__logo-eurac {
  display: block;
  height: 56px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.home-footer__logo-fesr {
  display: block;
  height: auto;
  width: 750px;
  object-fit: contain;
}

.home-footer__legal {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  line-height: 1.5;
}

.home-footer__legal a {
  color: inherit;
  text-decoration: underline;
}

.home-footer__back-top {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-text-muted);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.home-footer__back-top:hover {
  background: rgba(140, 144, 145, 0.12);
  color: var(--color-text-primary);
}

.home-footer__back-top .fa {
  font-size: 1.125rem;
}
