/*
 * Dcode header + footer styling.
 * Adapted from the original static navbar/footer HTML.
 *
 * IMPORTANT deviation from the source file: the original used a
 * global "* { margin:0; padding:0; box-sizing:border-box; }" reset.
 * Applied site-wide, that would break Astra's own spacing on every
 * other element (post content, widgets, etc.), so it's scoped here to
 * .dcode-header-container and .dcode-footer-container only.
 */

body {
  font-family: 'Quicksand', sans-serif;
  background-color: #F8EFE6;
  color: #152A50;
  -webkit-font-smoothing: antialiased;
}

.dcode-header-container *,
.dcode-footer-container * {
  box-sizing: border-box;
}

/* ---------- Header ---------- */

.dcode-header-container {
  width: 100%;
  background-color: #F8EFE6;
  border-bottom: 1px solid #748189;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-family: 'Quicksand', sans-serif;
}

.dcode-header-container h1,
.dcode-header-container h2,
.dcode-header-container h3,
.dcode-header-container h4,
.dcode-header-container h5,
.dcode-header-container h6 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
}

.dcode-header-container p,
.dcode-header-container a,
.dcode-header-container button,
.dcode-header-container input,
.dcode-header-container span,
.dcode-header-container li {
  font-family: 'Quicksand', sans-serif !important;
}

.dcode-header-container a,
.dcode-header-container button,
.dcode-header-container i {
  text-decoration: none !important;
  transition: none !important;
  animation: none !important;
  outline: none;
}

.dcode-header-container a:hover,
.dcode-header-container button:hover,
.dcode-header-container i:hover {
  color: inherit;
  background-color: transparent;
  text-decoration: none !important;
  opacity: 1 !important;
  transform: none !important;
  box-shadow: none !important;
}

.dcode-header-container a,
.dcode-header-container button,
.dcode-header-container .dcode-lang-item {
  cursor: pointer;
}

.dcode-top-row {
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dcode-top-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-start;
}

.dcode-top-socials a {
  color: #152A50 !important;
  font-size: 17px;
}

.dcode-brand-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
}

.dcode-brand-logo img {
  height: 72px;
  max-height: none;
  width: auto;
  display: block;
}

.dcode-top-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
}

.dcode-lang-switcher {
  position: relative;
  display: inline-block;
}

.dcode-lang-btn {
  background: none;
  border: 1px solid #748189;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  color: #152A50 !important;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
}

.dcode-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: #F8EFE6;
  border: 1px solid #748189;
  border-radius: 4px;
  min-width: 110px;
  box-shadow: 0 4px 12px rgba(21, 42, 80, 0.1);
  z-index: 1010;
  overflow: hidden;
}

.dcode-lang-dropdown.active {
  display: block;
}

.dcode-lang-item {
  display: block;
  padding: 8px 14px;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  color: #152A50 !important;
  white-space: nowrap !important;
  border-bottom: 1px solid rgba(116, 129, 137, 0.2);
}

.dcode-lang-item:last-child {
  border-bottom: none;
}

.dcode-subscribe-btn {
  background-color: #152A50 !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 8px 18px !important;
  border-radius: 4px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

.dcode-hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  align-items: center;
  justify-content: center;
  color: #152A50;
}

.dcode-hamburger-btn svg {
  display: block;
  width: 26px;
  height: 26px;
}

.dcode-bottom-row {
  border-top: 1px solid #748189;
  width: 100%;
}

.dcode-nav-links-desktop {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 12px 24px;
  list-style: none;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .dcode-nav-links-desktop {
    gap: 22px;
  }
}

.dcode-nav-links-desktop li a {
  color: #152A50 !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dcode-ticker-strip {
  width: 100%;
  height: 26px;
  background-color: #152A50;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(116, 129, 137, 0.3);
}

.dcode-ticker-label {
  background-color: #152A50;
  color: #F0B24A;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 10;
  white-space: nowrap;
  border-right: 1px solid rgba(116, 129, 137, 0.4);
}

.dcode-ticker-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.dcode-ticker-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: dcodeTickerScroll 880s linear infinite;
}

.dcode-ticker-set {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.dcode-ticker-set,
.dcode-ticker-set a {
  font-family: 'Quicksand', sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #F8EFE6 !important;
}

.dcode-ticker-set a {
  text-decoration: none !important;
}

.dcode-ticker-set a:hover {
  color: #F0B24A !important;
  text-decoration: underline !important;
}

.dcode-ticker-dot {
  padding: 0 10px;
  color: rgba(248, 239, 230, 0.5);
}

/*
 * Seamless loop: the track holds two identical copies of the content
 * back to back (see header.php), so sliding exactly 50% of the track's
 * width brings the animation right back to its starting frame with no
 * jump or gap - see the comment in header.php for the full explanation.
 */
@keyframes dcodeTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.dcode-mobile-menu {
  display: none;
  width: 100%;
  background-color: #F8EFE6;
  border-top: 1px solid #748189;
  padding: 20px 24px 24px 24px;
}

.dcode-mobile-menu.open {
  display: block;
}

.dcode-mobile-categories {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.dcode-mobile-categories li a {
  color: #152A50 !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
}

.dcode-mobile-divider {
  height: 1px;
  background-color: #748189;
  margin: 20px 0;
  width: 100%;
}

.dcode-mobile-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dcode-mobile-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dcode-mobile-socials a {
  color: #152A50 !important;
  font-size: 16px;
}

@media (max-width: 900px) {
  .dcode-top-socials {
    display: none !important;
  }
  .dcode-top-controls .dcode-subscribe-btn {
    display: none !important;
  }
  .dcode-top-controls .dcode-lang-switcher {
    display: none !important;
  }
  .dcode-hamburger-btn {
    display: flex !important;
  }
  .dcode-top-row {
    padding: 12px 16px;
  }
  .dcode-top-controls {
    gap: 12px;
  }
  .dcode-bottom-row {
    display: none !important;
  }
  .dcode-brand-logo img {
    height: 54px;
  }
}

/* ---------- Footer ---------- */

.dcode-footer-container {
  width: 100%;
  background-color: #152A50;
  color: #F8EFE6;
  font-family: 'Quicksand', sans-serif;
  padding-top: 48px;
  position: relative;
  z-index: 1000;
}

.dcode-footer-container h1,
.dcode-footer-container h2,
.dcode-footer-container h3,
.dcode-footer-container h4,
.dcode-footer-container h5,
.dcode-footer-container h6 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
}

.dcode-footer-container p,
.dcode-footer-container a,
.dcode-footer-container button,
.dcode-footer-container input,
.dcode-footer-container span,
.dcode-footer-container li {
  font-family: 'Quicksand', sans-serif !important;
}

.dcode-footer-container a,
.dcode-footer-container button,
.dcode-footer-container i {
  text-decoration: none !important;
  transition: none !important;
  animation: none !important;
  outline: none;
}

.dcode-footer-container a:hover,
.dcode-footer-container button:hover,
.dcode-footer-container i:hover {
  color: inherit;
  background-color: transparent;
  text-decoration: none !important;
  opacity: 1 !important;
  transform: none !important;
  box-shadow: none !important;
}

.dcode-footer-container a,
.dcode-footer-container button {
  cursor: pointer;
}

.dcode-footer-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px 40px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.dcode-footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.dcode-footer-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.dcode-footer-col h3,
.dcode-footer-col h4 {
  font-family: 'Poppins', sans-serif !important;
  font-size: 20px;
  font-weight: 700;
  color: #F8EFE6;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.dcode-footer-col p {
  font-family: 'Quicksand', sans-serif !important;
  font-size: 15px;
  line-height: 1.6;
  color: #F8EFE6;
  margin-bottom: 20px;
  opacity: 0.9;
}

.dcode-footer-contact {
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px;
  line-height: 1.6;
  color: #F8EFE6;
  opacity: 0.9;
  margin-bottom: 20px;
}

.dcode-footer-contact a {
  color: #F8EFE6 !important;
}

.dcode-footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dcode-footer-socials a {
  color: #F8EFE6 !important;
  font-size: 18px;
}

.dcode-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dcode-footer-links li a {
  color: #F8EFE6 !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 15px;
  font-weight: 400;
  display: inline-block;
  opacity: 0.9;
}

.dcode-footer-bottom {
  border-top: 1px solid #748189;
  padding: 20px 24px;
  text-align: center;
}

.dcode-footer-bottom p {
  font-family: 'Quicksand', sans-serif !important;
  font-size: 14px;
  color: #F8EFE6;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .dcode-footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
  }
}

/*
 * Hide Astra's automatic plain page title (the <header class="entry-header">
 * / <h1 class="entry-title"> block it prints above the content) on every
 * WordPress Page (About Us, Contact Us, Privacy Policy, Terms of Service,
 * and any future one) - confirmed via DevTools inspection on the live
 * About Us page. WordPress puts a "page" class on <body> for every Page
 * and nowhere else (not Posts, not the homepage, not category archives),
 * so this can't accidentally hide a title anywhere it shouldn't. These
 * pages are built entirely in Elementor and already show their own
 * design's heading (e.g. "About Dcode"), so Astra's plain title is pure
 * duplication.
 */
body.page .entry-header {
  display: none;
}
