/* =========================================
   KLUSTARIEF HEADER, FOOTER, POPUP + ICONS
   Clean version - no Font Awesome needed
   ========================================= */

:root {
  --kt-blue: #1c2c52;
  --kt-orange: #F6940F;
  --kt-white: #ffffff;
  --kt-text: #333333;
  --kt-muted: #595959;
  --kt-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --kt-width: 1200px;

  --ft-bg: #004AAD;
  --ft-orange: #F6940F;
  --ft-white: #ffffff;
  --ft-text: #f4f4f4;
  --ft-width: 1200px;
  --kt-blue-dark: #1c2c52;
}

/* =========================================
   GLOBAL / ACCESSIBILITY
   ========================================= */

body.home {
  background-color: #ffffff;
  color: #333333;
}

#wpadminbar {
  position: fixed !important;
  z-index: 2147483647 !important;
}

.elementor-location-header,
.elementor-location-header .elementor-section,
.elementor-location-header .elementor-container,
.elementor-location-header .elementor-widget-wrap {
  position: relative !important;
  z-index: 2147483000 !important;
  overflow: visible !important;
}

/* =========================================
   PAINTER REQUEST FORM BUTTONS
   Keep these because they are unrelated to header/footer
   but currently exist in your CSS.
   ========================================= */

.prf-secondary-wrap .prf-secondary-btn,
div[id^="prf-btn-contact-"],
button[id^="prf-btn-contact-"],
div[id^="prf-btn-header-"],
button[id^="prf-btn-header-"] {
  background-color: #1c2c52 !important;
  color: #ffffff !important;
  border: 1px solid #1c2c52 !important;
  transition: all 0.3s ease;
}

.prf-secondary-wrap .prf-secondary-btn:hover,
div[id^="prf-btn-contact-"]:hover,
button[id^="prf-btn-contact-"]:hover,
div[id^="prf-btn-header-"]:hover,
button[id^="prf-btn-header-"]:hover {
  background-color: #f3892f !important;
  border-color: #f3892f !important;
  color: #ffffff !important;
  cursor: pointer;
}

/* =========================================
   HEADER
   ========================================= */

.klustarief-header-wrapper {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--kt-white);
  width: 100%;
  position: relative;
  z-index: 2147483000;
  isolation: isolate;
}

.klustarief-header-wrapper *,
.klustarief-header-wrapper *::before,
.klustarief-header-wrapper *::after {
  box-sizing: border-box;
}

.desktop-header-outer {
  width: 100%;
  background: var(--kt-white);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  transition: top 0.3s ease;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  z-index: 2147483000;
  overflow: visible;
}

body.admin-bar .desktop-header-outer {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .desktop-header-outer {
    top: 46px;
  }
}

.header-container {
  max-width: var(--kt-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: visible;
}

/* Correct optimized desktop logo size */
.desktop-logo img {
  width: 198px !important;
  height: 50px !important;
  object-fit: contain !important;
  display: block !important;
  transition: transform 0.3s ease;
}

.desktop-logo:hover img {
  transform: scale(1.02);
}

/* Desktop nav */
.desktop-nav {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  overflow: visible;
}

.desktop-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  overflow: visible;
}

.desktop-nav li {
  position: relative;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--kt-text);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
  padding: 15px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--kt-orange);
}

.desktop-nav a:focus-visible,
.btn-kt:focus-visible,
.icon-chip:focus-visible,
.close-btn:focus-visible,
.submenu-toggle:focus-visible,
.footer-links a:focus-visible,
.footer-btn:focus-visible,
.newsletter-trigger:focus-visible,
.social-icons a:focus-visible,
.popup-close:focus-visible,
.popup-submit:focus-visible {
  outline: 3px solid rgba(246,148,15,0.35);
  outline-offset: 3px;
}

/* Inline SVG nav icon */
.kt-nav-icon {
  display: inline-block;
  margin-left: 6px;
  vertical-align: -2px;
  transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
  opacity: 0.7;
}

.desktop-nav li:hover .kt-nav-icon {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--kt-orange);
}

/* Dropdown */
.desktop-nav ul ul {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: var(--kt-white);
  min-width: 230px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  border-radius: 6px;
  border-top: 3px solid var(--kt-orange);
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
  transition: all 0.25s ease-in-out;
  z-index: 2147483100 !important;
  overflow: visible;
}

.desktop-nav li:hover > ul,
.desktop-nav li:focus-within > ul {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.desktop-nav ul ul a {
  padding: 12px 20px;
  font-size: 14px;
  color: #555555;
  white-space: nowrap;
  display: block;
  border-bottom: 1px solid #fafafa;
}

.desktop-nav ul ul a:hover,
.desktop-nav ul ul a:focus-visible {
  background: #fdfdfd;
  color: var(--kt-orange);
  padding-left: 25px;
}

/* Header buttons */
.desktop-actions {
  display: flex;
  gap: 12px;
}

.btn-kt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 3px;
  background: var(--kt-blue);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid var(--kt-blue);
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(28, 44, 82, 0.2);
}

.btn-kt:hover {
  background: var(--kt-orange);
  border-color: var(--kt-orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(246, 148, 15, 0.3);
}

.btn-kt-outline {
  background: transparent;
  color: var(--kt-blue) !important;
  border: 1px solid var(--kt-blue);
  box-shadow: none;
}

.btn-kt-outline:hover {
  background: var(--kt-blue);
  color: #ffffff !important;
  border-color: var(--kt-blue);
  transform: translateY(-2px);
}

/* Tablet */
@media screen and (min-width: 769px) and (max-width: 1050px) {
  .header-container {
    padding: 10px 15px;
  }

  .desktop-logo img {
    width: 178px !important;
    height: 45px !important;
  }

  .desktop-nav ul {
    gap: 15px;
  }

  .desktop-nav a {
    font-size: 13px;
  }

  .btn-kt {
    padding: 8px 15px;
    font-size: 13px;
  }
}

/* Mobile header */
.mobile-app-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 2147483000;
  background: var(--kt-white);
  padding: 0 15px;
  height: 65px;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

body.admin-bar .mobile-app-header {
  top: 46px;
}

@media screen and (max-width: 600px) {
  body.admin-bar .mobile-app-header {
    top: 0;
  }
}

.mobile-logo-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Correct optimized mobile logo size */
.mobile-logo-container img {
  width: 162px !important;
  height: 42px !important;
  object-fit: contain !important;
  display: block !important;
}

.icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #eeeeee;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--kt-blue);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 0;
}

.icon-chip:hover {
  color: var(--kt-orange);
  transform: scale(1.05);
}

.icon-chip svg,
.kt-menu-svg,
.btn-kt svg,
.newsletter-trigger svg,
.social-icons svg {
  flex: 0 0 auto;
  display: block;
}

/* =========================================
   MOBILE DRAWERS
   ========================================= */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 44, 82, 0.6);
  z-index: 2147483200;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  backdrop-filter: blur(2px);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 2147483300;
  background: var(--kt-white);
  width: 85%;
  max-width: 320px;
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
}

.drawer.left {
  left: 0;
  transform: translateX(-100%);
}

.drawer.left.active {
  transform: translateX(0);
}

.drawer.right {
  right: 0;
  transform: translateX(100%);
}

.drawer.right.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eeeeee;
  background: #fafafa;
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: #777777;
  cursor: pointer;
  transition: 0.3s;
  padding: 0;
  line-height: 1;
}

.close-btn:hover {
  color: var(--kt-orange);
  transform: rotate(90deg);
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.drawer-body .btn-kt {
  display: inline-flex;
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-list a,
.mobile-menu-list button.submenu-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  text-decoration: none;
  color: var(--kt-blue);
  font-weight: 600;
  font-size: 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.mobile-menu-list svg,
.kt-menu-svg {
  color: var(--kt-orange);
  width: 24px;
  min-width: 24px;
}

.submenu-toggle {
  justify-content: space-between;
}

.submenu-toggle > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.mobile-submenu {
  background: #f8f9fa;
  padding-left: 45px;
  display: none;
  margin-bottom: 10px;
  border-radius: 8px;
}

.mobile-submenu a {
  font-size: 14px;
  padding: 12px 0;
  color: #555555;
  font-weight: 500;
}

.mobile-has-sub.open .mobile-submenu {
  display: block;
  animation: ktFadeIn 0.3s;
}

@keyframes ktFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.caret {
  margin-left: auto;
  font-size: 12px;
  transition: 0.3s;
  opacity: 0.5;
  display: inline-flex;
}

.mobile-has-sub.open .caret {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--kt-orange);
}

@media screen and (max-width: 768px) {
  .desktop-header-outer {
    display: none;
  }

  .mobile-app-header {
    display: flex;
  }
}

/* =========================================
   FOOTER
   ========================================= */

.custom-footer-wrapper {
  background-color: var(--ft-bg);
  color: var(--ft-white);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 60px 20px 20px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.custom-footer-wrapper *,
.custom-footer-wrapper *::before,
.custom-footer-wrapper *::after {
  box-sizing: border-box;
}

.footer-container {
  max-width: var(--ft-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
  text-align: left;
}

/* Correct optimized footer logo size */
.footer-logo {
  width: 198px !important;
  height: 50px !important;
  object-fit: contain !important;
  display: block !important;
  margin-bottom: 20px;
  filter: drop-shadow(0 1px 1px rgba(255,255,255,0.5));
}

.footer-col h4 {
  color: var(--ft-white);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ft-orange);
  display: inline-block;
  padding-bottom: 5px;
}

.footer-col p,
.address-block {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ft-text);
  margin-bottom: 15px;
  font-weight: 500;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--ft-text);
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s;
  display: inline-block;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ft-orange);
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.social-icons a {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--ft-white);
  text-decoration: none;
  transition: 0.3s;
}

.social-icons a:hover {
  background: var(--ft-orange);
}

.newsletter-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: inherit;
}

.newsletter-trigger:hover {
  text-decoration: underline;
}

.footer-btn {
  display: inline-block;
  background: var(--ft-orange);
  color: var(--kt-blue-dark) !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  margin-top: 15px;
  border: 1px solid var(--ft-orange);
  transition: 0.3s;
}

.footer-btn:hover {
  background: transparent;
  color: var(--ft-orange) !important;
  border-color: var(--ft-orange);
}

.recent-post-item {
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}

.recent-post-item:last-child {
  border: none;
}

.rp-title {
  color: var(--ft-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  display: block;
}

.rp-title:hover {
  color: var(--ft-orange);
}

.copyright-bar {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-btn {
    display: block;
    width: 100%;
  }
}

/* =========================================
   NEWSLETTER POPUP
   ========================================= */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  padding: 20px;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: #ffffff;
  width: 100%;
  max-width: 700px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.popup-image {
  width: 40%;
  background-image: url("https://images.unsplash.com/photo-1581094794329-c8112a89af12?q=80&w=600&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
}

.popup-form-wrapper {
  width: 60%;
  padding: 40px;
  color: #333333;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: inherit;
}

.popup-input:focus-visible {
  outline: 3px solid rgba(0,74,173,0.25);
  border-color: #004AAD;
}

.popup-row {
  display: flex;
  gap: 10px;
}

.popup-row .popup-input {
  width: 50%;
}

.popup-submit {
  width: 100%;
  background: var(--ft-orange);
  color: var(--kt-blue-dark);
  border: none;
  padding: 12px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.popup-submit:hover {
  background: #e0850c;
  color: #ffffff;
}

.popup-submit:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

.popup-message {
  display: none;
  text-align: center;
  color: #004AAD;
}

.popup-message svg {
  margin-bottom: 15px;
  color: #28a745;
}

@media (max-width: 600px) {
  .popup-content {
    flex-direction: column;
  }

  .popup-image {
    width: 100%;
    height: 150px;
  }

  .popup-form-wrapper {
    width: 100%;
    padding: 20px;
  }

  .popup-row {
    flex-direction: column;
    gap: 0;
  }

  .popup-row .popup-input {
    width: 100%;
  }
}

