
/* 
 Theme Name:     InGoal
 Author:         David Hutchison
 Author URI:     https://ingoalmag.com
 Template:       Divi
 Version:        1.0 
*/ 


/* ----------- PUT YOUR CUSTOM CSS BELOW THIS LINE -- DO NOT EDIT ABOVE THIS LINE --------------------------- */ 

/* ============================================================
   INGOAL COLOR SYSTEM (CSS variables)
   Define brand-wide colors here and use via:
     color: var(--ingoal-blue);
     background-color: var(--ingoal-grey-light);
   Over time, replace hard-coded hex values with these.
============================================================ */
:root {
  /* Brand blues */
  --ingoal-blue: #012785;
  --ingoal-blue-light: #0073e6;

  /* Feedback / status colors */
  --ingoal-red: #c62828;
  --ingoal-red-light: #ffebee;

  --ingoal-green: #2e7d32;
  --ingoal-green-light: #e8f5e9;

  --ingoal-amber: #f9a825;

  /* Greys / neutrals */
  --ingoal-grey-light: #eceff1;
  --ingoal-grey-mid: #b0bec5;
  --ingoal-grey-dark: #37474f;
}

/* =========================================
   Pagination (WP-PageNavi)
   - Overrides WP-PageNavi plugin styles
   - !important is usually needed here
========================================= */
.wp-pagenavi a,
.wp-pagenavi span {
  padding: 0.3em 0.8em !important; /* override plugin padding */
  background: #999 !important;      /* ensure base background */
  transition: all .5s;
}

.wp-pagenavi span.current {
  background: #333 !important;
}

.wp-pagenavi a:hover {
  background: #333 !important;
}

.wp-pagenavi .pages {
  background: none;
}

/* =========================================
   Header / Menus (Divi + Theme Builder)
========================================= */

/* Logo */
.et_pb_menu__logo img {
  padding-bottom: 10px !important; /* Divi often sets this inline */
}

/* Kill Divi’s default bottom underline on links */
.et_pb_menu .et-menu > li > a:after,
#top-menu > li > a:after {
  display: none !important; /* Divi uses this pseudo-element for underline */
}

/* Mobile burger icon colour */
span.mobile_menu_bar:before {
  color: #fff !important; /* overrides Divi’s default icon color */
}

/* Hide old “Select Page” fallback */
.select_page {
  visibility: hidden;
}

/* Links in dark modules */
.et_pb_bg_layout_dark .et_pb_module_header a {
  color: #fff;
}

/* ---------- Spacing normalization ---------- */
/* Support both Theme Header (#top-menu) and Menu Module (.et-menu) */
#top-menu,
.et_pb_menu .et-menu {
  display: flex;
  gap: 22px; /* uniform spacing between items */
}

/* Remove stray margins/padding from LIs */
#top-menu > li,
.et_pb_menu .et-menu > li {
  margin: 0 !important;  /* Divi adds margins */
  padding: 0 !important; /* and padding on li items */
}

/* Normalize anchor padding; keep decent hit-area */
#top-menu > li > a,
.et_pb_menu .et-menu > li > a {
  display: inline-block;
  padding: 8px 0 !important; /* vertical pad only; horizontal handled by gap */
  line-height: 1.1;
}

/* Add a little extra room only for caret items without affecting layout */
#top-menu .menu-item-has-children > a,
.et_pb_menu .et-menu > .menu-item-has-children > a {
  padding-right: 14px !important;
}

/* Neutralize “current” item padding anomalies */
#top-menu .current-menu-item > a,
#top-menu .current_page_item > a,
.et_pb_menu .et-menu > .current-menu-item > a,
.et_pb_menu .et-menu > .current_page_item > a {
  padding-left: 0 !important;
}

/* Optional: center the whole menu row (remove comment if you want it centered) */
/*
#et-top-navigation #top-menu-nav,
.et_pb_menu .et_pb_menu__menu {
  justify-content: center;
}
*/

/* ---------- Hover/Focus/Active indicator ---------- */
/* Subtle animated bar that appears on hover/focus and persists on current page */
#top-menu > li > a,
.et_pb_menu .et-menu > li > a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left calc(100% - 0px);
  background-size: 0% 2px; /* hidden initially */
  transition: background-size 160ms ease-in-out;
}

/* Show bar on hover + keyboard focus */
#top-menu > li > a:hover,
#top-menu > li > a:focus-visible,
.et_pb_menu .et-menu > li > a:hover,
.et_pb_menu .et-menu > li > a:focus-visible {
  background-size: 100% 2px;
}

/* Keep bar visible on the active page items */
#top-menu .current-menu-item > a,
#top-menu .current_page_item > a,
.et_pb_menu .et-menu > .current-menu-item > a,
.et_pb_menu .et-menu > .current_page_item > a {
  background-size: 100% 2px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #top-menu > li > a,
  .et_pb_menu .et-menu > li > a {
    transition: none;
  }
}

/* =========================================
   Utilities
========================================= */
sup {
  font-size: .6em;
  vertical-align: super;
  bottom: 0;
}

/* Divi/BlockUI overlay tweak (Woo/checkout/loading overlays) */
.blockUI.blockOverlay {
  background-color: #0088d0 !important; /* override inline styles */
  opacity: 0.1 !important;
  box-shadow: 0 0 10px 1px #000 !important;
}

/* Audio player time visibility */
.mejs-time {
  overflow: visible;
  margin-top: -10px;
}

/* Social icons (custom ACF) */
.social-icon {
  display: inline-block;
  font-size: 24px;
  margin-right: 10px;
  color: #333;
  transition: color .3s ease-in-out;
}
.social-icon:hover {
  color: #0073e6;
}

/* Centered social UL (single, de-duped copy) */
ul.centered-social {
  width: 100%;
  text-align: center;
  margin: 0;
}
.centered-social li {
  float: none;
  display: inline-block;
}

/* Footer spacing */
#footer-widgets {
  padding-top: 10px;
}

/* =========================================
   Content: Drop cap
========================================= */
.et-dropcap {
  color: #012785;
  padding-bottom: 10px;
  padding-top: 0;
  margin-top: 0;
  padding-right: 10px;
  font-size: 7.5em;
  -webkit-text-stroke-width: 2px;
  -webkit-text-stroke-color: grey;
}

/* On mobile (screens ≤ 768px), scale it down */
@media (max-width: 768px) {
  .et-dropcap {
    font-size: 3.75em;
    -webkit-text-stroke-width: 1px; /* optional for better balance */
  }
}

/* =========================================
   Custom “Related Posts” grid (shortcode)
========================================= */
.ingoal-post-list.grid-2-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 600px) {
  .ingoal-post-list.grid-2-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .ingoal-post-list.grid-2-columns {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.ingoal-post {
  display: grid;
  grid-template-rows: auto auto 1fr;
  border: 1px solid #ddd;
  padding: 1rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: all .3s ease;
  height: 100%;
}

.ingoal-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,.1);
}

.ingoal-thumb img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  transition: transform .3s ease;
}

.ingoal-post:hover .ingoal-thumb img {
  transform: scale(1.05);
}

.ingoal-title {
  font-size: 1rem;
  margin: .5rem 0 .25rem;
}

.ingoal-excerpt {
  font-size: .9rem;
  color: #555;
  line-height: 1.2;
}

.ingoal-excerpt p {
  margin: 0;
}

/* =========================================
   Content spacing
========================================= */
.et_pb_text h2 {
  margin-top: 1.5rem;
}


/* ============================================================
   INGOAL MESSAGE STYLES (uses CSS variables)
   Reusable message boxes for all systems (gift, referrals,
   membership, login, forms, etc.)
   Usage:
     <div class="ingoal-message ingoal-error">...</div>
     <div class="ingoal-message ingoal-success">...</div>
     <div class="ingoal-message ingoal-warning">...</div>
     <div class="ingoal-message ingoal-info">...</div>
     <div class="ingoal-message ingoal-notice">...</div>
============================================================ */

.ingoal-message {
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  border: 3px solid red;
  background: yellow;
  font-size: 1rem;
  line-height: 1.6;
}

/* Ensure inner <p> tags don’t create spacing gaps */
.ingoal-message p {
  margin: 0;
}

/* Error (red) */
.ingoal-error {
  border-color: var(--ingoal-red);
  background-color: var(--ingoal-red-light);
  color: var(--ingoal-red);
}

/* Success (green) */
.ingoal-success {
  border-color: var(--ingoal-green);
  background-color: var(--ingoal-green-light);
  color: var(--ingoal-green);
}

/* Warning (amber) */
.ingoal-warning {
  border-color: var(--ingoal-amber);
  background-color: #fff8e1;
  color: var(--ingoal-amber);
}

/* Info (blue) */
.ingoal-info {
  border-color: var(--ingoal-blue-light);
  background-color: #e1f5fe;
  color: var(--ingoal-blue-light);
}

/* Neutral notice (grey) */
.ingoal-notice {
  border-color: var(--ingoal-grey-mid);
  background-color: var(--ingoal-grey-light);
  color: var(--ingoal-grey-dark);
}