/* ============================================================
   ELK-Desa — Client adjustments: navigation dropdown additions
   Scope: keyboard access for the Hire Purchase dropdown and
   desktop link spacing safeguard at ~1024px. Load AFTER
   tailwind.css. Primary agent links this file in header.php.
   ============================================================ */

/* Keyboard access: reveal any nav dropdown panel when a link
   inside it receives focus (e.g. Tab navigation).
   Mirrors the visual state of group-hover:visible/opacity-100. */
.nav-dropdown:hover > .nav-dropdown-panel,
.nav-dropdown:focus-within > .nav-dropdown-panel {
  visibility: visible;
  opacity: 1;
}

/* Keep the panel open while focus moves between its links,
   matching the hover transition rhythm (duration-200). */
.nav-dropdown-panel:focus-within {
  visibility: visible;
  opacity: 1;
}

/* Desktop menu spacing safeguard: reduce link gap before the
   floating pill risks overflowing at the lg breakpoint (1024px). */
@media (min-width: 1024px) and (max-width: 1200px) {
  .nav-desktop-links {
    gap: 1rem; /* gap-4 equivalent */
  }
}

/* Client copy: wider dealer subheader and native FAQ toggle spacing. */
.dealer-hero-subcopy { width: min(56rem, calc(100vw - 3rem)); max-width: none; }
.client-financing-faqs summary { gap: 1rem; }
.client-financing-faqs .faq-question { min-width: 0; }
.client-financing-faqs .faq-toggle { flex-shrink: 0; }

/* Homepage offering cards: align titles/dividers without the old empty header area. */
#services .offering-insurance-icon { color: #f18b69; }
#services .offering-grid h3 { min-height: 3.75rem; }
#services .offering-grid a:focus-visible,
.enquiry-button:focus-visible { outline: 3px solid #dc2626; outline-offset: 4px; }
.enquiry-banner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem 3rem; border: 1px solid #fecaca; border-radius: 1.5rem; background: #fef2f2; }
.enquiry-banner h2 { max-width: 42rem; color: #0f172a; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.enquiry-banner p { margin-top: 1rem; color: #475569; font-size: 1rem; line-height: 1.625; }
.enquiry-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 1rem; padding: 1rem 1.75rem; border-radius: .75rem; background: #dc2626; color: #fff; font-weight: 800; transition: background-color .2s; }
.enquiry-button:hover { background: #b91c1c; }
.homepage-announcements { background: #0f172a; }
.announcement-widget { display: block; width: 100%; height: 110px; border: 0; }
@media (max-width: 1023px) {
  .announcement-widget { height: 180px; }
}
@media (max-width: 767px) {
  #services .offering-grid h3 { min-height: 0; }
  .enquiry-banner { flex-direction: column; align-items: flex-start; padding: 2rem 1.5rem; }
  .enquiry-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #services .offering-grid a,
  #services .offering-grid a *,
  .enquiry-button { transition: none; }
  #services .offering-grid a:hover { transform: none; }
}

/* Homepage-style cards for Hire Purchase and Sustainability. */
.client-card-grid .client-card-icon { color: #f18b69; flex-shrink: 0; }
.client-card-grid h3 { min-height: 3.75rem; }
.client-card-grid address { overflow-wrap: anywhere; }
.client-card-grid a:focus-visible { outline: 3px solid #dc2626; outline-offset: 4px; }
@media (max-width: 767px) {
  .client-card-grid h3 { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .client-card-grid > *,
  .client-card-grid > * > .h-1 { transition: none; }
  .client-card-grid > *:hover { transform: none; }
}

/* MyELK-Desa+: transparent phone cutouts, without surrounding card panels. */
.app-showcase .app-phone-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  align-items: start;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 584px;
  margin-inline: auto;
}
.app-showcase .app-phone-link {
  display: block;
  min-width: 0;
  transition: transform .25s ease;
}
.app-showcase .app-phone-link:nth-child(2) { margin-top: 32px; }
.app-showcase .app-phone-link:focus-visible {
  outline: 3px solid #f87171;
  outline-offset: 6px;
}
.app-showcase .app-phone-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(2, 6, 23, .35));
}
@media (hover: hover) and (pointer: fine) {
  .app-showcase .app-phone-link:hover { transform: translateY(-6px); }
}
@media (max-width: 767px) {
  .app-showcase .app-phone-gallery { gap: 16px; }
  .app-showcase .app-phone-link:nth-child(2) { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-showcase .app-phone-link { transition: none; }
  .app-showcase .app-phone-link:hover { transform: none; }
}

/* Client logo sizing: reduced by 20% from initial height */
.site-logo-nav {
  height: 19.2px;
  width: auto;
  max-height: 19.2px;
  display: block;
}

.site-logo-footer {
  height: 25.6px;
  width: auto;
  max-height: 25.6px;
  display: block;
}

/* ============================================================
   Full-screen Corporate Mobile Menu (Sunway-inspired overlay)
   ============================================================ */
html.elk-mobile-menu-open,
html.elk-mobile-menu-open body {
  overflow: hidden;
}

.elk-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: #ffffff;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.elk-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .elk-mobile-menu {
    display: none !important;
  }
}

.elk-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  flex-shrink: 0;
}

.elk-mobile-menu__close {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  border: 1.5px solid #475569;
  background-color: #ffffff;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.elk-mobile-menu__close:hover {
  border-color: #dc2626;
  color: #dc2626;
  background-color: #fef2f2;
}

.elk-mobile-menu__close:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
}

.elk-mobile-menu__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.elk-mobile-menu__spacer {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.elk-mobile-menu__body {
  flex: 1 1 auto;
  padding: 1rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
}

.elk-mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.elk-mobile-menu__item-link,
.elk-mobile-menu__accordion-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: #1e293b;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.elk-mobile-menu__item-link:hover,
.elk-mobile-menu__accordion-btn:hover,
.elk-mobile-menu__item-link.is-active,
.elk-mobile-menu__accordion-btn.is-active,
.elk-mobile-menu__accordion-btn[aria-expanded="true"] {
  color: #dc2626;
}

.elk-mobile-menu__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
}

.elk-mobile-menu__plus::before,
.elk-mobile-menu__plus::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.elk-mobile-menu__plus::before {
  width: 12px;
  height: 2px;
}

.elk-mobile-menu__plus::after {
  width: 2px;
  height: 12px;
}

.elk-mobile-menu__accordion-btn[aria-expanded="true"] .elk-mobile-menu__plus::after,
.elk-mobile-menu__sub-btn[aria-expanded="true"] .elk-mobile-menu__plus::after {
  transform: rotate(90deg);
  opacity: 0;
}

.elk-mobile-menu__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.24s ease, opacity 0.2s ease;
}

.elk-mobile-menu__panel.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
}

.elk-mobile-menu__panel-inner {
  overflow: hidden;
}

.elk-mobile-menu__sublist {
  margin: 0.125rem 0 0.75rem 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.elk-mobile-menu__sublink {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
  transition: color 0.15s ease;
}

.elk-mobile-menu__sublink:hover,
.elk-mobile-menu__sublink.is-active {
  color: #dc2626;
}

.elk-mobile-menu__sub-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 40px;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.elk-mobile-menu__sub-btn:hover,
.elk-mobile-menu__sub-btn.is-active,
.elk-mobile-menu__sub-btn[aria-expanded="true"] {
  color: #dc2626;
}

.elk-mobile-menu__sublist--nested {
  margin: 0.125rem 0 0.5rem 0.25rem;
  padding-left: 0.875rem;
  border-left: 1.5px solid #cbd5e1;
}

.elk-mobile-menu__sublink--nested {
  min-height: 36px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

.elk-mobile-menu__footer-box {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.elk-mobile-menu__careline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  color: #334155;
  background-color: #ffffff;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.elk-mobile-menu__careline:hover,
.elk-mobile-menu__careline:focus-visible {
  border-color: #dc2626;
  color: #dc2626;
  background-color: #fef2f2;
  outline: none;
}

.elk-mobile-menu__careline-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.elk-mobile-menu__careline-number {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.elk-mobile-menu__careline:hover .elk-mobile-menu__careline-number {
  color: #dc2626;
}

@media (prefers-reduced-motion: reduce) {
  .elk-mobile-menu,
  .elk-mobile-menu__panel,
  .elk-mobile-menu__plus::before,
  .elk-mobile-menu__plus::after {
    transition: none;
  }
}


