/*
Theme Name:     JS Robin
Theme URI:      https://jspolikno.cz
Description:    Child theme for Divi – customized for JS Robin
Author:         David Klhufek
Author URI:     https://phirebase.com
Template:       Divi
Version:        1.0.0
License:        GNU General Public License v2 or later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    js-robin
*/

/* === Mobile Menu Styling === */
ul#mobile_menu.et_mobile_menu a,
ul#top-menu a {
    text-transform: uppercase;
}

/* === Image Titles Off === */
.mfp-title {
    display: none;
}

/* =====================================================
   CUSTOM GALLERY GRID – Post + Page galerie
   ===================================================== */

/* GRID layout */
.custom_gallery .et_post_gallery,
.custom_gallery .et_pb_gallery_items {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* reset Divi layout */
.custom_gallery .et_pb_gallery_item,
.custom_gallery .et_post_gallery .et_pb_gallery_image {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* galerie karta */
.custom_gallery .et_pb_gallery_item,
.custom_gallery .et_post_gallery .et_portfolio_image {
  border-radius: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* obrázky */
.custom_gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* hover efekt – zvětší se celý box */
.custom_gallery .et_pb_gallery_item:hover,
.custom_gallery .et_post_gallery .et_portfolio_image:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
}

/* vypnutí Divi overlay */
.custom_gallery .et_overlay {
  display: none !important;
}

/* fix inline width */
.custom_gallery .et_pb_gallery_item {
  width: 100% !important;
}

/* responsivita */
@media (max-width: 980px) {
  .custom_gallery .et_post_gallery,
  .custom_gallery .et_pb_gallery_items {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .custom_gallery .et_post_gallery,
  .custom_gallery .et_pb_gallery_items {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .custom_gallery .et_post_gallery,
  .custom_gallery .et_pb_gallery_items {
    grid-template-columns: 1fr;
  }
}

/* === Divi Contact Form === */
span.et_pb_contact_field_options_title {
    color: white;
}

.et-pb-contact-message {
    /* position: relative; */
    color: white;
}

/* Fix Checkbox color */ 
.et_pb_contact_field_5 .et_pb_contact_field_checkbox label i {
  position: relative; /* pro absolutní ::after */
  display: inline-block;
  width: 17px;        /* zachovat rozměr původního boxu */
  height: 17px;
  vertical-align: middle;
}

/* skryjeme pozadí/ikonku, kterou Divi může používat pro box (fallback) */
.et_pb_contact_field_5 .et_pb_contact_field_checkbox label i::before {
  content: none !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* default: žádná fajfka, jen prázdné ::after */
.et_pb_contact_field_5 .et_pb_contact_field_checkbox label i::after {
  content: "" ;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  line-height: 1;
  width: 17px;
  height: 17px;
  text-align: center;
  pointer-events: none;
}

/* když je checkbox zaškrtnutý: vložíme fajfku a nastavíme barvu */
.et_pb_contact_field_5 .et_pb_contact_field_checkbox input[type="checkbox"]:checked + label i::after {
  content: "✓" !important;          
  color: #2c2623 !important;        
  font-weight: 700 !important;
}

/* fallback pokud je sibling ~ (jen pro jistotu) */
.et_pb_contact_field_5 .et_pb_contact_field_checkbox input[type="checkbox"]:checked ~ label i::after {
  content: "✓" !important;
  color: #2c2623 !important;
  font-weight: 700 !important;
}

/* === TablePress === */
.tablepress-id-1 thead th {
  background-color: #b89c7a !important;
  color: #fff;
}
.tablepress-id-2 thead th {
  background-color: #b89c7a !important;
  color: #fff;
}
.tablepress-id-3 thead th {
  background-color: #b89c7a !important;
  color: #fff;
}
.tablepress>:where(thead)>tr>* {
    background-color: #b89c7a;
}

/* === Scroll to Top Button === */
.et_pb_scroll_top.et-pb-icon {
    color: white;
    right: 30px;
    bottom: 30px;
    padding: 8px;
    border-radius: 30px;
    background: #b89c7a; 
    font-size: 32px;
    transition: all 0.1s ease-in-out;
}

.et_pb_scroll_top.et-pb-icon:hover {
    bottom: 32px;
    background: #b89c7a;
    transition: all 0.1s ease-in-out;
}

/* === Scroll Top Animations === */
.et_pb_scroll_top.et-visible {
    animation: fadeInBottom 1s cubic-bezier(0.50, 0, 0.16, 1);
}
.et_pb_scroll_top.et-hidden {
    opacity: 0;
    animation: fadeOutBottom 1s cubic-bezier(0.77, 0, 0.175, 1);
}

