/* Apollo Web Design — alignment fixes and smooth transitions */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  opacity: 1;
  transition: opacity 0.35s ease;
}

body.page-loaded {
  opacity: 1;
}

img {
  max-width: 100%;
  height: auto;
}

/* Hide empty partial placeholders when inline chrome exists */
#site-header:empty,
#site-footer:empty {
  display: none;
}

/* Header alignment */
#sp-header {
  transition: box-shadow 0.35s ease, background-color 0.35s ease, padding 0.35s ease;
}

#sp-header.menu-fixed {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

#sp-header .container > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#sp-logo img {
  max-height: 70px;
  width: auto;
  display: block;
}

#sp-menu .top ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

#sp-menu .top ul li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sp-megamenu-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sp-megamenu-parent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-megamenu-parent > li > a {
  display: inline-block;
  padding: 0.75rem 0.9rem;
}

/* Dropdown / flyout transitions */
.sp-dropdown,
.flyout {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.sp-menu-item:hover > .sp-dropdown,
.sp-menu-item.sp-has-child:hover > .sp-dropdown,
.dropdown-submenu:hover > .flyout,
#menu:hover > .flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: block !important;
}

.flyout {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 0.5rem 0;
}

.flyout ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flyout ul li a {
  display: block;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.dropdown-submenu {
  position: relative;
}

.sp-dropdown {
  position: absolute;
  z-index: 998;
}

/* Global link/button transitions */
a,
.btn,
button,
.sp-menu-item a {
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

a:hover,
.btn:hover {
  transform: translateY(-1px);
}

/* Main content rhythm */
#sp-main-body {
  padding: 2rem 0 3rem;
}

#sp-main-body .sp-column {
  max-width: 100%;
}

.com_content.view-article #sp-main-body .sp-column {
  padding: 3rem 1rem;
}

.com_content.view-article #sp-main-body h1 {
  margin-bottom: 1.25rem;
}

/* SP Page Builder alignment */
.sppb-row-container {
  max-width: 100%;
}

.sppb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.sppb-col-md-12,
.sppb-col-md-6,
.sppb-col-md-4,
.sppb-col-md-3 {
  display: flex;
  flex-direction: column;
}

.sppb-addon {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.sppb-addon:hover {
  transform: translateY(-3px);
}

/* Footer columns */
.foot_data {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

.foot_data > [class*="col-"] {
  padding: 1rem 15px;
  margin-bottom: 1rem;
}

.foot_data h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.foot_data ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot_data ul li {
  margin-bottom: 0.5rem;
}

.copu_right {
  text-align: center;
}

/* Contact forms */
.static-contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.static-contact-form .form-group {
  margin-bottom: 1.25rem;
}

.static-contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.static-contact-form .form-control {
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.static-contact-form .form-control:focus {
  border-color: #b60000;
  box-shadow: 0 0 0 3px rgba(182, 0, 0, 0.12);
}

.static-contact-form .btn-primary {
  min-width: 160px;
}

/* Off-canvas menu transition */
.offcanvas-menu {
  transition: transform 0.35s ease;
}

.offcanvas-overlay {
  transition: opacity 0.35s ease;
}

.off-canvas-menu-init.offcanvas .offcanvas-menu {
  transform: translateX(0);
}

/* Prevent horizontal overflow */
.body-wrapper,
.body-innerwrapper {
  overflow-x: hidden;
}

@media (max-width: 767px) {
  #sp-header .container > .row {
    flex-direction: column;
    align-items: flex-start;
  }

  #sp-menu .top ul {
    justify-content: flex-start;
  }

  .sp-megamenu-parent {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .flyout {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .com_content.view-article #sp-main-body .sp-column {
    padding: 2rem 0.75rem;
  }
}

/* Fallback when CenturyGothic.ttf is unavailable in backup */
body,
h1, h2, h3, h4, h5, h6 {
  font-family: "Century Gothic", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
