/*!/wp-content/themes/divi-child/style.css*//*
Theme Name: Divi Child
Theme URI: https://asksonnie.info/
Description: Child theme for ASKSonnie.INFO — includes custom post templates and automatic ALT attribute injection.
Author: Sonnie Santos
Author URI: https://asksonnie.info/
Template: Divi
Version: 1.0.0
*/

/* =======================================================
   ASKSonnie.INFO — Stable CSS (safe rollback)
   - Tag buttons
   - Desktop & mobile dropdown menus
   - Header layering/clickability (no manual toggles)
   ======================================================= */

/* ===============================
   TAG BUTTONS
   =============================== */
.post-tags a{
  display:inline-block;
  background-color:#3ea0f7; /* brand blue */
  color:#fff !important;
  padding:5px 12px;
  margin:3px;
  border-radius:20px;
  font-size:13px;
  text-decoration:none;
  transition:background .3s ease;
}
.post-tags a:hover{ background-color:#1d7ed6; /* darker blue on hover */ }

/* ===============================
   DESKTOP DROPDOWN MENU
   =============================== */
.et-l--header,
#main-header,
.et_menu_container,
#et-top-navigation,
#main-header .container{
  overflow:visible !important; /* allow dropdowns to escape header */
}

#top-menu li{ position:relative; }

#top-menu li ul.sub-menu{
  position:absolute !important;
  z-index:999999 !important; /* force on top */
  background:rgba(255,255,255,0.9); /* semi-transparent white */
  backdrop-filter:blur(6px); /* glassy blur effect */
  -webkit-backdrop-filter:blur(6px); /* Safari */
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  border-radius:6px;
  padding:8px 0;
}

#top-menu li ul.sub-menu a{
  color:#111 !important;
  padding:12px 16px;
  display:block;
  font-size:14px;
  font-weight:500;
  transition:background 0.3s ease, color 0.3s ease;
}

#top-menu li ul.sub-menu a:hover{
  background:rgba(62,160,247,0.15); /* brand blue tint */
  color:#0056b3 !important;
  border-radius:4px;
}

/* ===============================
   MOBILE DROPDOWN MENU
   =============================== */
@media (max-width:980px){
  #top-menu li ul.sub-menu{
    background:#ffffff !important;  /* solid white for speed */
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  #top-menu li ul.sub-menu a{
    font-size:15px;
    padding:14px 18px;
  }
  #top-menu li ul.sub-menu a:hover{
    background:#f0f6ff; /* light blue hover */
    color:#0056b3 !important;
  }
}

/* ===============================
   HEADER LAYERING / CLICKABILITY
   =============================== */
.et-l--header,
#main-header{
  position:relative;
  z-index:9999;
}

/* Keep header controls clickable above hero content */
.et_pb_menu__wrap,
.et_pb_menu__menu,
.et_pb_menu__search-button,
.et_pb_menu__icon,
.et_pb_menu__hamburger,
.et_pb_menu__mobile-toggle{
  pointer-events:auto !important;
  position:relative;
  z-index:10000;
}

/* Ensure dropdown/search containers render above page */
.et_pb_menu__menu,
.et_pb_menu__menu nav,
.et_mobile_menu,
.et_pb_menu__search-container{
  position:relative;
  z-index:10000;
  overflow:visible !important;
}

/* Make logo reliably visible */
.et_pb_menu__logo img{
  display:inline-block !important;
  opacity:1 !important;
  visibility:visible !important;
  max-height:64px;
  width:auto;
}
.et_pb_menu__logo,
.et_pb_menu__logo a{
  display:inline-flex;
  align-items:center;
  min-height:48px;
}

/* Neutralize hero overlays if they extend over header */
#ask-home::before,#ask-home::after,
#ask-home .hero::before,#ask-home .hero::after{
  pointer-events:none !important;
}

/* Minimal mobile hygiene (won’t alter layout radically) */
@media (max-width:980px){
  html,body{ overflow-x:hidden !important; }
  img,video{ max-width:100%; height:auto; }
}

/* ===============================
   Minimalist Share Bar (hover reveal)
   =============================== */

.asksonnie-share-bar {
  position: relative;
  margin-top: 10px;
  display: inline-block;
}

.asksonnie-share-bar strong {
  font-size: 15px;
  color: #111;
  cursor: pointer;
  transition: color 0.3s ease;
}

.asksonnie-share-bar strong:hover {
  color: #409bfe;
}

.asksonnie-share-links {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  white-space: nowrap;
  background: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 10;
}

.asksonnie-share-bar:hover .asksonnie-share-links {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.asksonnie-share-links a {
  display: inline-block;
  margin: 0 6px;
  font-size: 14px;
  color: #409bfe !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.asksonnie-share-links a:hover {
  color: #1d7ed6 !important;
}

/* optional: icons */
.asksonnie-share-links a::before {
  content: attr(data-icon);
  margin-right: 4px;
}

.asksonnie-share-bar {
  margin: 16px 0 4px;
  text-align: left;
  position: relative;
}

.asksonnie-share-links a {
  display: none;
  margin-right: 10px;
  font-size: 14px;
  text-decoration: none;
  color: #409bfe;
  transition: opacity 0.3s ease;
}

.asksonnie-share-bar:hover .asksonnie-share-links a {
  display: inline-block;
}

.asksonnie-share-links a:hover {
  opacity: 0.7;
}

.asksonnie-like-bar {
  margin-top: 10px;
}

.asksonnie-share-bar {
  position: relative;
  display: inline-block;
  margin: 10px 0;
}

.asksonnie-share-bar strong {
  cursor: pointer;
  color: #111;
  transition: color .3s ease;
}

.asksonnie-share-bar strong:hover {
  color: #0073aa;
}

.asksonnie-share-links {
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all .3s ease;
  position: absolute;
  left: 0;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  white-space: nowrap;
}

.asksonnie-share-bar:hover .asksonnie-share-links {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.asksonnie-share-links a {
  text-decoration: none;
  margin: 0 6px;
  font-size: 16px;
  line-height: 1;
}

/* === Inline Related Posts Styling === */
.ask-related-posts {
  margin: 3em 0 2em;
  padding: 1.5em;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.ask-related-posts h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8em;
  color: #2c5282; /* Matches your ASK brand blue */
  font-weight: 700;
  letter-spacing: 0.3px;
}

.ask-related-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75em;
}

.ask-related-posts li a {
  color: #409bfe;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  border-bottom: 1px dashed transparent;
}

.ask-related-posts li a:hover {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  padding-left: 4px;
}

/* ----------------------------------------------------
   FONT DISPLAY FIX — Improve LCP & Prevent FOIT
---------------------------------------------------- */
@font-face{font-family:'Inter';font-display:swap;}

@font-face{font-family:'Cabin';font-display:swap;}

@font-face{font-family:'Butterfly Kids';font-display:swap;}

@font-face{font-family:'ETmodules';font-display:swap;}

/* Force FA swap */
@font-face{font-family:'Font Awesome 6 Free';font-display:swap;}

/* Global image optimization */
.entry-content img,
.et_pb_module img,
.et_pb_image img,
.saboxplugin-wrap img {
    max-width: 500px !important;
    width: 100% !important;
    height: auto !important;
}

.ask-awards-banner img,
.ask-collab-banner img {
    max-width: 380px !important;
    margin-left: auto;
    margin-right: auto;
}

/* GLOBAL MOBILE IMAGE SIZE OPTIMIZATION */
@media (max-width: 600px) {

    /* Limit only content images—not logos or layout images */
    .entry-content img,
    .et_pb_text img {
        max-width: 480px !important;
        height: auto !important;
    }

    /* Prevent Divi text modules from stretching images */
    .et_pb_text img {
        width: auto !important;
    }

    /* Ensure responsive scaling inside content containers */
    .entry-content img {
        width: 100%;
        height: auto;
    }
}