/*
  Theme Name: FZS Divi Child Theme
  Version: 1.3.18
  Template: Divi
  Author: Zsombor Franczia
  Author URI: https://frzsombor.com
  GitHub Theme URI: https://github.com/frzsombor-wordpress/fzs-divi-child-theme
  Text Domain: fzs-divi-child-theme
  License: Unlicensed (private)
*/

/*
  Legal notice:
  This template is the property of Zsombor Franczia and is protected by international copyright laws.
  Unauthorized use of this template or any portion of it may result in severe civil and criminal 
  penalties and will be prosecuted to the maximum extent possible under the law. All files of the 
  template are confidential and proprietary information and may not be distributed, reproduced, or 
  otherwise disclosed to any third party without prior written consent from the Author.
  Copyright 2023 - Zsombor Franczia
  All rights reserved!

  Jogi információk:
  Ez a sablon Franczia Zsombor szellemi tulajdona, és nemzetközi szerzői jogi törvények védik.
  Ennek a sablonnak vagy bármely részének jogosulatlan használata súlyos polgári és büntetőjogi 
  következményeket vonhat maga után és a törvény által lehetséges maximális mértékig büntetőeljárás
  indítható a jogosulatlan felhasználó ellen. Az sablon összes fájlja bizalmas és védett információ
  és nem terjeszthető, reprodukálható vagy nem bocsátható harmadik fél rendelkezésére a szerző előzetes
  írásbeli engedélye nélkül.
  Copyright 2023 - Franczia Zsombor
  Minden jog fenntartva!
*/

/*** DIVI RESET ***/

body {
    font-weight: 400;
}

/* Remove default paddings */
h1, h2, h3, h4, h5, h6 {
    padding-bottom: 0;
}

/* Fix button positioning */
.et_pb_button_module_wrapper > a {
    vertical-align: top;
}

/* Contact form fixes */
.et_pb_contact .et_contact_bottom_container {
    width: 100%;
    justify-content: right;
}
.et_pb_contact .et_contact_bottom_container .et_pb_contact_right {
    width: 100%;
}
.et_pb_contact .et_contact_bottom_container .et_pb_contact_right input {
    text-align: center;
}

/*** DIVI PIXEL RESET ***/

.dipi-advanced-tabs .dipi-at-panels .et_pb_module.dipi_advanced_tabs_item {
    margin-bottom: 0;
}

/*** FONTAWESOME SUPPORT (Current: Font Awesome Free 5.15.1) ***/
/* Usage: <i class="et-pb-icon et-pb-icon--fa-solid">[glyph]</i> */

.et-pb-icon.et-pb-icon--fa-solid,
.et-pb-icon.et-pb-icon--fa-regular,
.et-pb-icon.et-pb-icon--fa-light,
.et-pb-icon.et-pb-icon--fa-thin,
.et-pb-icon.et-pb-icon--fa-brands {
    font-family: FontAwesome !important;
}
.et-pb-icon.et-pb-icon--fa-solid {
    font-weight: 900 !important;
}
.et-pb-icon.et-pb-icon--fa-regular {
    font-weight: 400 !important;
}
.et-pb-icon.et-pb-icon--fa-light {
    font-weight: 300 !important;
}
.et-pb-icon.et-pb-icon--fa-thin {
    font-weight: 100 !important;
}
.et-pb-icon.et-pb-icon--fa-brands {
    font-weight: 400 !important;
}

/*** HELPERS ***/

/* COLUMN HELPERS */

/* Centered content columns */
.fzs-column-center-content {
    /* Divi Pixel version (with flex-direction) */
    display: flex;
    flex-direction: column;
    justify-content: center !important;
}
.fzs-column-center-content-wrap {
    /* Divi Pixel version (with wrap and without flex-direction) */
    display: flex;
    flex-wrap: wrap;
    align-self: center;
}

/* Divider column */

.fzs-column-with-divider {
    display: none;
}
@media all and (min-width: 981px) {
    .fzs-column-with-divider {
        display: flex;
        justify-content: center;
    }
    .fzs-column-with-divider .et_pb_module.et_pb_code {
        display: flex;
    }
    .fzs-column-with-divider hr {
        height: 100%;
        border: none;
        border-right-width: 1px;
        border-right-style: solid;
    }
}

/* ROW HELPERS */

/* Reverse columns */
@media all and (max-width: 767px) {
    .fzs-row-reversecolumns-mobile {
        display: flex;
        flex-direction: column-reverse;
    }
    .fzs-row-reversecolumns-mobile .et_pb_column {
        margin-bottom: 0;
    }
}
@media all and (min-width: 768px) and (max-width: 980px) {
    .fzs-row-reversecolumns-tablet {
        display: flex;
        flex-direction: column-reverse;
    }
    .fzs-row-reversecolumns-tablet .et_pb_column {
        margin-bottom: 0;
    }
}

/* Keep columns */
@media all and (max-width: 767px) {
    .fzs-row-keepcolumns-mobile {
        display: flex;
    }
    .fzs-row-keepcolumns-mobile .et_pb_column {
        margin-bottom: 0;
    }
}
@media all and (min-width: 768px) and (max-width: 980px) {
    .fzs-row-keepcolumns-tablet {
        display: flex;
    }
    .fzs-row-keepcolumns-tablet .et_pb_column {
        margin-bottom: 0;
    }
}

/* Half-fullpage background row */

/* Layout info:
 * - Section
 *   - Row (class: half-fullpage-bg-row)
 *     - Column
 *       - Image (margin-bottom(0); border-radius; box-shadow)
 *   - Row
 *     - Column [empty] (css[desktop](width: 40% !important;) css[tablet](CLEAR!))
 *     - Column (css[desktop](width: 60% !important; margin: 120px auto;), css[tablet](margin-top: -15vw;))
 *       - [content]
 */

.et_pb_row.half-fullpage-bg-row {
    width: 100%;
    max-width: none;
    height: 100%;
}
@media (min-width: 981px) {
    .et_pb_row.half-fullpage-bg-row {
        position: absolute!important;
    }
}

.et_pb_row.half-fullpage-bg-row,
.et_pb_row.half-fullpage-bg-row + .et_pb_row {
    padding: 0;
}

.et_pb_row.half-fullpage-bg-row .et_pb_image {
    height: 100%;
}
@media (min-width: 981px) {
    .et_pb_row.half-fullpage-bg-row .et_pb_image {
        width: 50vw;
    }
}

.et_pb_row.half-fullpage-bg-row .et_pb_image > .et_pb_image_wrap {
    width: 100%;
    height: 100%;
}
.et_pb_row.half-fullpage-bg-row .et_pb_image > .et_pb_image_wrap > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* No column margins */
@media all and (max-width: 767px) {
    .fzs-row-columns-nomargin-mobile .et_pb_column {
        margin-bottom: 0;
    }
}
@media all and (min-width: 768px) and (max-width: 980px) {
    .fzs-row-columns-nomargin-tablet .et_pb_column {
        margin-bottom: 0;
    }
}

/*** BUTTONS HELPER (inline block) ***/

.et_pb_button_module_wrapper:has(.et_pb_button--inline-block) {
    display: inline-block;
}

/*** TEXT WITH HYPHENS ***/

.et_pb_text.et_pb_text--hyphens {
    width: 100%;
    hyphens: auto;
    word-wrap: break-word;
}

/*** DIVI BLOG GRID ***/

.et_pb_posts.et_pb_posts--grid {
    --blog-grid-gap: var(--fzs-divi-blog-grid-gap, 32px);
}

.et_pb_posts.et_pb_posts--grid .et_pb_ajax_pagination_container {
    display: flex;
    flex-wrap: wrap;
}

.et-db #et-boc .et-l .et_pb_posts.et_pb_posts--grid .et_pb_post {
    width: 100%;
    margin: 0 0 var(--blog-grid-gap) 0;
}
@media (min-width: 768px) and (max-width: 980px) {
    .et-db #et-boc .et-l .et_pb_posts.et_pb_posts--grid .et_pb_post {
        /* https://stackoverflow.com/a/39862756/2953830 */
        width: calc(1/2*100% - (1 - 1/2)*var(--blog-grid-gap));
        margin: 0 var(--blog-grid-gap) var(--blog-grid-gap) 0;
    }
    .et-db #et-boc .et-l .et_pb_posts.et_pb_posts--grid .et_pb_post:nth-child(2n) {
        margin-right: 0;
    }
}
@media (min-width: 981px) {
    .et-db #et-boc .et-l .et_pb_posts.et_pb_posts--grid .et_pb_post {
        /* https://stackoverflow.com/a/39862756/2953830 */
        width: calc(1/3*100% - (1 - 1/3)*var(--blog-grid-gap));
        margin: 0 var(--blog-grid-gap) var(--blog-grid-gap) 0;
    }
    .et-db #et-boc .et-l .et_pb_posts.et_pb_posts--grid .et_pb_post:nth-child(3n) {
        margin-right: 0;
    }
}

.et_pb_posts.et_pb_posts--grid .et_pb_ajax_pagination_container > div:last-child {
    /* This must be the paginator */
    width: 100%;
}

/*** DIPI MANSORY - ONE LINE, FULL HEIGHT ***/

@media only screen and (min-width: 981px) {
    .dipi_masonry_gallery--one-line-full-height,
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner,
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner > .grid,
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner > .grid .grid-item,
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner > .grid .grid-item .img-container,
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner > .grid .grid-item .img-container img {
        height: 100% !important;
    }
    .dipi_masonry_gallery--one-line-full-height > .et_pb_module_inner > .grid .grid-item .img-container img {
        object-fit: cover;
    }
}

/*** DIPI NUMBERED TIMELINE ***/

.et-db #et-boc .et-l .dipi_timeline.dipi_timeline--numbered .dipi_timeline_item .ribbon-icon-wrap .ribbon-icon {
    font-family: inherit !important;
    font-size: 0px;
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item .ribbon-icon-wrap .ribbon-icon:after {
    font-family: inherit !important;
    font-size: 16px !important;
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(1) .ribbon-icon-circle:after {
    content: '1.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(2) .ribbon-icon-circle:after {
    content: '2.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(3) .ribbon-icon-circle:after {
    content: '3.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(4) .ribbon-icon-circle:after {
    content: '4.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(5) .ribbon-icon-circle:after {
    content: '5.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(6) .ribbon-icon-circle:after {
    content: '6.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(7) .ribbon-icon-circle:after {
    content: '7.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(8) .ribbon-icon-circle:after {
    content: '8.'
}
.dipi_timeline.dipi_timeline--numbered .dipi_timeline_item:nth-child(9) .ribbon-icon-circle:after {
    content: '9.'
}

/*** DIPI CAROUSEL - GRID ON DESKTOP ***/

@media (min-width: 981px) {
    .dipi_carousel.dipi_carousel--grid-on-desktop .dipi-carousel-wrapper {
        width: 100% !important;
        transform: none !important;
        flex-wrap: wrap;
    }
    .dipi_carousel.dipi_carousel--grid-on-desktop .dipi_carousel_child {
        /* https://stackoverflow.com/a/39862756/2953830 */
        width: calc(1/3 * 100% - (1 - 1/3) * 32px) !important;
        margin-bottom: 32px !important;
    }
    .dipi_carousel.dipi_carousel--grid-on-desktop .dipi_carousel_child:nth-child(3n) {
        margin-right: 0 !important;
    }
}

/*** DIPI CAROUSEL - OVERFLOW VISIBLE ***/

.dipi_carousel.dipi_carousel--overflow-visible .swiper-container {
    overflow: visible;
}

/*** DIVI FULL SIZE COVER IMAGE ***/

.et_pb_image.et_pb_image--fullsize-cover,
.et_pb_image.et_pb_image--fullsize-cover .et_pb_image_wrap,
.et_pb_image.et_pb_image--fullsize-cover .et_pb_image_wrap img {
    width: 100%;
    height: 100%;
}
.et_pb_image.et_pb_image--fullsize-cover .et_pb_image_wrap img {
    object-fit: cover;
}

/*** VISIBILITY HELPERS ***/

@media all and (max-width: 767px) {
    .fzs-hide-on-mobile {
        display: none !important;
    }
}
@media all and (min-width: 768px) and (max-width: 980px) {
    .fzs-hide-on-tablet {
        display: none !important;
    }
}
@media all and (min-width: 981px) {
    .fzs-hide-on-desktop {
        display: none !important;
    }
}

.fzs-pointer-events-none {
    pointer-events: none;
}

/*** HIDE STUFF ON LIVE PAGE ONLY (BUT NOT IN EDITOR) ***/

body:not(.et-fb-root-ancestor) .hide-on-live-page {
    display: none !important;
}
body.et-fb-root-ancestor .hide-on-live-page {
    opacity: 0.5 !important;
    filter: blur(1.5px) !important;
    border-width: 2px !important;
    border-color: red !important;
    border-style: dashed !important;
}

/*** MENU HELPERS ***/

/* Mobile menu hamburger -> close icon on open */
.mobile_nav.opened .mobile_menu_bar:before {
    content: '\4d' !important;
}

/* Disable mobile hamburger menu (.et_pb_menu--disable-mobile-menu) */
.et_pb_menu.et_pb_menu--disable-mobile-menu .et_pb_menu__wrap > .et_mobile_nav_menu {
    display: none !important;
}
.et_pb_menu.et_pb_menu--disable-mobile-menu .et_pb_menu__wrap > .et_pb_menu__menu {
    display: flex !important;
    flex-grow: 1;
}

/*** ANIMATIONS (don't use divi animations) ***/

.fzs-animation-spin {
    -webkit-animation-name: fzs-spin;
    animation-name: fzs-spin;
    -webkit-animation-duration: 2000ms;
    animation-duration: 2000ms;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear; 
}
@keyframes fzs-spin {
    from { transform:rotate(0deg); }
    to { transform:rotate(360deg); }
}
