/*
Theme Name: HP Home Custom
Theme URI: https://hphome.vn/
Author: HP Home
Author URI: https://hphome.vn/
Description: Custom WordPress homepage theme for HP HOME construction company.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: hp-home
*/

:root {
  --blue: #0055ad;
  --blue-dark: #003f91;
  --blue-soft: #eaf5ff;
  --red: #ed1c2e;
  --ink: #102033;
  --muted: #5d6a78;
  --line: #d9e2ed;
  --surface: #ffffff;
  --surface-soft: #f5f9fd;
  --shadow: 0 14px 34px rgba(12, 54, 104, 0.12);
  --radius: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.hp-container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.hp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hp-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 85, 173, 0.18);
}

.hp-button--primary {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.hp-button--outline {
  color: var(--blue);
  background: #fff;
  border-color: var(--blue);
}

.hp-button--blue {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.hp-section {
  padding: 50px 0;
}

.hp-section--soft {
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.hp-section-title {
  position: relative;
  margin: 0 0 38px;
  color: var(--blue);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.hp-section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 58px;
  height: 3px;
  background: var(--red);
  transform: translateX(-50%);
}

.hp-topbar {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  font-size: 13px;
}

.hp-topbar__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}

.hp-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.hp-topbar svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.hp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
}

.admin-bar .hp-header {
  top: 32px;
}

.hp-header__inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hp-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.hp-logo__mark {
  width: 60px;
  height: 60px;
}

.hp-logo__custom {
  width: auto;
  max-width: 220px;
  max-height: 62px;
}

.hp-logo__text {
  display: grid;
  gap: 1px;
}

.hp-logo__name {
  color: var(--blue);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.hp-logo__name span {
  color: var(--red);
}

.hp-logo__tagline {
  color: #30465e;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.hp-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.hp-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 86px;
  color: #16283c;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hp-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 19px;
  width: 0;
  height: 2px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.hp-nav a:hover,
.hp-nav .current-menu-item > a,
.hp-nav .is-active {
  color: var(--blue);
}

.hp-nav a:hover::after,
.hp-nav .current-menu-item > a::after,
.hp-nav .is-active::after {
  width: 38px;
}

.hp-menu-toggle {
  display: none;
}

.hp-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
}

.hp-menu-button svg {
  width: 25px;
  height: 25px;
}

.hp-hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.87) 35%, rgba(255, 255, 255, 0.18) 62%, rgba(255, 255, 255, 0.02) 100%),
    url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1700&q=85") center right / cover no-repeat;
}

.hp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.65), transparent 44%),
    url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1200&q=70") 42% center / auto 100% no-repeat;
  opacity: 0.18;
  pointer-events: none;
}

.hp-hero::after {
  content: "";
  position: absolute;
  right: -7%;
  bottom: -105px;
  width: 68%;
  height: 230px;
  border-radius: 100% 0 0 0;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.95) 0 34%, transparent 35%),
    linear-gradient(160deg, rgba(0, 152, 219, 0.78), var(--blue) 56%, var(--blue-dark));
  transform: rotate(-7deg);
  transform-origin: bottom right;
  pointer-events: none;
}

.hp-hero__content {
  position: relative;
  z-index: 1;
  max-width: 530px;
  padding: 76px 0 116px;
}

.hp-hero h1 {
  margin: 0 0 26px;
  color: var(--blue);
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.hp-hero h1 span {
  color: var(--red);
}

.hp-hero p {
  max-width: 460px;
  margin: 0 0 30px;
  color: #172a3d;
  font-size: 17px;
  font-weight: 600;
}

.hp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hp-reasons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.hp-reason-card {
  min-height: 190px;
  padding: 30px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 58, 105, 0.09);
  text-align: center;
}

.hp-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  color: var(--blue);
}

.hp-reason-card h3,
.hp-service-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.hp-reason-card p,
.hp-service-card p {
  margin: 0;
  color: #1f2f42;
  font-size: 14px;
  line-height: 1.55;
}

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

.hp-service-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.hp-service-card__image {
  aspect-ratio: 1.55;
  background: var(--blue-soft) center / cover no-repeat;
}

.hp-service-card__body {
  padding: 20px 22px 22px;
}

.hp-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

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

.hp-project-card__image {
  aspect-ratio: 1.56;
  border-radius: var(--radius);
  background: var(--blue-soft) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hp-project-card h3 {
  margin: 14px 0 1px;
  color: #17283b;
  font-size: 16px;
  line-height: 1.25;
}

.hp-project-card p {
  margin: 0;
  color: #3a4b5d;
  font-size: 14px;
}

.hp-center {
  margin-top: 34px;
  text-align: center;
}

.hp-stats {
  margin-top: 24px;
}

.hp-stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--blue-dark), #0068d1);
  color: #fff;
}

.hp-stat {
  min-height: 138px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 26px 46px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.hp-stat:last-child {
  border-right: 0;
}

.hp-stat svg {
  width: 50px;
  height: 50px;
}

.hp-stat strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.hp-stat span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.hp-contact-band {
  padding: 44px 0 50px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1500&q=75") center / cover no-repeat;
}

.hp-contact {
  display: grid;
  grid-template-columns: 0.9fr 1.45fr;
  gap: 48px;
  align-items: center;
}

.hp-contact h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.hp-contact p {
  margin: 0 0 18px;
  color: #405164;
}

.hp-checklist {
  display: grid;
  gap: 7px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: #25364a;
  font-weight: 700;
}

.hp-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-checklist svg {
  width: 17px;
  height: 17px;
  color: #b51f30;
  flex: 0 0 auto;
}

.hp-form {
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.hp-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hp-form input,
.hp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
}

.hp-form input {
  min-height: 44px;
  padding: 0 14px;
}

.hp-form textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.hp-form input:focus,
.hp-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 85, 173, 0.12);
}

.hp-footer {
  color: #fff;
  background: linear-gradient(100deg, var(--blue-dark), #005bbd);
}

.hp-footer__main {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr;
  gap: 58px;
  padding: 44px 0 34px;
}

.hp-footer .hp-logo__name,
.hp-footer .hp-logo__tagline {
  color: #fff;
}

.hp-footer .hp-logo__name span {
  color: #fff;
}

.hp-footer__about p {
  max-width: 300px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.hp-footer h3 {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.hp-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-footer li,
.hp-footer a,
.hp-footer p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.hp-footer__contact li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
}

.hp-footer__contact svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.hp-footer__bottom {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.hp-socials {
  display: flex;
  gap: 12px;
}

.hp-socials a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .hp-nav ul {
    gap: 18px;
  }

  .hp-nav {
    gap: 18px;
  }

  .hp-card-grid,
  .hp-project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-reasons {
    grid-template-columns: repeat(3, 1fr);
  }

  .hp-stat {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .admin-bar .hp-header {
    top: 0;
  }

  .hp-header__inner {
    min-height: 74px;
  }

  .hp-logo__mark {
    width: 48px;
    height: 48px;
  }

  .hp-logo__name {
    font-size: 25px;
  }

  .hp-menu-button {
    display: inline-flex;
  }

  .hp-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 18px;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 18px 24px rgba(16, 32, 51, 0.12);
  }

  .hp-menu-toggle:checked ~ .hp-nav {
    display: flex;
  }

  .hp-nav ul {
    display: grid;
    gap: 0;
  }

  .hp-nav a {
    min-height: 46px;
    width: 100%;
  }

  .hp-nav a::after {
    bottom: 7px;
    left: 0;
    transform: none;
  }

  .hp-nav .hp-button {
    width: 100%;
    margin-top: 10px;
  }

  .hp-hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.75) 48%, rgba(255, 255, 255, 0.25) 100%),
      url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=1100&q=82") center / cover no-repeat;
  }

  .hp-hero::after {
    width: 100%;
    right: -18%;
    bottom: -130px;
    opacity: 0.9;
  }

  .hp-hero__content {
    padding: 58px 0 120px;
  }

  .hp-contact,
  .hp-footer__main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hp-stats__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-stat:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .hp-container {
    width: min(100% - 24px, var(--container));
  }

  .hp-topbar__inner {
    min-height: 42px;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hp-topbar__item {
    font-size: 12px;
  }

  .hp-section {
    padding: 38px 0;
  }

  .hp-section-title {
    margin-bottom: 32px;
    font-size: 24px;
  }

  .hp-hero h1 {
    font-size: 42px;
  }

  .hp-hero p {
    font-size: 15px;
  }

  .hp-hero__actions,
  .hp-hero__actions .hp-button {
    width: 100%;
  }

  .hp-reasons,
  .hp-card-grid,
  .hp-project-grid,
  .hp-form__row,
  .hp-stats__inner {
    grid-template-columns: 1fr;
  }

  .hp-stat {
    min-height: 110px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  }

  .hp-stat:last-child {
    border-bottom: 0;
  }

  .hp-form {
    padding: 18px;
  }

  .hp-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }
}
