/*
Theme Name: Imdex By TeamAgency
Theme URI: https://example.com/imdex
Author: Rafh Lester Duldulao
Description: A lightweight, responsive custom WordPress theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: imdex
Tags: custom-logo, custom-menu, featured-images, responsive-layout
*/

/* ========================================
   1. Variables
======================================== */

:root {
  --imdex-text: #222;
  --imdex-muted: #666;
  --imdex-border: #e7e7e7;
  --imdex-background: #fff;
  --imdex-accent: #1769e0;
  --imdex-menu-hover: #ED5437;
  --imdex-hero-accent: #ED5437;
  --imdex-content-width: 1656px;
  --imdex-narrow-width: 760px;
  --imdex-hero-width: 1656px;
  --imdex-section-gutter: clamp(24px, 6.875vw, 132px);
}

/* ========================================
   2. Global Styles
======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--imdex-text);
  background: var(--imdex-background);
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a {
  color: var(--imdex-accent);
  text-underline-offset: 0.18em;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #8ab4ff;
  outline-offset: 3px;
}

.imdex-container {
  width: min(calc(100% - 2rem), var(--imdex-content-width));
  margin-inline: auto;
}

.imdex-narrow-container {
  width: min(calc(100% - 2rem), var(--imdex-narrow-width));
  margin-inline: auto;
}

/* ========================================
   3. Header and Branding
======================================== */

.imdex-site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  background: var(--imdex-background);
}

.imdex-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.imdex-site-branding {
  flex-shrink: 0;
}

.imdex-site-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.imdex-site-title a {
  color: inherit;
  text-decoration: none;
}

.imdex-site-description {
  margin: 0.25rem 0 0;
  color: var(--imdex-muted);
  font-size: 0.875rem;
}

.custom-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
}

/* ========================================
   4. Navigation
======================================== */

.imdex-primary-navigation {
  margin-left: auto;
}

.imdex-primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.imdex-primary-navigation li {
  margin: 0;
  padding: 0;
}

.imdex-primary-navigation a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.imdex-primary-navigation a:hover {
  color: var(--imdex-menu-hover);
}

.imdex-menu-toggle {
  display: none;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--imdex-border);
  color: var(--imdex-text);
  background: #fff;
}

/* ========================================
   5. Homepage Layout
======================================== */

.imdex-front-page {
  width: 100%;
  margin: 0;
  padding: 0;
}

/*
 * The hero background image is supplied by front-page.php.
 * Keep the image on the parent hero, behind both columns
 * and the transparent homepage header.
 */

.imdex-home-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: #222;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.imdex-home-hero__overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* Two-column hero layout */

.imdex-home-hero__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  /* width: calc(100% - clamp(48px, 13.85vw, 266px)); */
  width: calc(100% - (2 * var(--imdex-section-gutter)));
  max-width: var(--imdex-hero-width);

  min-height: 100vh;
  margin-inline: auto;
  padding: 180px 0 80px;
}

/* ========================================
   6. Homepage Hero — Left Column
======================================== */

.imdex-home-hero__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

/* ACTx logo */

.imdex-home-hero__brand {
  width: min(440px, 100%);
  margin: 0 0 7px;
}

.imdex-home-hero__brand img {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

/* Main SEO heading */

.imdex-home-hero__title {
  max-width: 783px;
  margin: 0 0 50px;
  color: var(--imdex-hero-accent);
  font-family: "Eurostile", Arial, sans-serif;
  font-size: clamp(42px, 4.64vw, 89px);
  font-style: normal;
  font-weight: 900;
  line-height: 0.89;
  letter-spacing: 0;
  text-align: left;
}

/* Hero description */

.imdex-home-hero__description {
  max-width: 743px;
  margin: 0 0 50px;
  color: #fff;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: clamp(20px, 1.83vw, 35px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
}

/* Learn More button */

.imdex-home-hero__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(320px, 100%);
  min-height: 86px;
  margin: 0;
  padding: 20px 28px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--imdex-hero-accent);
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.imdex-home-hero__button:hover,
.imdex-home-hero__button:focus {
  color: #fff;
  background: #d9472c;
}

.imdex-home-hero__button-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

/* ========================================
   7. Homepage Hero — Right Column
======================================== */

.imdex-home-hero__right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.imdex-home-hero__right img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========================================
   8. Homepage Header Overlay
======================================== */

/*
 * Header overlays the hero background.
 * It has no separate background or white menu panel.
 */

body.home .imdex-site-header,
body.front-page .imdex-site-header {
  position: absolute !important;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
}

/* Header container */

body.home .imdex-header-inner,
body.front-page .imdex-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  /* width: calc(100% - clamp(48px, 13.75vw, 264px)); */
  width: calc(100% - (2 * var(--imdex-section-gutter)));
  max-width: var(--imdex-hero-width);
  min-height: 0;
  max-height: none;
  margin-inline: auto;
  padding: 76px 0 0;
  background: transparent !important;
}

/* Main site logo */

body.home .imdex-site-branding,
body.front-page .imdex-site-branding {
  flex: 0 1 248px;
  width: 248px;
  min-width: 0;
  max-height: 50px;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

body.home .imdex-site-branding .custom-logo-link,
body.front-page .imdex-site-branding .custom-logo-link {
  display: block;
  max-height: 50px;
}

body.home .custom-logo,
body.front-page .custom-logo {
  display: block;
  width: 248px;
  max-width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  object-position: left top;
}

body.home .imdex-site-title,
body.front-page .imdex-site-title {
  margin: 0;
  font-size: 1.5rem;
}

body.home .imdex-site-title a,
body.front-page .imdex-site-title a {
  color: #fff;
}

body.home .imdex-site-description,
body.front-page .imdex-site-description {
  color: rgba(255, 255, 255, 0.8);
}

/* Homepage navigation container */

body.home .imdex-primary-navigation,
body.front-page .imdex-primary-navigation {
  display: block;
  flex-shrink: 0;
  max-height: 50px;
  margin-top: 0;
  margin-left: auto;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
}

/* Menu items */

body.home .imdex-primary-navigation ul,
body.front-page .imdex-primary-navigation ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 80px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent !important;
}

body.home .imdex-primary-navigation li,
body.front-page .imdex-primary-navigation li {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

/* Menu typography */

body.home .imdex-primary-navigation a,
body.front-page .imdex-primary-navigation a {
  display: block;
  max-height: 50px;
  padding: 0;
  color: #fff !important;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 700;
  line-height: 31px;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Menu hover color */

body.home .imdex-primary-navigation a:hover,
body.front-page .imdex-primary-navigation a:hover {
  color: var(--imdex-menu-hover) !important;
  opacity: 1;
}

/* ========================================
   9. Main Content
======================================== */

.imdex-site-main {
  min-height: 60vh;
  padding-block: 3rem;
}

.imdex-page-title,
.imdex-entry-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.imdex-entry-title a {
  color: inherit;
  text-decoration: none;
}

.imdex-entry-meta,
.imdex-entry-footer {
  color: var(--imdex-muted);
  font-size: 0.9rem;
}

.imdex-post-card {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--imdex-border);
}

.imdex-post-thumbnail {
  display: block;
  margin-bottom: 1rem;
  overflow: hidden;
}

.imdex-post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.imdex-entry-content>* {
  max-width: 100%;
}

.imdex-entry-content h2,
.imdex-entry-content h3 {
  margin-top: 2rem;
  line-height: 1.25;
}

.imdex-entry-content blockquote {
  margin-inline: 0;
  padding: 0.25rem 1.25rem;
  border-left: 3px solid var(--imdex-accent);
  color: var(--imdex-muted);
}

.imdex-entry-content pre {
  overflow-x: auto;
  padding: 1rem;
  background: #f7f7f7;
  border-radius: 0.5rem;
}

.imdex-entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.imdex-entry-content th,
.imdex-entry-content td {
  padding: 0.65rem;
  border: 1px solid var(--imdex-border);
  text-align: left;
}

/* ========================================
   10. Default Index and Pagination
======================================== */

.imdex-index-page {
  padding: 60px 24px;
}

.imdex-post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.imdex-post {
  min-width: 0;
}

.imdex-post .imdex-entry-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: 0;
}

.imdex-entry-summary {
  margin-bottom: 1rem;
}

.imdex-read-more {
  display: inline-block;
  font-weight: 700;
}

.imdex-pagination {
  margin-top: 40px;
}

.imdex-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.imdex-no-results {
  padding-block: 40px;
}

/* ========================================
   11. Comments and Forms
======================================== */

.imdex-comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--imdex-border);
}

input,
textarea,
select {
  max-width: 100%;
}

textarea {
  width: 100%;
}

/* ========================================
   12. Footer
======================================== */

.imdex-site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--imdex-border);
  color: var(--imdex-muted);
  font-size: 0.9rem;
}

.imdex-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.imdex-footer-inner p {
  margin: 0;
}

/* ========================================
   13. Accessibility
======================================== */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  margin: 0;
  clip: auto;
  background: #fff;
  color: #000;
}

/* ========================================
   14. Tablet
======================================== */

@media (max-width: 1024px) {

  body.home .imdex-header-inner,
  body.front-page .imdex-header-inner {
    width: calc(100% - 48px);
    gap: 1.5rem;
  }

  body.home .imdex-primary-navigation ul,
  body.front-page .imdex-primary-navigation ul {
    gap: clamp(14px, 1.8vw, 24px);
  }

  body.home .imdex-primary-navigation a,
  body.front-page .imdex-primary-navigation a {
    font-size: 14px;
    line-height: 20px;
  }

  .imdex-home-hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 28px;
    width: calc(100% - 48px);
    padding-top: 150px;
  }

  .imdex-home-hero__title {
    margin-bottom: 32px;
  }

  .imdex-home-hero__description {
    margin-bottom: 32px;
  }

  .imdex-home-hero__button {
    min-height: 68px;
  }

  .imdex-post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========================================
   15. Mobile
======================================== */

@media (max-width: 760px) {
  .imdex-header-inner {
    flex-wrap: wrap;
  }

  .imdex-menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .imdex-primary-navigation {
    display: none;
    flex-basis: 100%;
    width: 100%;
  }

  .imdex-primary-navigation.is-open {
    display: block;
  }

  .imdex-primary-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding-block: 0.5rem;
  }

  .imdex-site-main {
    padding-block: 2rem;
  }

  /* Keep the header over the hero on mobile. */

  body.home .imdex-header-inner,
  body.front-page .imdex-header-inner {
    width: calc(100% - 32px);
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 0;
    gap: 1rem;
  }

  body.home .imdex-site-branding,
  body.front-page .imdex-site-branding {
    flex: 0 1 200px;
    width: 200px;
    max-height: 50px;
  }

  body.home .imdex-site-branding .custom-logo-link,
  body.front-page .imdex-site-branding .custom-logo-link {
    max-height: 50px;
  }

  body.home .custom-logo,
  body.front-page .custom-logo {
    width: 200px;
    max-height: 50px;
  }

  body.home .imdex-menu-toggle,
  body.front-page .imdex-menu-toggle {
    display: inline-block;
    max-height: 50px;
    margin-left: auto;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    background: transparent !important;
  }

  /* Expanded mobile navigation */

  body.home .imdex-primary-navigation,
  body.front-page .imdex-primary-navigation {
    display: none;
    flex-basis: 100%;
    width: 100%;
    max-height: none;
    margin-top: 0;
    margin-left: 0;
    padding: 1rem 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.home .imdex-primary-navigation.is-open,
  body.front-page .imdex-primary-navigation.is-open {
    display: block;
  }

  body.home .imdex-primary-navigation ul,
  body.front-page .imdex-primary-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: transparent !important;
  }

  body.home .imdex-primary-navigation a,
  body.front-page .imdex-primary-navigation a {
    max-height: none;
    font-size: 22px;
    line-height: 26px;
    text-align: left;
  }

  /* Stack hero columns on mobile */

  .imdex-home-hero {
    min-height: 0;
    background-position: center center;
  }

  .imdex-home-hero__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    width: calc(100% - 32px);
    min-height: 0;
    padding-top: 150px;
    padding-bottom: 48px;
  }

  .imdex-home-hero__left {
    width: 100%;
  }

  .imdex-home-hero__brand {
    width: min(320px, 100%);
    margin-bottom: 28px;
  }

  .imdex-home-hero__title {
    max-width: 100%;
    margin-bottom: 28px;
    font-size: clamp(38px, 9vw, 60px);
    line-height: 0.95;
  }

  .imdex-home-hero__description {
    max-width: 100%;
    margin-bottom: 28px;
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.45;
  }

  .imdex-home-hero__button {
    width: min(320px, 100%);
    min-height: 64px;
  }

  .imdex-home-hero__right img {
    width: 100%;
    max-width: 560px;
  }

  .imdex-home-content {
    padding: 40px 20px;
  }

  .imdex-index-page {
    padding: 40px 20px;
  }

  .imdex-post-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ========================================
   16. Small Mobile
======================================== */

@media (max-width: 480px) {

  body.home .imdex-header-inner,
  body.front-page .imdex-header-inner {
    width: calc(100% - 32px);
  }

  body.home .imdex-site-branding,
  body.front-page .imdex-site-branding {
    flex-basis: 170px;
    width: 170px;
  }

  body.home .custom-logo,
  body.front-page .custom-logo {
    width: 170px;
    max-height: 46px;
  }

  .imdex-home-hero__layout {
    width: calc(100% - 32px);
    padding-top: 140px;
  }

  .imdex-home-hero__title {
    font-size: clamp(34px, 9vw, 48px);
  }
}



/* Homepage Hero — visibility fix */
.imdex-home-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background-color: #222;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.imdex-home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.imdex-home-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  width: calc(100% - clamp(48px, 13.85vw, 266px));
  max-width: 1650px;
  min-height: 100vh;
  margin-inline: auto;
  padding: 180px 0 80px;
  box-sizing: border-box;
}

.imdex-home-hero__left {
  min-width: 0;
}

.imdex-home-hero__brand {
  margin: 0 0 7px;
}

.imdex-home-hero__brand img {
  display: block;
  width: min(440px, 100%);
  height: auto;
}


.imdex-home-hero__title {
  max-width: 783px;
  margin: 15px 0 50px;
  color: #ED5437;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: clamp(42px, 4.64vw, 88px);
  font-weight: 900;
  line-height: 0.89;
  letter-spacing: 0;
  text-align: left;
}


.imdex-home-hero__description {
  max-width: 743px;
  margin: 0 0 50px;
  color: #fff;
  font-size: clamp(20px, 1.83vw, 35px);
  line-height: 1.4;
}


/* Homepage Hero CTA Button */
.imdex-home-hero__button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 320px;
  height: 86px;
  min-height: 86px;
  padding: 0 50px 0 20px;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  background: #ED5437;
  color: #fff;
  opacity: 1;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.imdex-home-hero__button span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  text-align: center;
  transform: translateY(-3px);
}




.imdex-home-hero__button-arrow {
  position: absolute;
  top: 50%;
  right: 40px;
  width: 31px;
  height: 18px;
  display: block;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateY(-50%);
  font-size: 0;
  line-height: 0;
}



.imdex-home-hero__button:hover,
.imdex-home-hero__button:focus-visible {
  background: #BD2A0E;
  color: #fff;
}

@media (max-width: 767px) {
  .imdex-home-hero__button {
    width: 100%;
    max-width: 100%;
    height: 86px;
    min-height: 86px;
    font-size: 30px;
  }

  .imdex-home-hero__button-arrow {
    right: 24px;
    font-size: 28px;
  }
}


.imdex-home-hero__right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.imdex-home-hero__right img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 767px) {
  .imdex-home-hero__layout {
    grid-template-columns: 1fr;
    gap: 32px;
    width: calc(100% - 40px);
    min-height: 100vh;
    padding: 140px 0 50px;
  }

  .imdex-home-hero__title {
    margin-bottom: 28px;
    font-size: clamp(40px, 11vw, 64px);
  }

  .imdex-home-hero__description {
    margin-bottom: 28px;
    font-size: 20px;
    line-height: 1.5;
  }

  .imdex-home-hero__button {
    min-height: 64px;
  }
}





/* Mobile Navigation Menu */
@media screen and (max-width: 767px) {

  /* White dropdown panel */
  body.home .imdex-primary-navigation,
  body.front-page .imdex-primary-navigation {
    width: 100%;
    flex-basis: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    background: #fff !important;
    border-top: 1px solid #ddd;
    box-shadow: none !important;
  }

  /* Keep the white background when menu is open */
  body.home .imdex-primary-navigation.is-open,
  body.front-page .imdex-primary-navigation.is-open {
    display: block;
    background: #fff !important;
  }

  /* Center the menu items */
  body.home .imdex-primary-navigation ul,
  body.front-page .imdex-primary-navigation ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff !important;
  }

  /* Add a bottom border to each item */
  body.home .imdex-primary-navigation li,
  body.front-page .imdex-primary-navigation li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    background: #fff !important;
  }

  /* Black, centered menu links */
  body.home .imdex-primary-navigation a,
  body.front-page .imdex-primary-navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: none;
    min-height: 54px;
    margin: 0;
    padding: 14px 20px;
    color: #222 !important;
    background: #fff !important;
    font-family: "Eurostile", Arial, sans-serif;
    font-size: 20px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
  }

  /* Hover and focus */
  body.home .imdex-primary-navigation a:hover,
  body.home .imdex-primary-navigation a:focus-visible,
  body.front-page .imdex-primary-navigation a:hover,
  body.front-page .imdex-primary-navigation a:focus-visible {
    color: #ED5437 !important;
    background: #fff !important;
  }



  /* White toggle button with black icon/text */
  body.home .imdex-menu-toggle,
  body.front-page .imdex-menu-toggle {
    color: #222 !important;
    background: #fff !important;
    border: 1px solid #ddd;
  }
}




@media screen and (max-width: 767px) {
  body.home .custom-logo {
    max-height: 32px;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }
}





/* =========================================
   Homepage Features Section
   ========================================= */

.imdex-features {
  width: 100%;
  padding: 114px 0 100px;
  box-sizing: border-box;
  background-color: #222222;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #FFFFFF;
}

.imdex-features__container {
  width: calc(100% - (2 * var(--imdex-section-gutter)));
  max-width: var(--imdex-hero-width);
  margin-inline: auto;
  padding: 0;
  box-sizing: border-box;
  background: transparent !important;
}

.imdex-features__heading {
  width: 100%;
  margin: 0 0 102px;
  color: #FFFFFF;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 69px;
  font-weight: 900;
  line-height: 57px;
  letter-spacing: 0;
  text-align: center;
}

.imdex-features__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.imdex-feature-card {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
}

.imdex-feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 27px;
}

.imdex-feature-card__icon img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.imdex-feature-card__title {
  margin: 0 0 15px;
  color: #ED5437;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 41px;
  letter-spacing: 0;
  text-align: center;
}

.imdex-feature-card__description {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #FFFFFF;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: 0;
  text-align: center;
  box-sizing: border-box;
}

.imdex-features__action {
  display: flex;
  justify-content: center;
  margin-top: 112px;
}

/* Reuse the hero button styling without its arrow */
.imdex-home-hero__button--no-arrow {
  padding: 0 20px;
}

.imdex-home-hero__button--no-arrow span:first-child {
  transform: none;
}

/* Tablet */
@media screen and (max-width: 1100px) {
  .imdex-features__heading {
    margin-bottom: 70px;
    font-size: 54px;
    line-height: 1.05;
  }

  .imdex-features__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 60px;
    column-gap: 28px;
  }

  .imdex-feature-card__title {
    font-size: 28px;
    line-height: 1.2;
  }

  .imdex-feature-card__description {
    font-size: 19px;
    line-height: 1.45;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  .imdex-features {
    background-size: auto 100%;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #222;
  }

  .imdex-features__container {
    width: calc(100% - 40px);
  }

  .imdex-features__heading {
    margin-bottom: 50px;
    font-size: clamp(32px, 8vw, 44px);
    line-height: 1.1;
  }

  .imdex-features__grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .imdex-feature-card__icon {
    width: 120px;
    height: 120px;
    margin-bottom: 27px;
  }

  .imdex-feature-card__icon img {
    width: 120px;
    height: 120px;
  }

  .imdex-feature-card__title {
    margin-bottom: 15px;
    font-size: 30px;
    line-height: 1.2;
  }

  .imdex-feature-card__description {
    font-size: 20px;
    line-height: 1.5;
  }

  .imdex-features__action {
    margin-top: 60px;
  }

  .imdex-home-hero__button--no-arrow {
    width: 320px;
    max-width: 100%;
    min-height: 86px;
    height: 86px;
    font-size: 30px;
  }
}




/* Burger Menu Icon */
.imdex-burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 28px;
  height: 24px;
}

.imdex-burger-icon span {
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;

}


/* Uniform content width across all homepage sections */
@media (max-width: 760px) {
  :root {
    --imdex-section-gutter: 20px;
  }

  .imdex-home-hero__layout,
  body.home .imdex-header-inner,
  body.front-page .imdex-header-inner,
  .imdex-features__container {
    width: calc(100% - (2 * var(--imdex-section-gutter)));
    max-width: var(--imdex-hero-width);
  }
}

/* Keep the features button text on one line */
.imdex-features__action .imdex-home-hero__button,
.imdex-features__action .imdex-home-hero__button span {
  white-space: nowrap;
  transform: translateY(-3px);
}

.imdex-features__action .imdex-home-hero__button {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  flex-shrink: 0;
  padding-inline: 32px;
  box-sizing: border-box;

}

/* Mobile */
@media screen and (max-width: 767px) {
  .imdex-features__action .imdex-home-hero__button {
    max-width: 100%;
    padding-inline: 20px;
    font-size: 26px;
  }
}


/* ========================================
   Full-width Specs Section
======================================== */

.imdex-specs {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  padding: 109px 24px 100px;
  box-sizing: border-box;
  background-color: #FFFFFF;
  color: #052A3E;
}

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

/* Full-width container */
.imdex-specs__container {
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Section heading */
.imdex-specs__heading {
  width: 100%;
  margin: 0 0 109px;
  color: #ED5437;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 69px;
  font-weight: 900;
  line-height: 57px;
  letter-spacing: 0;
  text-align: center;
}

/* Full-width rows wrapper */
.imdex-specs__rows {
  display: flex;
  flex-direction: column;
  gap: 109px;
  width: 100%;
}

/* Full-width article with centered, adjacent columns */
.imdex-specs__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 609px));
  justify-content: center;
  align-items: center;
  column-gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Image and content columns */
.imdex-specs__image,
.imdex-specs__content {
  width: 100%;
  max-width: 609px;
  min-width: 0;
}

/* Image */
.imdex-specs__image {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content */
.imdex-specs__content {
  padding-left: 32px;
}

/* Image on the right */
.imdex-specs__row--image-right .imdex-specs__image {
  order: 2;
}

.imdex-specs__row--image-right .imdex-specs__content {
  order: 1;
  padding-right: 32px;
  padding-left: 0;
}

/* Image-left: pull image and content toward the center */
.imdex-specs__row--image-left .imdex-specs__image {
  justify-self: end;
}

.imdex-specs__row--image-left .imdex-specs__content {
  justify-self: start;
}

/* Image-right: mirror the image-left layout */
.imdex-specs__row--image-right .imdex-specs__image {
  justify-self: start;
}

.imdex-specs__row--image-right .imdex-specs__content {
  justify-self: end;
}

/* Image element */
.imdex-specs__image-element {
  display: block;
  width: 100%;
  height: auto;
  max-height: 506px;
  object-fit: contain;
}

/* Row title */
.imdex-specs__title {
  margin: 0 0 32px;
  color: #ED5437;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 47px;
  font-weight: 900;
  line-height: 58px;
  letter-spacing: 0;
  text-align: left;
}

/* Row description */
.imdex-specs__description {
  margin: 0;
  color: #052A3E;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 46px;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.imdex-specs__description strong,
.imdex-specs__description b {
  color: #2871B8;
}

/* ========================================
   Tablet
======================================== */

@media screen and (max-width: 1024px) {
  .imdex-specs {
    padding: 80px 32px;
  }

  .imdex-specs__heading {
    margin-bottom: 80px;
    font-size: 56px;
    line-height: 1.1;
  }

  .imdex-specs__rows {
    gap: 80px;
  }

  .imdex-specs__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .imdex-specs__image,
  .imdex-specs__content {
    max-width: 609px;
  }

  .imdex-specs__content {
    padding-left: 24px;
  }

  .imdex-specs__row--image-right .imdex-specs__content {
    padding-right: 24px;
    padding-left: 0;
  }

  .imdex-specs__title {
    margin-bottom: 24px;
    font-size: 36px;
    line-height: 1.2;
  }

  .imdex-specs__description {
    font-size: 24px;
    line-height: 1.45;
  }
}

/* ========================================
   Mobile
======================================== */

@media screen and (max-width: 767px) {
  .imdex-specs {
    padding: 60px 20px;
  }

  .imdex-specs__heading {
    margin-bottom: 60px;
    font-size: 40px;
    line-height: 1.1;
  }

  .imdex-specs__rows {
    gap: 60px;
  }

  .imdex-specs__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .imdex-specs__row--image-left .imdex-specs__image,
  .imdex-specs__row--image-right .imdex-specs__image {
    order: initial;
    justify-self: stretch;
  }

  .imdex-specs__row--image-left .imdex-specs__content,
  .imdex-specs__row--image-right .imdex-specs__content {
    order: initial;
    justify-self: stretch;
    padding: 0;
  }

  .imdex-specs__image,
  .imdex-specs__content {
    width: 100%;
    max-width: none;
  }



  .imdex-specs__image-element {
    max-height: 420px;
  }

  .imdex-specs__title {
    margin-bottom: 20px;
    font-size: 32px;
    line-height: 1.2;
  }

  .imdex-specs__description {
    font-size: 20px;
    line-height: 1.5;
    overflow-wrap: normal;
  }



  .imdex-specs__content,
  .imdex-specs__title {
    text-align: center;
  }


}


/* ========================================
   Standard Inner Page Header
   Applies to pages, posts, news, archives, etc.
   Homepage hero header remains unchanged.
======================================== */

/* Grayscale logo */
body:not(.home) .imdex-site-branding .custom-logo {
  filter: brightness(0) saturate(100%) invert(55%);
}

/* Standard white header */
body:not(.home) .imdex-site-header {
  position: relative !important;
  top: auto;
  left: auto;
  width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff !important;
  box-shadow: none !important;
}

/* Header container */
body:not(.home) .imdex-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: calc(100% - (2 * var(--imdex-section-gutter)));
  max-width: var(--imdex-hero-width);
  min-height: 0;
  max-height: none;
  margin-inline: auto;
  padding: 24px 0;
  background: #fff !important;
}

/* Logo */
body:not(.home) .imdex-site-branding {
  flex: 0 1 248px;
  width: 248px;
  min-width: 0;
  max-height: 50px;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

body:not(.home) .imdex-site-branding .custom-logo-link {
  display: block;
  max-height: 50px;
}

body:not(.home) .imdex-site-branding .custom-logo {
  display: block;
  width: 248px;
  max-width: 100%;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
}

/* Site title fallback */
body:not(.home) .imdex-site-title {
  margin: 0;
  font-size: 1.5rem;
}

body:not(.home) .imdex-site-title a {
  color: #000 !important;
}

body:not(.home) .imdex-site-description {
  color: #555;
}

/* Navigation container */
body:not(.home) .imdex-primary-navigation {
  display: block;
  flex-shrink: 0;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
}

/* Menu list */
body:not(.home) .imdex-primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent !important;
}

body:not(.home) .imdex-primary-navigation li {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: transparent !important;
}

/* Black navigation links */
body:not(.home) .imdex-primary-navigation a {
  display: block;
  padding: 0;
  color: #000 !important;
  font-family: "Eurostile", Arial, sans-serif;
  font-size: 30px;
  font-style: normal;
  font-weight: 700;
  line-height: 31px;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transition: color 0.2s ease;
}

body:not(.home) .imdex-primary-navigation a:hover,
body:not(.home) .imdex-primary-navigation a:focus-visible {
  color: var(--imdex-menu-hover, #ED5437) !important;
}

/* Mobile menu toggle */
body:not(.home) .imdex-menu-toggle {
  color: #000;
}

/* Responsive header */
@media (max-width: 767px) {
  body:not(.home) .imdex-header-inner {
    gap: 16px;
    padding: 20px 0;
  }

  body:not(.home) .imdex-site-branding {
    flex-basis: 180px;
    width: 180px;
  }

  body:not(.home) .imdex-site-branding .custom-logo {
    width: 180px;
  }

  body:not(.home) .imdex-primary-navigation ul {
    gap: 16px;
  }

  body:not(.home) .imdex-primary-navigation a {
    font-size: 18px;
    line-height: 1.3;
    white-space: normal;
  }
}


/* ========================================
   Standard Inner Page Content
======================================== */

body:not(.home) .imdex-inner-page {
  width: 100%;
  padding: 48px 24px 80px;
  background: #fff;
}

body:not(.home) .imdex-inner-page>.imdex-inner-container,
body:not(.home) .imdex-inner-page>.imdex-single-news__container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  body:not(.home) .imdex-inner-page {
    padding: 32px 20px 56px;
  }
}




/* ========================================
   News Archive Layout
======================================== */

body.post-type-archive-news .imdex-news-archive {
  width: 100%;
  padding: 48px 24px 80px;
  background: #fff;
}

body.post-type-archive-news .imdex-news-archive__inner {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
}

body.post-type-archive-news .imdex-news-archive__header {
  margin-bottom: 40px;
  text-align: center;
}

body.post-type-archive-news .imdex-page-title {
  margin: 0;
  color: #111;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

body.post-type-archive-news .imdex-news-archive__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
}

body.post-type-archive-news .imdex-news-archive__item {
  min-width: 0;
  margin: 0;
}

body.post-type-archive-news .imdex-news-archive__image-link {
  display: block;
  margin-bottom: 20px;
  overflow: hidden;
}

body.post-type-archive-news .imdex-news-archive__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

body.post-type-archive-news .imdex-news-archive__image-link:hover .imdex-news-archive__image {
  transform: scale(1.03);
}

body.post-type-archive-news .imdex-news-archive__title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
}

body.post-type-archive-news .imdex-news-archive__title a {
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.post-type-archive-news .imdex-news-archive__title a:hover {
  color: var(--imdex-menu-hover, #ED5437);
}

body.post-type-archive-news .imdex-news-archive__date {
  margin: 0 0 14px;
  color: #666;
  font-size: 14px;
}

body.post-type-archive-news .imdex-news-archive__excerpt {
  color: #333;
  font-size: 16px;
  line-height: 1.75;
}

body.post-type-archive-news .imdex-news-archive__excerpt>*:first-child {
  margin-top: 0;
}

body.post-type-archive-news .imdex-news-archive__read-more {
  display: inline-block;
  margin-top: 12px;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

body.post-type-archive-news .imdex-news-archive__read-more:hover {
  color: var(--imdex-menu-hover, #ED5437);
}

body.post-type-archive-news .imdex-news-archive .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

body.post-type-archive-news .imdex-news-archive .page-numbers {
  color: #111;
  text-decoration: none;
}

body.post-type-archive-news .imdex-news-archive .page-numbers.current {
  font-weight: 700;
}

body.post-type-archive-news .imdex-news-archive__empty {
  text-align: center;
}

@media (max-width: 767px) {
  body.post-type-archive-news .imdex-news-archive {
    padding: 32px 20px 56px;
  }

  body.post-type-archive-news .imdex-news-archive__header {
    margin-bottom: 28px;
  }

  body.post-type-archive-news .imdex-news-archive__list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.post-type-archive-news .imdex-news-archive__image-link {
    margin-bottom: 16px;
  }
}