/*
 Theme Name:   Petersen Onsite Update
 Theme URI:    http://demo.goodlayers.com/realfactory
 Description:  Goodlayers Real Factory Child Theme
 Author:       Goodlayers
 Author URI:   http://goodlayers.com
 Template:     realfactory
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, right-sidebar, responsive-layout
 Text Domain:  realfactory-child

 START YOUR CHILD THEME CSS HERE
*/

@media screen and (max-width: 1038px) {
	.realfactory-logo-right-block {
		display: none;
	}
}

.single .wp-block-image {
	margin-bottom: 20px !important;
}

.realfactory-header-background, .realfactory-sticky-menu-placeholder, .realfactory-header-style-boxed.realfactory-fixed-navigation {
    background-color: #0f1b2d !important;
}

.realfactory-header-container-inner {
    border-color: #e8e8e8;
    z-index: 9999999 !important;
}
/* DARK OVERLAY ON PAGE TITLE — only when body has .overlay */
body.overlay .realfactory-page-title-wrap {
  position: relative;
  overflow: hidden;
  /* Do NOT set z-index here — let it stay in normal flow */
}

body.overlay .realfactory-page-title-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);  /* Adjust 0.5 as needed */
  z-index: 0;                      /* Lowest possible positive — behind content but over bg image */
  pointer-events: none;
}

/* Title text/content above overlay */
body.overlay .realfactory-page-title-container,
body.overlay .realfactory-page-title-content,
body.overlay .realfactory-page-title,
body.overlay .realfactory-page-title h1 {
  position: relative;
  z-index: 1;                      /* Just enough to be above the dark overlay */
}

/* OVERRIDE THEME'S BUILT-IN OVERLAY ELEMENT (it exists in your HTML) */
body.overlay .realfactory-page-title-overlay {
  background: transparent !important;
  opacity: 0 !important;
  display: none !important;        /* Kill it completely if it interferes */
}

/* HEADER & MENU VISIBILITY — push above title area */
.realfactory-header-wrap,
.realfactory-header-background,
.realfactory-header-container,
.realfactory-header-container-inner,
.realfactory-logo,
.realfactory-navigation,
.realfactory-main-menu,
.realfactory-main-menu-right-wrap,
.realfactory-main-menu-right-button {
  z-index: 20 !important;
  position: relative;
}

/* Sticky/fixed header when scrolled */
.realfactory-sticky-navigation-sticky,
.realfactory-header-wrap.realfactory-fixed-header,
.realfactory-header-wrap.sticky {
  z-index: 40 !important;          /* Higher when stuck */
}

/* Mobile header & hamburger menu */
.realfactory-mobile-header-wrap,
.realfactory-mobile-header,
.realfactory-mobile-menu-button,
.realfactory-mobile-menu-right {
  z-index: 30 !important;
}

/* Dropdowns/submenus above all */
.sf-menu ul.sub-menu,
.realfactory-main-menu .sub-menu {
  z-index: 50 !important;
}

/* Safety: ensure nothing hides header children */
.realfactory-logo img,
.realfactory-main-menu a,
.realfactory-main-menu-right-button {
  opacity: 1 !important;
  visibility: visible !important;
}

.realfactory-header-right-button,
.vp-portfolio__item-meta-title {
	color: #fff !important;
	text-transform: uppercase;
}

.gdlr-core-social-share-item,
.realfactory-single-author,
.realfactory-single-nav-area,
.realfactory-single-article-date-wrapper,
.realfactory-blog-info-wrapper{
	display: none !important;
}

.blog .realfactory-page-title {
	visibility: hidden;
}

.blog .realfactory-page-title:before {
	content: "News";
	visibility: visible;
}

.single .realfactory-blog-title-wrap.realfactory-style-large .realfactory-blog-title-content {
    padding-top: 63px;
    padding-bottom: 68px;
}

.single .realfactory-single-article-title {
	text-align: center;
}

.single .tiled-gallery__col {
	margin-bottom: 30px;
}

.realfactory-header-background-transparent {
	z-index: 999;
	background-color: #0f1b2d !important;
}

.realfactory-mobile-header .realfactory-mobile-button-hamburger:before, .realfactory-mobile-header .realfactory-mobile-button-hamburger:after, .realfactory-mobile-header .realfactory-mobile-button-hamburger span {
    background: #fff;
}

.realfactory-mobile-menu .realfactory-mobile-menu-button {
    border-color: #fff !important;
}

body:not(.home) .realfactory-page-title-wrap {
	background-image: none;
}

body:not(.home) .realfactory-page-title-wrap.realfactory-style-small .realfactory-page-title-content {
  padding-top: 23px !important;
  padding-bottom: 17px !important;
}


/* 2. Keep page title visible & positioned normally (no change needed usually, but reinforce) */
body:not(.home) .realfactory-page-title-wrap,
body:not(.single-portfolio) .realfactory-page-title-wrap {
    position: relative;
    z-index: 11;
    margin-bottom: 0 !important;               /* Reduce gap below title so slider can overlap slightly */
}

/* 3. Pull slider UP modestly to overlap bottom of page title bar */
/* 3. Pull slider UP modestly to overlap bottom of page title bar */
body:not(.home):not(.single-portfolio) .gdlr-core-revolution-slider-item {
  margin-top: -84.4px !important;              /* Key line: -40px to -80px range works best – adjust live */
  position: relative;
  z-index: 2;                                /* Below title/header but above lower content */
}


/* Ensure no clipping and good flow */
body:not(.home):not(.single-portfolio) .realfactory-page-title-wrap + .realfactory-page-wrapper {
  margin-top: 0 !important;
}

/* Mobile adjustments – reduce pull-up to avoid over-overlap or header issues */
@media (max-width: 1024px) {
  body:not(.home):not(.single-portfolio) .gdlr-core-revolution-slider-item {
    margin-top: 0px !important;
  }
}

.current-menu-item a  {
	color: #5379b1 !important;
}

.gdlr-core-port-info-social-share {
	display: none;
}

.gdlr-core-port-info-item {
	padding-bottom: 20px !important;
}

.gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h1, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h2, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h3, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h4, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h5, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] h6, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] .gdlr-core-skin-title, .gdlr-core-page-builder-body [data-skin="Portfolio Homepage"] .gdlr-core-skin-title a {
	color: #fff !important;
}

/* SLIDER-OVERLAP CARD — on any interior page with a page slider, the
   content section directly after the slider becomes a white card pulled
   up over the image: rounded top corners, accent line, top-cast shadow.
   Excluded: homepage, Projects (5173), Works (4614), News (4913). */
body:not(.home):not(.page-id-5173):not(.page-id-4614):not(.page-id-4913)
  .gdlr-core-pbf-wrapper:has(.gdlr-core-revolution-slider-item)
  + .gdlr-core-pbf-wrapper .gdlr-core-pbf-wrapper-container,
body.single-post .realfactory-content-container.realfactory-container {
  background: #fff;
  padding: 45px 50px 30px;
  position: relative;
  margin: -170px auto 40px;
  z-index: 5;
  border-top: 3px solid #025296;
  border-radius: 8px 8px 0 0;
  box-shadow:
    0 -16px 38px rgba(15, 27, 45, 0.14),   /* top-weighted shadow over the slider */
    0 12px 30px rgba(15, 27, 45, 0.06);    /* subtle ambient depth below */
}

/* Single posts: no slider — the solid navy title band is the backdrop.
   Card overlaps less, and the title keeps clear space above the card. */
body.single-post .realfactory-content-container.realfactory-container {
  margin-top: -100px;
}
/* The card's own padding replaces the theme's 60px/40px content-area padding */
body.single-post .realfactory-content-area {
  padding-top: 0;
  padding-bottom: 0;
}
body.single-post .realfactory-blog-title-wrap .realfactory-blog-title-content {
  padding-bottom: 160px !important;  /* 100px card overlap + 60px space under title */
}

@media (max-width: 767px) {
  body:not(.home):not(.page-id-5173):not(.page-id-4614):not(.page-id-4913)
    .gdlr-core-pbf-wrapper:has(.gdlr-core-revolution-slider-item)
    + .gdlr-core-pbf-wrapper .gdlr-core-pbf-wrapper-container,
  body.single-post .realfactory-content-container.realfactory-container {
    margin-top: -60px;
    padding: 30px 24px 20px;
  }
  body.single-post .realfactory-blog-title-wrap .realfactory-blog-title-content {
    padding-bottom: 110px !important;  /* 60px overlap + 50px space under title */
  }
}