/**
 * Heaven Four - Clean Hero Section Styling
 * For use with Hero Fullwidth template
 * NO HACKS - proper, maintainable CSS
 */

/* ===== TEMPLATE-SPECIFIC ZERO SPACING ===== */
/* Only applies to pages using hero-fullwidth-template */
.hero-fullwidth-template {
  padding: 0;
  margin: 0;
}

.hero-fullwidth-template #main {
  padding: 0;
  margin: 0;
}

.hero-fullwidth-template article.entry {
  padding: 0;
  margin: 0;
}

.hero-fullwidth-template .entry-content-wrap,
.hero-fullwidth-template .entry-content {
  padding: 0;
  margin: 0;
}

/* First element (hero) should have no top margin */
.hero-fullwidth-template .entry-content > *:first-child {
  margin-top: 0;
}

/* ===== HERO SECTION STYLING ===== */
.h4-hero {
  position: relative;
  height: 85vh;
  min-height: 550px;
  max-height: 800px;
  overflow: hidden;
  margin: 0;
}

.h4-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.h4-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom, 
    rgba(0,0,0,0.1) 0%, 
    rgba(0,0,0,0.35) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.h4-hero-overlay > div {
  max-width: 800px;
}

/* Hero titles - support h1, h2, and .hero-title class */
.h4-hero h1,
.h4-hero h2,
.h4-hero .hero-title {
  color: #fff !important;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  margin: 0 0 8px 0;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.h4-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 400;
  margin: 0 0 25px 0;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.h4-hero .h4-btn {
  background: #E3967E;
  color: #fff;
  padding: 14px 32px;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-block;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  border-radius: 0;
}

.h4-hero .h4-btn:hover {
  background: #D4856D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(227, 150, 126, 0.3);
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .h4-hero {
    height: 70vh;
    min-height: 450px;
  }
  
  .h4-hero h1,
  .h4-hero h2,
  .h4-hero .hero-title {
    font-size: 1.8rem;
  }
  
  .h4-hero p {
    font-size: 10px;
    margin-bottom: 20px;
  }
  
  .h4-hero .h4-btn {
    padding: 12px 24px;
    font-size: 10px;
  }
}

/* ===== ENSURE HERO TOUCHES HEADER ===== */
/* Compensate for body padding from sticky header */
body .hero-fullwidth-template .h4-hero:first-child {
  margin-top: calc(-1 * 60px); /* Mobile header height */
}

@media (min-width: 768px) {
  body .hero-fullwidth-template .h4-hero:first-child {
    margin-top: calc(-1 * 85px); /* Desktop header height */
  }
}

/* With admin bar */
body.admin-bar .hero-fullwidth-template .h4-hero:first-child {
  margin-top: calc(-1 * 106px);
}

@media (min-width: 768px) {
  body.admin-bar .hero-fullwidth-template .h4-hero:first-child {
    margin-top: calc(-1 * 117px);
  }
}

/* Make sure hero overlay starts at correct position */
body .hero-fullwidth-template .h4-hero:first-child .h4-hero-overlay {
  top: 60px;
}

@media (min-width: 768px) {
  body .hero-fullwidth-template .h4-hero:first-child .h4-hero-overlay {
    top: 85px;
  }
}

body.admin-bar .hero-fullwidth-template .h4-hero:first-child .h4-hero-overlay {
  top: 106px;
}

@media (min-width: 768px) {
  body.admin-bar .hero-fullwidth-template .h4-hero:first-child .h4-hero-overlay {
    top: 117px;
  }
}
