/*
  Theme Name: FZS Divi Child Theme
  Version: 1.0.2
  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)
*/

/*** DIVI RESET ***/

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

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

/*** 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) ***/
  
.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;
}

/*** DIVI BLOG PAGINATION INVERTER ***/

.et_pb_blog_grid_wrapper.blog-posts .pagination .alignleft {
    float: right;
}
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignright {
    float: left;
}
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignleft a,
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignright a {
    font-size: 0;
}
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignleft a::before,
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignright a::before {
    font-size: 14px;
}
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignleft a::before {
    content: 'Régebbi bejegyzések »';
}
.et_pb_blog_grid_wrapper.blog-posts .pagination .alignright a::before {
    content: '« Újabb bejegyzések';
}

/*** 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;
    }
}

/* 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;
}

/*** DIVI BLOG GRID (single row, same height) ***/

.et_pb_blog_grid_wrapper.et_pb_blog_grid_wrapper--single-row {
    display: flex;
}
.et_pb_blog_grid_wrapper.et_pb_blog_grid_wrapper--single-row .et_pb_salvattore_content {
    display: flex;
}
.et_pb_blog_grid_wrapper.et_pb_blog_grid_wrapper--single-row .et_pb_salvattore_content .column article {
    display: flex;
    flex-direction: column;
}
.et_pb_blog_grid_wrapper.et_pb_blog_grid_wrapper--single-row article .entry-featured-image-url {
    margin-bottom: 0;
}
@media all and (min-width: 981px) {
    .et_pb_blog_grid_wrapper.et_pb_blog_grid_wrapper--single-row .et_pb_salvattore_content .column article {
        height: 100%;
        margin-bottom: 0 !important;
    }
}

/*** 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;
    }
}

/*** 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';
}

/* 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); }
}
