/* ============================================================
   DESIGNMILL — v16 (centered nav)
   DesignMill.com · Astra Theme

   Homepage  : transparent → dark logo-row only → hide past hero
   Inner pages: solid black → hides instantly on scroll
   All text + logo: always white
   ============================================================ */

html, body { overflow-x: hidden; }


/* ─── 1. HEADER — fixed, full width ─────────────────────── */

#masthead,
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 0.35s ease,
              opacity  0.35s ease;
}


/* ─── 2. ADMIN BAR OFFSET ────────────────────────────────── */

.admin-bar #masthead,
.admin-bar .site-header {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  .admin-bar #masthead,
  .admin-bar .site-header {
    top: 46px !important;
  }
}


/* ─── 3. HOMEPAGE — transparent on load ─────────────────── */

body.home #masthead,
body.home .site-header {
  background: transparent !important;
  box-shadow: none !important;
}


/* ─── 4. INNER PAGES — solid black on load ──────────────── */

body:not(.home) #masthead,
body:not(.home) .site-header {
  background: #000000 !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5) !important;
}


/* ─── 5. CLEAR ALL ASTRA BACKGROUND OVERRIDES ───────────── */

.ast-above-header-wrap,
.ast-above-header-bar,
.site-above-header-wrap,
.ast-primary-header-bar,
.main-header-bar,
.site-primary-header-wrap,
.ast-main-header-bar-alignment,
.main-header-bar-navigation,
.site-header .ast-nav-menu,
.site-header .main-header-menu,
.site-header .ast-menu-shadow {
  background: transparent !important;
  background-color: transparent !important;
  transition: background-color 0.35s ease;
}


/* ─── 6. HOMEPAGE SCROLLED (.dm-scrolled via JS at 20px) ── */

body.home .site-header.dm-scrolled .ast-above-header-wrap,
body.home .site-header.dm-scrolled .ast-above-header-bar,
body.home .site-header.dm-scrolled .site-above-header-wrap {
  background: #000000 !important;
}

body.home .site-header.dm-scrolled .ast-main-header-bar-alignment,
body.home .site-header.dm-scrolled .main-header-bar-navigation,
body.home .site-header.dm-scrolled .ast-nav-menu,
body.home .site-header.dm-scrolled .main-header-menu,
body.home .site-header.dm-scrolled .ast-menu-shadow {
  background: transparent !important;
  background-color: transparent !important;
}


/* ─── 7. INNER PAGES — sub-rows also black ──────────────── */

body:not(.home) .ast-above-header-wrap,
body:not(.home) .ast-above-header-bar,
body:not(.home) .site-above-header-wrap,
body:not(.home) .ast-primary-header-bar,
body:not(.home) .main-header-bar,
body:not(.home) .site-primary-header-wrap,
body:not(.home) .ast-main-header-bar-alignment,
body:not(.home) .main-header-bar-navigation {
  background: #000000 !important;
}


/* ─── 8. HIDDEN STATE (.dm-hidden via JS) ────────────────── */

.site-header.dm-hidden {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* ─── 9. HEADER PADDING ──────────────────────────────────── */

.site-above-header-wrap.ast-container,
.site-primary-header-wrap.ast-container,
.main-header-bar .ast-container,
.ast-primary-header-bar .ast-container {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}


/* ─── 10. SITE TITLE — always white ─────────────────────── */

.site-header .site-title a,
.site-header .ast-site-title-wrap .site-title a {
  color: #ffffff !important;
  font-family: 'Cormorant Garamond', serif !important;
  transition: opacity 0.3s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.site-header .site-title a:hover { opacity: 0.8; }


/* ─── 11. TAGLINE — always white ─────────────────────────── */

.site-header .site-description,
.site-header p.site-description {
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  opacity: 0.85;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}


/* ─── 12. LOGO — always white ───────────────────────────── */

.site-header .custom-logo-link,
.site-header .site-logo img {
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

.site-header .custom-logo-link:hover { opacity: 0.8; }


/* ─── 13. NAV LINKS — always white, gold on hover ───────── */

.site-header .menu-link,
.site-header .ast-nav-menu a,
.site-header .main-header-menu a,
.site-header #site-navigation a {
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  transition: color 0.3s ease !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
  font-size: 0.95rem !important;
}

/* Tablet (≤921px) */
@media (max-width: 921px) {
  .site-header .menu-link,
  .site-header .ast-nav-menu a,
  .site-header .main-header-menu a,
  .site-header #site-navigation a {
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
    font-size: 0.85rem !important;
  }
}

/* Large phones (≤480px) */
@media (max-width: 480px) {
  .site-header .menu-link,
  .site-header .ast-nav-menu a,
  .site-header .main-header-menu a,
  .site-header #site-navigation a {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
  }
}

/* Small phones (≤360px) */
@media (max-width: 360px) {
  .site-header .menu-link,
  .site-header .ast-nav-menu a,
  .site-header .main-header-menu a,
  .site-header #site-navigation a {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.02em !important;
  }
}

.site-header .menu-link:hover,
.site-header .ast-nav-menu a:hover {
  color: #b59a72 !important;
  text-shadow: none !important;
}

.site-header .current-menu-item > .menu-link,
.site-header .current_page_item > .menu-link {
  color: #b59a72 !important;
  border-bottom: 1px solid #b59a72;
  text-shadow: none !important;
}


/* ─── 14. NAV — centered on screen ──────────────────────── */

.site-header .main-navigation,
.site-header .ast-nav-menu,
.site-header .main-header-bar-navigation {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

.site-header .main-header-menu {
  display: flex !important;
  justify-content: center !important;
  width: auto !important;
  margin: 0 auto !important;
}


/* ─── 15. DROPDOWN SUB-MENUS ─────────────────────────────── */

.site-header .main-header-menu .sub-menu {
  background: #000000 !important;
}

.site-header .main-header-menu .sub-menu a {
  color: #ffffff !important;
  text-shadow: none !important;
}

.site-header .main-header-menu .sub-menu a:hover {
  color: #b59a72 !important;
}


/* ─── 16. HAMBURGER ICON — always white ─────────────────── */

.site-header .ast-mobile-menu-buttons svg,
.site-header .ast-mobile-menu-buttons span,
.site-header button.ast-mobile-menu-buttons-fill,
.site-header .menu-toggle {
  color: #ffffff !important;
  fill: #ffffff !important;
}


/* ─── 17. MOBILE DRAWER ──────────────────────────────────── */

.ast-mobile-popup-drawer .ast-drawer-content,
.ast-mobile-popup-drawer {
  background: #000000 !important;
}

.ast-mobile-popup-drawer a { color: #ffffff !important; }
.ast-mobile-popup-drawer a:hover { color: #b59a72 !important; }


/* ─── 18. BODY OFFSET — homepage only ───────────────────── */

body.home { padding-top: 0 !important; }

body.home .site-content,
body.home #content,
body.home #primary,
body.home #main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* ─── 19. HERO — full bleed, full viewport ───────────────── */

.ast-single-post-featured-section,
.ast-article-image-container--wide {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  overflow: hidden !important;
  position: relative !important;
}

.ast-single-post-featured-section img,
.ast-article-image-container--wide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

/* Desktop hero height */
@media (min-width: 922px) {
  .ast-single-post-featured-section,
  .ast-article-image-container--wide {
    height: 100vh !important;
  }
  .admin-bar .ast-single-post-featured-section,
  .admin-bar .ast-article-image-container--wide {
    height: calc(100vh - 32px) !important;
  }
}

/* Mobile hero height */
@media (max-width: 921px) {
  .ast-single-post-featured-section,
  .ast-article-image-container--wide {
    height: 100dvh !important;
  }
  .admin-bar .ast-single-post-featured-section,
  .admin-bar .ast-article-image-container--wide {
    height: calc(100dvh - 46px) !important;
  }
}

/* Gradient overlay for text legibility */
.ast-single-post-featured-section::after,
.ast-article-image-container--wide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.0) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}


/* ─── 20. HIDE PAGE TITLE (top-left heading) ─────────────── */

.page-header,
.ast-archive-description,
.archive-header,
.ast-page-header,
.ast-page-header-content,
.page-header .page-title,
.page-header h1,
.page-header h2 {
  display: none !important;
}


/* ─── 21. SMOOTH SCROLL ──────────────────────────────────── */

html { scroll-behavior: smooth; }

/* Hide page titles globally in Astra */
.page .entry-title {
    display: none;
}