/*
Theme Name: Halloween-Middle_Creek_Insurance
Author: Middle Creek Insurance
Author URI: http://middlecreekins.com
Description: Halloween seasonal child theme for Middle Creek Insurance, preserving the current site layout and content.
Version: 2026.10.29
Template: yith-wonder
Text Domain: bluehost-middle-creek-insurance
*/


/* =========================================================
   GLOBAL / NAV / BUTTONS
   ========================================================= */

/* Change Mobile Hamburger Menu Size (also affects close icon base) */
.wp-block-navigation__responsive-container-close svg,
.wp-block-navigation__responsive-container-open svg {
  fill: currentColor;
  display: block;
  height: 50px;
  pointer-events: none;
  width: 50px;
}

/* Main Menu Hover underline */
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
  background-image: linear-gradient(to right, #2196f3, #2196f3 50%, #005FAC 50%);
  background-size: 200% 100%;
  background-position: -100%;
  display: inline-block;
  padding: 5px 0;
  position: relative;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease-in-out;
}

.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:before {
  content: '';
  background: #005FAC;
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3px;
  transition: all 0.3s ease-in-out;
}

.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  background-position: 0;
}

.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover::before {
  width: 100%;
}

/* Button hover effect */
.wp-element-button:hover,
.wp-block-button__link:hover {
  background-color: #2196f3;
}


/* =========================================================
   HOMEPAGE
   ========================================================= */

/* Homepage hero title only */
.home .nfd-text-giga {
  font-family: "Cormorant Unicase", serif !important;
  letter-spacing: 1px;
  font-weight: 600 !important;
  color: #3986cd !important;
  background-color: #ffffff;
  padding: 0px 10px;
  border-radius: 10px;
  border: 2px solid #000;
}


/* =========================================================
   MOBILE (<= 599px): HEADER / NAV / LAYOUT FIXES
   ========================================================= */

@media screen and (max-width: 599px) {

  /* Mobile menu fix (top bar) */
  .wp-container-core-group-layout-2.wp-container-core-group-layout-2 {
    flex-wrap: nowrap;
    gap: 32px;
    align-items: center;
    bottom: auto;
    position: fixed;
    top: 0;
    left: 0px;
    z-index: 100;
    height: 37px;
    background-color: #3a9ef0;
    width: 100%;
    display: flex;
  }

  /* Change logo for Mobile */
  .wp-block-site-logo a,
  .wp-block-site-logo img {
    height: 35px;
    content: url(https://middlecreekins.com/wp-content/uploads/2023/12/Logo-mobile.png) !important;
    position: relative;
  }

  /* Change mobile menu icon */
  .wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    height: 34px;
    content: url(https://middlecreekins.com/wp-content/uploads/2023/12/menu-icon.png) !important;
  }

  /* Move email line down so it doesn't go under menu */
  .wp-block-column.is-vertically-aligned-center {
    padding-top: 14px;
  }

  /* Move phone number line up */
  .wp-container-core-group-layout-4.wp-container-core-group-layout-4 {
    flex-wrap: nowrap;
    justify-content: center;
    top: -24px;
    position: relative;
  }

  /* Mobile X close button */
  .wp-block-navigation__responsive-container-close svg,
  .wp-block-navigation__responsive-container-open svg {
    height: 35px;
    width: 35px;
    background-color: #f00;
  }

  /* Mobile Menu link spacing */
  .wp-container-core-navigation-layout-1.wp-container-core-navigation-layout-1 {
    gap: .65em;
    justify-content: flex-start;
  }

  /* Mobile Menu font size */
  .wp-block-navigation .wp-block-navigation-item {
    font-size: 1.2em;
  }

  /* Mobile Menu submenu spacing */
  .wp-block-navigation ul li {
    top: -20px;
  }

  /* Fix menu showing up under Mobile Menu */
  .wp-container-core-group-is-layout-2.wp-container-core-group-is-layout-2 {
    display: none;
  }

  /* Fix Blog words off edge on mobile */
  .wp-container-core-group-is-layout-8 > .alignfull {
    margin-right: calc(var(--wp--preset--spacing--80) * 0) !important;
    margin-left: calc(var(--wp--preset--spacing--80) * 0) !important;
  }
}


/* =========================================================
   MOBILE MENU ANIMATION (applies when menu is open)
   ========================================================= */

/* Mobile links slide in */
.wp-block-navigation__responsive-container.is-menu-open a {
  top: -30px; /* moves whole menu up */
  animation: mymove 1s;
  animation-fill-mode: forwards;
}

@keyframes mymove {
  from { right: 200px; }
  to   { right: -15px; }
}


/* =========================================================
   SCROLL TO TOP BUTTON
   ========================================================= */

.topbutton {
  height: 50px;
  width: 50px;
  position: fixed;
  right: 5px;
  bottom: 5px;
  z-index: 1;
  background-image: url("https://middlecreekins.com/wp-content/uploads/2024/02/arrow-up-icon3.png");
  background-repeat: no-repeat;
  display: none;
}


/* =========================================================
   CONTACT BUTTONS (<= 768px)
   ========================================================= */

@media (max-width: 768px) {

  /* Shared base */
  .mci-contact-phone a,
  .mci-contact-email a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 14px 18px;
    margin: 8px 0;

    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: all .2s ease;
  }

  /* PHONE – lighter refined blue */
  .mci-contact-phone a {
    background: #4287f5;
    border: 2px solid #021433;
    color: #ffffff !important;
    font-size: 20px;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
  }

  /* Circular icon badge */
  .mci-contact-phone i {
    background: rgba(255,255,255,.18);
    padding: 10px;
    border-radius: 50%;
    font-size: 18px;
    color: #ffffff;
  }

  /* EMAIL – outline but matching icon style */
  .mci-contact-email a {
    border: 2px solid #3f82b8;
    background: #ffffff;
    color: #3f82b8 !important;
    font-size: 0; /* hide long email */
  }

  .mci-contact-email a::after {
    content: "contact@\A middlecreekins.com";
    font-size: 18px;
    font-weight: 600;
    white-space: pre-line;
    text-align: center;
    line-height: 1.2;
  }

  /* Matching circular badge */
  .mci-contact-email i {
    background: rgba(63,130,184,.15);
    padding: 10px;
    border-radius: 50%;
    font-size: 18px;
    color: #3f82b8;
  }
}

/* =========================================================
   CARRIER CARDS -hide ghosting when flipped
   ========================================================= */
#mciCarrierApps .mci-card-inner{
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

#mciCarrierApps .mci-card-face{
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  overflow: hidden;
}

#mciCarrierApps .mci-card-back{
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

#mciCarrierApps .mci-carrier-card.is-flipped .mci-card-inner{
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

#mciCarrierApps .mci-logo-btn,
#mciCarrierApps .mci-carrier-logo,
#mciCarrierApps .mci-store-btn,
#mciCarrierApps .mci-store-links,
#mciCarrierApps .mci-carrier-row,
#mciCarrierApps .mci-back-row,
#mciCarrierApps .mci-btn-text,
#mciCarrierApps .mci-store-btn i{
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* =========================================================
   CUSTOM HEADER ICONS
   ========================================================= */

.mci-header-icon-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.mci-header-icon-row .wp-block-social-links {
  gap: 8px !important;
  margin: 0 !important;
}

.mci-custom-social-icon,
.mci-header-icon-row .wp-social-link {
  width: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  margin: 0 !important;
}

.mci-custom-social-icon img {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  object-fit: contain !important;
}

.mci-header-icon-row .wp-social-link svg {
  width: 22px !important;
  height: 22px !important;
}

/* =========================================================
   HALLOWEEN 2026 SEASONAL LAYER
   Preserves the current site structure; visuals only.
   ========================================================= */

:root {
  --mci-halloween-midnight: #07142f;
  --mci-halloween-navy: #0b2f66;
  --mci-halloween-blue: #126fc1;
  --mci-halloween-orange: #ff8a00;
  --mci-halloween-gold: #ffc857;
  --mci-halloween-cream: #fff8ec;
}

/* Use the supplied Halloween logo in the existing Site Logo block. */
.wp-block-site-logo img {
  content: url('assets/images/mci-halloween-logo.webp') !important;
  width: 211px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Header: keep all existing blocks, only change presentation. */
header + .wp-site-blocks,
.wp-site-blocks {
  --mci-halloween-accent: var(--mci-halloween-orange);
}

body > .wp-site-blocks > header,
.wp-site-blocks > header,
header.wp-block-template-part,
.wp-block-template-part > header {
  position: relative;
}

/* The exported header begins with this full-width white group. */
.wp-site-blocks > header .wp-block-group.alignfull.has-white-background-color,
header.wp-block-template-part .wp-block-group.alignfull.has-white-background-color {
  background: linear-gradient(180deg, #07142f 0%, #0b2f66 100%) !important;
  color: #fff !important;
  border-bottom: 3px solid var(--mci-halloween-orange);
}

.wp-site-blocks > header a,
header.wp-block-template-part a {
  color: #fff;
}


/* FIX: the exported Navigation block uses the theme's Base background color.
   On the normal white header that was invisible; on the Halloween dark header
   it became a white rectangle and hid the white navigation text. */
.wp-site-blocks > header .wp-block-navigation.has-background,
header.wp-block-template-part .wp-block-navigation.has-background,
.wp-site-blocks > header .wp-block-navigation.has-base-background-color,
header.wp-block-template-part .wp-block-navigation.has-base-background-color {
  background: transparent !important;
  background-color: transparent !important;
}

/* Keep the desktop menu visible and in the same flex layout as the current site. */
@media screen and (min-width: 600px) {
  .wp-site-blocks > header .wp-block-navigation,
  header.wp-block-template-part .wp-block-navigation {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .wp-site-blocks > header .wp-block-navigation__responsive-container:not(.is-menu-open),
  header.wp-block-template-part .wp-block-navigation__responsive-container:not(.is-menu-open) {
    background: transparent !important;
    color: #fff !important;
  }

  .wp-site-blocks > header .wp-block-navigation-item,
  header.wp-block-template-part .wp-block-navigation-item {
    background: transparent !important;
  }
}

/* Navigation gradient/underline becomes blue-to-pumpkin. */
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content {
  background-image: linear-gradient(to right, var(--mci-halloween-orange), var(--mci-halloween-gold) 50%, #ffffff 50%);
}
.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:before {
  background: var(--mci-halloween-orange);
}

/* Existing Contact / quote / CTA buttons. */
.wp-element-button,
.wp-block-button__link {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
  background-color: var(--mci-halloween-orange) !important;
  border-color: var(--mci-halloween-gold) !important;
  color: #111827 !important;
  transform: translateY(-1px);
}

/* Homepage hero: seasonal accent without changing the content/image. */
.home .nfd-text-giga {
  color: var(--mci-halloween-navy) !important;
  background: rgba(255, 248, 236, .94) !important;
  border-color: var(--mci-halloween-orange) !important;
  box-shadow: 0 0 0 2px rgba(7,20,47,.18);
}

/* Footer: retain every existing column/block, recolor the exported white groups. */
.wp-site-blocks > footer .wp-block-group.alignfull.has-white-background-color,
footer.wp-block-template-part .wp-block-group.alignfull.has-white-background-color,
.wp-site-blocks > footer,
footer.wp-block-template-part {
  background: var(--mci-halloween-midnight) !important;
  color: var(--mci-halloween-cream) !important;
}

.wp-site-blocks > footer a,
footer.wp-block-template-part a,
.wp-site-blocks > footer p,
footer.wp-block-template-part p,
.wp-site-blocks > footer strong,
footer.wp-block-template-part strong {
  color: var(--mci-halloween-cream);
}

/* Existing blue footer title gets a Halloween treatment. */
#Phone-Apps {
  background: linear-gradient(90deg, var(--mci-halloween-navy), var(--mci-halloween-orange)) !important;
  color: #fff !important;
  border-radius: 6px;
}

/* Thin seasonal edge at the top of the footer. */
.wp-site-blocks > footer,
footer.wp-block-template-part {
  border-top: 4px solid var(--mci-halloween-orange);
}

/* Halloween bat cursor layer generated by js/halloween-bats.js. */
#mci-halloween-bats {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483000;
  overflow: hidden;
}
.mci-halloween-bat {
  position: absolute;
  width: 28px;
  height: 18px;
  opacity: 0;
  transform-origin: center;
  filter: drop-shadow(0 1px 1px rgba(255,138,0,.25));
  will-change: transform, opacity, left, top;
  transition: opacity .28s ease;
}
.mci-halloween-bat svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mci-halloween-bat.is-visible { opacity: .88; }

/* Keep mobile header functionality intact while swapping only the logo. */
@media screen and (max-width: 599px) {
  .wp-block-site-logo a,
  .wp-block-site-logo img {
    content: url('assets/images/mci-halloween-logo.webp') !important;
    height: 35px !important;
    width: auto !important;
  }

  /* Preserve current fixed mobile bar, but season its colors. */
  .wp-container-core-group-layout-2.wp-container-core-group-layout-2 {
    background-color: var(--mci-halloween-midnight) !important;
    border-bottom: 2px solid var(--mci-halloween-orange);
  }
}

/* No cursor-follow animation on touch devices or reduced-motion setups. */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  #mci-halloween-bats { display: none !important; }
}

/* =========================================================
   HALLOWEEN SUBMENU CONTRAST FIX
   Keep dropdown background light blue, but use dark navy text.
   Overrides the main-menu gradient text effect for submenu links only.
   ========================================================= */

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  color: var(--mci-halloween-midnight, #07142f) !important;
  -webkit-text-fill-color: var(--mci-halloween-midnight, #07142f) !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  font-weight: 600;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  color: #c75f00 !important;
  -webkit-text-fill-color: #c75f00 !important;
  background-image: none !important;
}

/* Keep submenu underline Halloween orange on hover. */
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content::before {
  background: var(--mci-halloween-orange, #ff8a00) !important;
}

/* =========================================================
   HALLOWEEN CARRIER APP STORE ICON FIX
   Footer links are cream in the Halloween theme, which made
   the Google Play / Apple icons nearly disappear on white buttons.
   ========================================================= */

#mciCarrierApps .mci-store-btn,
#mciCarrierApps .mci-store-btn:visited {
  color: var(--mci-halloween-navy, #0b2f66) !important;
  -webkit-text-fill-color: var(--mci-halloween-navy, #0b2f66) !important;
}

#mciCarrierApps .mci-store-btn i,
#mciCarrierApps .mci-store-btn svg {
  color: var(--mci-halloween-navy, #0b2f66) !important;
  fill: var(--mci-halloween-navy, #0b2f66) !important;
  -webkit-text-fill-color: var(--mci-halloween-navy, #0b2f66) !important;
  opacity: 1 !important;
}

/* Apple stays a little darker for a crisp black-logo look. */
#mciCarrierApps .mci-store-btn .fa-apple,
#mciCarrierApps .mci-store-btn .fa-apple:before {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* Pumpkin-orange hover to match the Halloween theme. */
#mciCarrierApps .mci-store-btn:hover i,
#mciCarrierApps .mci-store-btn:hover svg,
#mciCarrierApps .mci-store-btn:hover .fa-apple,
#mciCarrierApps .mci-store-btn:hover .fa-apple:before {
  color: var(--mci-halloween-orange, #ff8a00) !important;
  fill: var(--mci-halloween-orange, #ff8a00) !important;
  -webkit-text-fill-color: var(--mci-halloween-orange, #ff8a00) !important;
}

