h4 {
  font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
  margin-bottom: 17px;
}

h5 {
  font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.6;
  margin-bottom: 17px;
  color: #fcb040;
}

/*div#ccm-highlighter {*/
/*margin-top: -50px !important;*/
/*}*/

h4.h4-home {
  margin-bottom: 0;
}

#maincontent {
  margin-bottom: 3px;
}

p a,
p a:visited {
  text-decoration: underline;
}

#footer li {
  font-size: 11px;
}

#headerdots {
  clear: both;
}

ul,
ol {
  list-style-position: outside;
}

.editmode {
  position: static;
}

#footer ul li ul li {
  padding-bottom: 5px;
  line-height: 1.2;
}

/* Custom Slider - Clean and Simple */
#slider {
  display: none;
  width: 100%;
  max-width: 960px; /* Standard 960px grid maximum width */
  height: 350px; /* Standard height */
  margin: 0 auto;
  overflow: hidden; /* Hide overflow */
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  background-color: #f5f5f5; /* Subtle background while images load */
}

#slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 350px; /* Standard height */
  object-fit: cover; /* Maintain aspect ratio, crop if necessary */
  object-position: center center; /* Center the image */
  display: none; /* Hidden by default, shown by JavaScript */
  /* Smooth fade transitions */
  -webkit-transition: opacity 0.4s ease-in-out;
  -moz-transition: opacity 0.4s ease-in-out;
  -ms-transition: opacity 0.4s ease-in-out;
  -o-transition: opacity 0.4s ease-in-out;
  transition: opacity 0.4s ease-in-out;
}

/* Container Width Fix */
.foundation-row {
  max-width: 960px;
  margin: 0 auto;
}

.eleven.columns.centered {
  max-width: 900px;
  margin: 0 auto;
}

.twelve.columns {
  width: 100%;
  margin: 0 auto;
}

/* Responsive slider adjustments */
@media only screen and (max-width: 1024px) {
  #slider {
    height: 300px;
  }

  #slider img {
    height: 300px;
  }
}

@media only screen and (max-width: 768px) {
  #slider {
    height: 250px;
  }

  #slider img {
    height: 250px;
  }
}

@media only screen and (max-width: 480px) {
  #slider {
    height: 200px;
  }

  #slider img {
    height: 200px;
  }
}

img {
  border: 0;
  outline: 0;
}

.foundicon-phone {
  background-image: url('../images/contact-icons.png'/*tpa=http://keytegroup.com/themes/foundation/images/contact-icons.png*/);
  background-repeat: no-repeat;
  width: 14px;
  height: 14px;
  display: inline-block;
}

.foundicon-mail {
  background-image: url('../images/contact-icons.png'/*tpa=http://keytegroup.com/themes/foundation/images/contact-icons.png*/);
  background-repeat: no-repeat;
  background-position: 0 -22px;
  width: 14px;
  height: 14px;
  display: inline-block;
}

.loading-icon {
  height: 25px;
  background: url('../images/ajax-loader.gif'/*tpa=http://keytegroup.com/themes/foundation/images/ajax-loader.gif*/)
    no-repeat;
  width: 25px;
  margin: 0 auto;
}

/* Media Query Overrides */

@media only screen and (max-width: 640px) {
  #headerdots {
    display: none;
  }
  #menu-backing {
    left: 0 !important;
  }
}

/* Additional sidebar and layout fixes */
.three.columns.hide-for-small {
  padding-right: 2em;
}

.three.columns.hide-for-small .ccm-image-block {
  display: block;
  margin: 1.5em 0 1em 0;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.three.columns.hide-for-small p {
  font-style: italic;
  color: #877b6c;
  margin-top: 0.5em;
  font-size: 0.9em;
  text-align: center;
  line-height: 1.4em;
}

/* Ensure proper column layout */
.foundation-row .columns {
  float: left;
}

.nine.columns {
  padding-left: 1.5em;
}

/* Fix any clearfix issues */
.foundation-row:after {
  content: '';
  display: table;
  clear: both;
}

/* Fix homepage main content positioning - override offcanvas transitions */
#maincontent {
  /* Override any offcanvas.css transitions */
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Remove the pseudo-element if role="main" is accidentally added */
#maincontent:before {
  display: none !important;
}

/* Developer credit styling */
.developer-credit {
  background-color: #443f3a;
  padding: 10px 0;
  margin-top: -3px; /* Remove gap between footer and credit */
}

.developer-credit p {
  color: #3a3530; /* Darker brown - very low contrast with background */
  font-size: 11px;
  margin: 0;
  font-family: Arial, sans-serif;
  text-align: right;
  padding-right: 20px;
}

/* Make text even less visible on hover (optional subtle effect) */
.developer-credit p:hover {
  color: #353128; /* Even darker on hover */
}

/* Ensure slider parent containers don't move */
#maincontentwrapper,
#maincontent,
.foundation-row {
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -ms-transform: none !important;
  -o-transform: none !important;
  transform: none !important;
  position: static;
}

/* Specifically for slider container row */
.foundation-row:has(#slider) {
  position: relative;
  overflow: visible;
}

/* Mobile Touch Event Fixes */
@media only screen and (max-width: 767px) {
  /* Ensure all interactive elements are touchable */
  a, button, .button, [role="button"] {
    -webkit-tap-highlight-color: rgba(0,0,0,0.3);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: pointer;
  }
  
  /* Fix for any overlapping elements */
  .foundation-row {
    position: relative;
    z-index: 1;
  }
  
  /* Ensure menu button is always clickable */
  #menuButton {
    position: relative;
    z-index: 1000;
    display: block !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.3);
    touch-action: manipulation;
  }
  
  /* Fix header z-index */
  #header {
    position: relative;
    z-index: 100;
  }
  
  /* Prevent any pseudo-elements from blocking clicks */
  *:before, *:after {
    pointer-events: none;
  }
  
  /* Re-enable pointer events for necessary elements */
  a:before, a:after, 
  button:before, button:after,
  .button:before, .button:after {
    pointer-events: auto;
  }
  
  /* Specific fixes for homepage content links */
  #maincontent {
    position: relative;
    z-index: 10;
  }
  
  #maincontent article {
    position: relative;
    z-index: 11;
  }
  
  #maincontent article a {
    position: relative;
    z-index: 12;
    display: inline-block;
    min-height: 44px; /* Minimum touch target size */
    line-height: 1.4;
    padding: 2px 4px;
    margin: -2px -4px;
  }
  
  /* Ensure slider doesn't overlap content */
  #slider {
    position: relative;
    z-index: 1;
    margin-bottom: 2em;
  }
  
  /* Fix any floating issues on mobile */
  .four.columns {
    float: none;
    width: 100%;
    margin-bottom: 2em;
    position: relative;
    z-index: 10;
  }
  
  /* Ensure no elements are blocking the content area */
  #headerdots {
    position: relative;
    z-index: 1;
  }
  
  #menu-backing {
    position: relative;
    z-index: 1;
  }
}
