/* Desktop hero layout: text left, form right, generous center gap */
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6rem;
  padding: 6.5rem 0;
  min-height: 850px;
}
.hero__left {

  flex: 0 0 50%;
  padding-left: 9rem;

}
.hero__right {
  flex: 0 0 540px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 4rem;
  padding-left: 1rem;
  margin-top: 0;
}
/* ensure left text is left-aligned and form sticks to the right column */
.hero__left { text-align: left; }
.hero__right { margin-left: auto; }
.hero__right .hero__form-wrapper { margin-left: 0; }

/* Desktop: pin the form column to the right of the hero */
@media (min-width: 900px) {
  .hero {
    position: relative;
  }
  .hero__right {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    flex: 0 0 540px;
    width: 540px;
  }
  /* make left column take remaining space */
  .hero__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  .hero__left {
    flex: 0 0 48%;
    max-width: 620px;
    padding-left: 7rem;
    padding-right: 2.5rem;
  }
}
.hero__title { font-size: 2rem; line-height: 1.08; margin-bottom: 1rem; }
.hero__lead, .hero__desc { font-size: 1rem; max-width: 540px; }

/* Ensure hero content sits above background */
.hero__inner > * { z-index: 1; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .hero__inner { gap: 4rem; padding: 4rem 0; min-height: 640px; }
  .hero__left { padding-left: 2.5rem; }
  .hero__right { flex: 0 0 420px; padding-right: 2.5rem; }
  /* form-card styles moved to css/form.css */
}

@media (max-width: 900px) {
  .hero__inner { flex-direction: column; padding: 2rem 1rem; min-height: auto; gap: 1rem; }
  .hero__left { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }
  /* remove hero right column on mobile so it doesn't take vertical space;
     mobile modal will be injected when user clicks CTA */
  .hero__right { display: none !important; }
  .hero__title { font-size: 1.5rem; line-height: 1.15; }
  .hero__lead, .hero__desc { font-size: 0.98rem; }
  /* form-card styles moved to css/form.css */

  /* Architecture section: remove large side margins and force column flow */
  .architecture__title, .architecture__lead,
  .architecture__left-top .architecture__lead {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
    text-align: left !important;
    padding-top: 20px;
  }
  .architecture__content { flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
  .architecture__left, .architecture__right { width: 100%; flex: none; }
  .architecture__left-top { padding: 2rem 1rem; text-align: left; align-items: flex-start; }
  .architecture__left-top .architecture__title { font-size: 1.8rem; text-align: left; }
  .architecture__left-bottom img { height: auto; object-fit: cover; }
  .specs-list { grid-template-columns: 1fr !important; max-width: 100%; gap: 0.75rem 1rem; padding-bottom: 20px; }
  .specs-list__row dt, .specs-list__row dd { font-size: 0.95rem; padding-bottom: 10px; }

  /* Result and power sections */
  .result__title, .result__subtitle { font-size: 1.25rem; line-height: 1.2; }
  .power-card {
    margin-bottom: 1rem;
    /* reduce internal whitespace where the CTA used to be */
    padding-top: 30px !important;
    padding-bottom: 49px !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .power-card__title { margin-bottom: 0.5rem !important; }
  .power-card__desc { margin-bottom: 0 !important; padding-bottom: 0 !important; }

  /* Resources: stack and hide decorative device for small screens */
  .resources__inner { display: flex; flex-direction: column; gap: 1rem; }
  .resources__right { display: none; }

  /* Architecture images: remove gaps so images are flush/coladas */
  .architecture__content { gap: 0 !important; padding: 0 !important; background: transparent !important; }
  .architecture__left-bottom { padding: 0 !important; margin: 0 !important; width: 100%; line-height: 0 !important; background: transparent !important; }
  .architecture__left-bottom img,
  .specs-card__thumb {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    border: 0 !important;
  }
  /* Ensure the specs card doesn't add extra spacing around its image */
  .specs-card { padding: 0 !important; margin: 0 !important; box-shadow: none !important; background: #000 !important; }
  /* Remove vertical gaps between stacked image elements and ensure right column starts immediately */
  .architecture__left-bottom + .architecture__right,
  .architecture__left-bottom + .specs-card,
  .specs-card + .architecture__left-bottom { margin-top: 0 !important; padding-top: 0 !important; }
  .architecture__right { padding-top: 0 !important; margin-top: 0 !important; }
  .specs-list__group { align-items: center !important; }
  .specs-list__icon {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    align-self: center !important;
  }
  .specs-card__image-wrapper,
  .specs-card__thumb,
  .specs-list {
    transform: none !important;
    translate: none !important;
  }
  .architecture__right .specs-card__thumb {
    margin-left: 0 !important;
  }

  /* Ensure mobile CTA button visible and non-obstructive */
  .mobile-form-button { display: block; position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; width: calc(100% - 32px); max-width: 620px; }
}

/* Lenovo vertical branding in hero (local override) */
.hero__branding-vertical {
  position: absolute;
  top: 46px;
  right: 0;
  width: 230px;
  height: auto;
  z-index: 50;
  pointer-events: none;
  padding-left: 0;
  mix-blend-mode: normal;
  transform: translateX(0);
}

@media (max-width: 1400px) and (min-width: 901px) {
  .hero__branding-vertical {
    width: 160px;
    right: 0;
    top: 40px;
  }
}

@media (max-width: 1200px) and (min-width: 901px) {
  .hero__branding-vertical {
    width: 160px;
    right: 0;
    top: 36px;
  }
}

@media (max-width: 900px) {
  .hero__branding-vertical { display: none; }
}

/* Hide any CTA links that target the form on mobile (we have a persistent button) */
@media (max-width: 900px) {
  a[href="#form"], a.btn[href="#form"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Collapse CTA containers and remove resulting whitespace on mobile */
@media (max-width: 900px) {
  .video-section__cta,
  .result__cta,
  .power-section__cta {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Reduce vertical padding of sections that had CTAs to avoid empty gaps */
  .video-section { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .architecture__result { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .power-section { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .resources-section { padding-top: 1rem !important; padding-bottom: 1rem !important; }

  /* Ensure containers don't keep extra bottom margin */
  .container { margin-bottom: 0 !important; }

  /* Increase vertical spacing inside the result section to avoid crowded text */
  .architecture__result {
    padding-top: 50px !important;
    padding-bottom: 2.7rem !important;
  }
  .architecture__result .result__title {
    margin-bottom: 0.75rem !important;
    line-height: 1.35 !important;
  }
  .architecture__result .result__subtitle {
    margin-top: 0.75rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.6 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    font-size: 1.05rem !important;
  }
}

/* Re-enable resource download buttons on mobile and center them */
@media (max-width: 900px) {
  .resources__grid .btn,
  .resource-card .btn {
    display: inline-flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    align-self: center !important;
    justify-self: center !important;
    margin: 0.5rem auto 0 auto !important;
    min-width: 140px !important;
  }
}

/* Add larger horizontal breathing space for resources section on tablet+desktop,
   but keep mobile untouched. Applies from 601px and up. */
@media (min-width: 601px) {
  .resources-section {
    padding-left: 3.5rem !important; /* ~56px */
    padding-right: 3.5rem !important;
  }
  /* also slightly increase inner container padding for visual balance */
  .resources__inner {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    max-width: 1320px !important;
  }
}

/* Ensure very small screens (mobile) do not get the extra horizontal padding */
@media (max-width: 600px) {
  .resources-section { padding-left: 0 !important; padding-right: 0 !important; }
  .resources__inner { padding-left: 0 !important; padding-right: 0 !important; }
}

/* Tablet and desktop adjustments: shift right image left and add bottom padding to section
   (apply to all non-mobile screens). Mobile-specific rules remain under max-width:900px. */
@media (min-width: 601px) {
  .architecture__right .specs-card__thumb {
    transform: translateX(-56px);
    margin-left: -56px;
    margin-bottom: 0 !important; /* remove gap under the thumb */
    transition: transform .2s ease;
  }

  /* Reset and harmonize architecture paddings (desktop) */
  /* Outer section bottom spacing */
  body#thinkstation-pgx .architecture-section {
    padding-top: 0 !important;
    padding-bottom: 4rem !important; /* 64px */
  }

  /* Right column internal spacing */
  body#thinkstation-pgx .architecture__right {
    padding-top: 0rem !important;
    padding-bottom: 4rem !important; /* ensure specs are away from section bottom */
  }
  body#thinkstation-pgx .architecture__right .specs-card {
    padding-top: 0.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  /* Specs list spacing from bottom */
  body#thinkstation-pgx .specs-list {
    padding-bottom: 3.5rem !important;
  }
  /* Reduce gap between left image and specs and pull specs slightly up */
  .architecture__content { gap: 0 !important; }
  .architecture__left-bottom img { margin-bottom: 0 !important; display: block !important; }
  /* Pull the specs card further up so the right thumb sits closer to the left image */
  body#thinkstation-pgx .architecture__right .specs-card { margin-top: -96px !important; padding-top: 0 !important; padding-bottom: 0.5rem !important; }

  /* Result block: equal top and bottom */
  body#thinkstation-pgx .architecture__result {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Power section - desktop: reduce bottom area of cards while keeping equal card sizes.
     Do not change text sizes; this only adjusts card box dimensions and paddings. */
  .power-section__cards { align-items: stretch; }
  .power-card {
    height: 340px !important; /* slightly larger to match top card increase */
    padding-top: 22px !important;
    padding-bottom: 16px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
    box-sizing: border-box !important;
  }
  .power-card__desc { margin-bottom: 0 !important; }
  /* Increase top card (hero form) size slightly on desktop */
  /* form-card styles moved to css/form.css */
  /* Increase paddings for all major card types on desktop (horizontal and top) */
  .resource-card,
  .specs-card,
  .power-card {
    padding-top: 22px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

/* Add a subtle black overlay over the power-section background on tablet+desktop */
@media (min-width: 601px) {
  .power-section {
    position: relative;
  }
  .power-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.12);
    z-index: 1;
    pointer-events: none;
  }
  /* Ensure content sits above the overlay */
  .power-section > .container { position: relative; z-index: 2; }
}

/* Force power section accent color */
.power-section__title--accent {
  color: #D9C1D8 !important;
}

/* Strong overrides to pull specs closer to the left image and increase bottom spacing.
   Apply to tablet+desktop (>=601px). */
@media (min-width: 601px) {
  /* Remove any gap between the two columns */
  body#thinkstation-pgx .architecture__content { gap: 0 !important; }

  /* Ensure left image has no extra bottom space and does not stretch the column */
  body#thinkstation-pgx .architecture__left-bottom,
  body#thinkstation-pgx .architecture__left-bottom img {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

/* Pull the specs card upward so it sits closer to the left image */
  body#thinkstation-pgx .architecture__right .specs-card {
    margin-top: -96px !important;
    padding-top: 0 !important;
    padding-bottom: 0.5rem !important;
    box-sizing: border-box !important;
  }
  /* Make left-top take only its content height and let left-bottom (image) expand,
     so the image moves upward; align right column to top so specs sit closer. */
  body#thinkstation-pgx .architecture__left-top {
    flex: 0 0 auto !important;
    padding-bottom: 1rem !important;
  }
  body#thinkstation-pgx .architecture__left-bottom {
    flex: 1 1 auto !important;
  }
  body#thinkstation-pgx .architecture__right {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  /* Increase spacing below the specs list (more room before section end) */
  body#thinkstation-pgx .specs-list {
    padding-bottom: 1.8rem !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 1300px) and (min-width: 700px) {
  .architecture__right .specs-card__thumb {
    transform: translateX(-148px) !important;
    margin-left: 32px !important;
  }
}
