/* Home Fullscreen Expandable Cards (uniquely prefixed: hf-*) */

.hf-fullscreen {
  position: relative;
  height: calc(100vh - 120px);
  margin: 60px;
  background: #0a0d14;
  overflow: hidden;
  border-radius: 24px;
}

/* Top invisible shield to disable card hover near the section top */
.hf-fullscreen::before{
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: clamp(200px, 24vh, 340px);
  background: transparent;
  pointer-events: auto;
  z-index: 15; /* above cards, below title */
}

.hf-grid {
  display: flex;
  height: 100%;
  width: 100%;
}

.hf-card {
  position: relative;
  flex: 1;
  min-width: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: flex 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  z-index: 10;
  cursor: pointer;
}

.hf-card:hover {
  flex: 2.5;
  z-index: 20;
}

.hf-grid:hover .hf-card:not(:hover) {
  flex: 0.7;
}

.hf-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,13,20,0.6), rgba(10,13,20,0.4));
  mix-blend-mode: normal;
  transition: all 0.5s ease;
  z-index: 5;
  pointer-events: none;
}

/* Hovered card overlay softens */
.hf-card:hover .hf-overlay {
  background: linear-gradient(135deg, rgba(10,13,20,0.2), rgba(10,13,20,0.1));
}

/* Non-hovered cards get a green tint */
.hf-grid:hover .hf-card:not(:hover) .hf-overlay {
  background: linear-gradient(135deg, rgba(10,13,20,0.7), rgba(12,128,96,0.5) 40%, rgba(8,100,60,0.6));
}

.hf-title-bar {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  z-index: 25;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.hf-title-bar h4 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.1em;
}

.hf-card:hover .hf-title-bar {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.hf-expanded-content {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 280px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(10,13,20,0.95);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  pointer-events: none;
}

.hf-card:hover .hf-expanded-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.hf-eyebrow {
  display: block;
  color: #0c8060;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 11px;
}

.hf-expanded-content h3 {
  margin: 0 0 10px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
}

.hf-expanded-content p {
  margin: 0 0 12px;
  color: rgba(255,255,255,0.9);
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.5;
}

.hf-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hf-specs span {
  background: rgba(12,128,96,0.2);
  color: #0c8060;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(12,128,96,0.3);
}

.hf-card-btn {
  display: inline-block;
  background: rgba(12,128,96,0.8);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(12,128,96,0.5);
}

.hf-card-btn:hover {
  background: #0c8060;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(12, 128, 96, 0.4);
}

.hf-main-title {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 30;
  pointer-events: auto;
  color: #fff;
  width: auto;
  height: auto;
}

/* Hover safety area around title/button */
.hf-main-title::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -24px;
  width: clamp(360px, 60vw, 820px);
  height: 140px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

/* Ensure button is above the shield */
.hf-explore-btn {
  position: relative;
  z-index: 2;
}

.hf-main-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 6px 20px rgba(0,0,0,0.8);
  color: #fff;
}

/* Explore button visuals (animated gradient + shine) */
.hf-explore-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  pointer-events: auto;
  background: linear-gradient(135deg, #16c08a 0%, #0c72b8 50%, #119a70 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 18px rgba(12, 128, 96, 0.35), 0 2px 0 rgba(255,255,255,0.12) inset;
  transition: transform .2s ease, box-shadow .3s ease, background-position .8s ease;
  overflow: hidden;
  margin-bottom: 16px;
}

.hf-explore-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(12, 128, 96, 0.55), 0 2px 0 rgba(255,255,255,0.18) inset;
  background-position: 100% 50%;
}

.hf-explore-btn::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -20%;
  width: 40%;
  height: 300%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(20deg) translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.hf-explore-btn:hover::before {
  animation: hfBtnShine 900ms ease forwards;
}

.hf-explore-btn::after {
  content: "→";
  font-weight: 900;
  opacity: .95;
  transform: translateX(0);
  transition: transform .25s ease;
}

.hf-explore-btn:hover::after {
  transform: translateX(4px);
}

.hf-explore-btn:active {
  transform: translateY(0) scale(0.98);
}

.hf-explore-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35), 0 8px 22px rgba(12, 128, 96, 0.55);
}

@keyframes hfBtnShine{
  0%{ opacity: 0; transform: rotate(20deg) translateX(-120%); }
  15%{ opacity: .9; }
  100%{ opacity: 0; transform: rotate(20deg) translateX(220%); }
}

@media (prefers-reduced-motion: reduce){
  .hf-explore-btn, .hf-explore-btn:hover{
    transition: none;
    transform: none;
    background-position: 0 0;
  }
  .hf-explore-btn::before, .hf-explore-btn:hover::before{
    animation: none;
  }
}

/* Mobile adjustments */
@media (max-width: 768px){
  .hf-fullscreen{ margin: 20px; }
  .hf-grid{ flex-direction: column; }
  .hf-card{ flex: 1; }
  .hf-card:hover{ flex: 2; }
  .hf-card:not(:hover){ flex: 0.5; }
  .hf-title-bar{ bottom: 16px; left: 16px; right: 16px; }
  .hf-title-bar h4{ writing-mode: horizontal-tb; text-orientation: unset; }
  .hf-expanded-content{ bottom: 16px; right: 16px; width: 240px; padding: 16px; }
  .hf-main-title{ padding: 0 20px; top: 10px; }
  .hf-main-title h2{ font-size: clamp(20px, 5vw, 32px); }
  .hf-explore-btn{ padding: 6px 16px; font-size: 11px; }
  .hf-main-title::after{
    top: -16px;
    width: clamp(260px, 80vw, 520px);
    height: 110px;
  }
  .hf-card{
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }
}
