/*
Theme Name:     Divi Child
Theme URI:      https://dev.janiswoode.com/
Description:    A custom child theme for the Divi theme used on dev.janiswoode.com
Author:         Geoff Davis
Author URI:     https://dev.janiswoode.com/
Template:       Divi
Version:        1.0.0
*/

/* GALLERY GRID */
.jw-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.jw-gallery-item {
  width: calc(33.33% - 20px);
  box-sizing: border-box;
  position: relative;
}
.jw-image-container {
  height: 300px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}
.jw-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jw-image-container:hover img {
  transform: scale(1.1);
  filter: brightness(75%);
}
.jw-title-bar {
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 6px 0;
  font-weight: bold;
  text-transform: uppercase;
  transition: top 0.3s ease;
  z-index: 2;
}
.jw-quick-view {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
  border: 2px solid white;
  background: transparent;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.jw-image-container:hover .jw-title-bar {
  top: 0;
}
.jw-image-container:hover .jw-quick-view {
  opacity: 1;
}

/* MODAL OVERLAY */
.jw-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99999;
  overflow: auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.jw-modal-content {
  background: #fff;
  padding: 30px;
  max-width: 90vw;
  margin: 40px auto;
  text-align: center;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
  z-index: 100000;
}

.jw-modal-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

.jw-modal-text {
  margin-top: 20px;
  text-align: center;
}
.jw-modal-line {
  color: #666;
  font-size: 16px;
  margin: 4px 0;
}

body.jw-modal-open {
  overflow: hidden;
}

/* Keep header and footer below modal */
#main-header,
#main-footer,
.et-l--header,
.et-l--footer,
footer,
.et-l.et-l--footer {
  z-index: 10 !important;
  position: relative;
}

/* RESPONSIVE GALLERY */
@media (max-width: 768px) {
  .jw-gallery-item {
    width: 100%;
  }
}

/* FOOTER MENU TEXT COLOR */
.et_pb_menu_0_tb_footer .et-menu li a {
  color: #ffffff !important;
}

/* HEADER LOGO INDENTATION */
.jw-header-indent {
  margin-left: 8px;
}
.jw-header-indent a {
  display: block;
  font-weight: bold;
  text-decoration: none;
  color: inherit;
}
.jw-header-indent .line-2 {
  font-style: italic;
}

/* PAGINATION STYLES */
.jw-pagination {
  text-align: center;
  margin-top: 30px;
}
.jw-page-link {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 5px;
  border: 1px solid #ccc;
  color: #333;
  text-decoration: none;
}
.jw-page-link.current {
  background: #333;
  color: #fff;
  font-weight: bold;
}
.jw-page-link:hover {
  background: #eee;
}
