@import url('travel_planner_editorial.css');

body.tp-modern-mode:has(.tp-homepage) .tp-page {
  max-width: 1320px !important;
  padding: 0 1.5rem 5rem !important;
}

.tp-homepage {
  color: #292923;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.tp-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3.5rem, 7vw, 7.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.tp-home-hero h1,
.tp-home-library h2 {
  margin: 1.25rem 0 0;
  color: #292923;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.tp-home-hero h1 {
  font-size: clamp(3.2rem, 5.5vw, 5.9rem);
  line-height: 1.05;
}

.tp-home-hero h1 em {
  color: #c8603f;
  font-weight: 400;
}

.tp-home-hero-copy > p {
  max-width: 30rem;
  margin: 1.6rem 0 0;
  color: #66655f;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.8;
}

.tp-homepage .tp-home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem 1.7rem;
  margin-top: 2.1rem;
  text-decoration: none;
}

.tp-home-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 3.3rem;
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
}

.tp-home-primary { padding: 0.8rem 1.4rem; }
.tp-home-secondary { color: #32312c; }
.tp-home-secondary:hover, .tp-home-card-open:hover { color: #ac4829; }

.tp-home-hero-visual {
  height: clamp(22rem, 38vw, 32rem);
  overflow: hidden;
  border-radius: 1.2rem;
  background: #eae4d8;
  box-shadow: 0 22px 50px rgba(57, 47, 33, 0.1);
}

.tp-home-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-home-library {
  scroll-margin-top: 2rem;
}

.tp-home-library-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.tp-home-library h2 {
  margin-top: 0.5rem;
  font-size: clamp(2.7rem, 4vw, 4rem);
  line-height: 1.1;
}

.tp-home-period { color: #d6603b; }

.tp-home-library-header p {
  margin: 0.65rem 0 0;
  color: #66655f;
  font-size: 1rem;
}

.tp-home-search-controls {
  width: min(100%, 22rem);
}

.tp-home-search-controls label {
  display: block;
  margin-bottom: 0.55rem;
  color: #4b4a44;
  font-size: 0.82rem;
  font-weight: 650;
}

.tp-home-search-input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 1rem;
  border: 1px solid #dedbd4;
  border-radius: 0.7rem;
  background: #fff;
  color: #292923;
  font: inherit;
  font-size: 0.92rem;
}

.tp-home-search-input::placeholder { color: #77756f; }
.tp-home-search-input:disabled { opacity: 0.6; }

.tp-home-browse-actions {
  margin-top: 0.6rem;
}

.tp-home-browse-actions button {
  border: 0;
  background: none;
  color: #9a472f;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  padding: 0.35rem 0;
}

.tp-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.tp-home-grid[hidden],
.tp-homepage [hidden] { display: none !important; }

.tp-homepage .tp-home-plan-card {
  overflow: hidden;
  border: 1px solid #eae6df;
  border-radius: 1.05rem;
  background: #fff;
  color: #292923;
  box-shadow: 0 8px 26px rgba(41, 35, 26, 0.045);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-homepage .tp-home-plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 36px rgba(41, 35, 26, 0.1);
}

.tp-home-card-image { display: block; overflow: hidden; }

body.tp-modern-mode .tp-homepage #tpHomeLocalGrid .tp-plan-img,
body.tp-modern-mode .tp-homepage #tpHomeRemoteGrid .tp-plan-img {
  display: block;
  width: 100%;
  height: clamp(15rem, 24vw, 20rem);
  object-fit: cover;
  filter: none;
  transition: transform 0.3s ease;
}

.tp-home-plan-card:hover .tp-plan-img { transform: scale(1.025); }

.tp-homepage .tp-plan-img-fallback {
  background: #eae4d8 url('../img/travel_planner/placeholder-highlight-1.svg') center / cover no-repeat;
}

.tp-home-card-info { padding: 1.5rem 1.7rem 1.7rem; }

.tp-home-card-meta {
  color: #706e66;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body.tp-modern-mode .tp-homepage .tp-plan-title {
  margin: 0.65rem 0 1.35rem;
  color: #292923;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.tp-home-card-info a { color: inherit; text-decoration: none; }
.tp-home-card-info a:hover { color: #a94427; }

.tp-home-card-open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.87rem;
  font-weight: 700;
}

.tp-home-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  color: #53514a;
}

.tp-home-pager button {
  padding: 0.7rem 1rem;
  border: 1px solid #dedbd4;
  border-radius: 0.6rem;
  background: #fff;
  color: #292923;
  cursor: pointer;
  font: inherit;
}

.tp-home-pager button:disabled { opacity: 0.5; cursor: default; }

.tp-home-empty {
  padding: 1.5rem;
  border: 1px solid #eae6df;
  border-radius: 0.8rem;
  background: #fff;
  color: #66655f;
}

.tp-homepage a:focus-visible,
.tp-homepage button:focus-visible,
.tp-homepage input:focus-visible,
body.tp-modern-mode:has(.tp-homepage) .tp-header a:focus-visible {
  outline: 3px solid #b84e2d;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .tp-home-hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 4rem; }
  .tp-home-hero-visual { height: clamp(15rem, 65vw, 26rem); }
  .tp-home-library-header { align-items: stretch; flex-direction: column; gap: 1.5rem; }
  .tp-home-search-controls { width: 100%; }
  .tp-home-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  body.tp-modern-mode .tp-homepage #tpHomeLocalGrid .tp-plan-img,
  body.tp-modern-mode .tp-homepage #tpHomeRemoteGrid .tp-plan-img { height: clamp(13rem, 55vw, 22rem); }
}

@media (max-width: 440px) {
  body.tp-modern-mode:has(.tp-homepage) .tp-page { padding: 0 1rem 3.5rem !important; }
  .tp-home-hero h1 { font-size: clamp(2.75rem, 12vw, 3.4rem); }
  .tp-homepage .tp-home-actions { align-items: stretch; flex-direction: column; }
  .tp-home-hero-visual { height: 15rem; }
  .tp-home-card-info { padding: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-homepage .tp-home-plan-card,
  .tp-homepage .tp-plan-img { transition: none; }
}
