/* =========================================================
   Product Details Page Styles
   This file is for product/inner pages only.
   Global layout, navbar, footer, and base typography should
   stay controlled by base.css and layout.css.
   ========================================================= */

/* Do not override body font here.
   The global font should come from base.css. */

/* Do not style .navbar here.
   Navbar styling should only come from layout.css. */

/* Avoid global li styling.
   Scope list styles to product/section content only. */


/* =========================================================
   Section Layout
   ========================================================= */

.section {
  /* Optional section wrapper.
     Keep empty unless you need page-wide product section rules. */
}

.section-container {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  gap: 40px;
  height: auto;
  padding: 1.5rem;
}

.section-image {
  max-width: 300px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-image img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.section-details {
  max-width: 645px;
}

.section-text {
  line-height: 1.7;
}


/* =========================================================
   Page Hero / Background Header
   ========================================================= */

.section-bg {
  width: 100%;
  min-height: 400px;
  background-color: #6b7280;
  background-image: url("../img/fault-indicator-section-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  position: relative;
  padding: 0 1.5rem;
  overflow: hidden;
}

.section-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 0;
}

.section-title {
  position: relative;
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 0;
  text-transform: uppercase;
  color: #ffffff;
  z-index: 1;
  letter-spacing: 0.02em;
}

.section-sub-title {
  color: #003272;
}

.section-h3-title {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 6px;
  color: #003272;
  font-weight: 800;
}


/* =========================================================
   Text and Lists
   ========================================================= */

.section-details li,
.sublist li {
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.section-details ul,
.section-details ol {
  padding-left: 1.3rem;
  margin: 0.8rem 0 1.2rem;
}

.sublist {
  padding-left: 1.5rem;
  line-height: 1.4;
  margin-bottom: 1.2rem;
}

p .bold,
.bold {
  font-weight: bold !important;
}


/* =========================================================
   Buttons
   ========================================================= */

.buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  padding: 1.2em 0;
  flex-wrap: wrap;
}

.btn,
a.btn,
.buttons a {
  background-color: #003272;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover,
a.btn:hover,
.buttons a:hover {
  background-color: #f0f4f8;
  color: #003272;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 35, 89, 0.12);
}

.btn:focus-visible,
a.btn:focus-visible,
.buttons a:focus-visible {
  outline: 3px solid rgba(0, 50, 114, 0.25);
  outline-offset: 3px;
}


/* =========================================================
   Video Modal
   ========================================================= */

.videoModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding-top: 50px;
  z-index: 2000;
}

.videoModal video {
  max-width: 90vw;
  max-height: 80vh;
  width: 100%;
  height: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #003272;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.close-btn:hover {
  background-color: #064c9f;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 35, 89, 0.2);
}


/* =========================================================
   Product Tabs
   ========================================================= */

.product-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
}

.tab-button {
  text-transform: uppercase;
  padding: 1rem 2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #1f2937;
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.tab-button:hover {
  background-color: rgba(0, 50, 114, 0.06);
  color: #003272;
}

.tab-button.active {
  border-bottom: 3px solid #003272;
  color: #003272;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: flex;
}


/* =========================================================
   Mini Tabs Under WiFi Image
   ========================================================= */

.product-tabs.tabs-mini {
  border-bottom: none;
  margin-top: 12px;
  gap: 0;
}

.tab-button.mini {
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}


/* =========================================================
   Swap Images
   ========================================================= */

.wifi-model-img {
  display: none;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.wifi-model-img.active {
  display: block;
}

/* Force only one WiFi model image to show */
#smart-1 .wifi-model-img {
  display: none !important;
}

#smart-1 .wifi-model-img.active {
  display: block !important;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {

  .btn,
  a.btn,
  .buttons a {
    font-size: 13px;
  }

  .section-container {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .section-bg {
    min-height: 320px;
  }

  .section-container {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }

  .section-details {
    max-width: 100%;
  }

  .section-details ul,
  .section-details ol,
  .sublist {
    text-align: left;
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .buttons a,
  .btn,
  a.btn {
    width: 100%;
  }

  .videoModal video {
    max-width: 95vw;
    max-height: 70vh;
  }

  .product-tabs {
    flex-direction: column;
  }

  .tab-button {
    width: 100%;
    font-size: 1rem;
  }

  .tab-content.active {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .section-bg {
    min-height: 280px;
    padding: 0 1rem;
  }

  .section-container {
    padding: 1.5rem;
  }

  .section-image {
    max-width: 240px;
    min-height: 220px;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* =========================================================
   Resources Page Styles
   ========================================================= */

.resources-intro {
  max-width: 920px;
  margin: 0 auto 34px;
  text-align: center;
}

.resources-intro p {
  margin: 12px auto 0;
  color: #4b5563;
  line-height: 1.8;
  max-width: 760px;
}

.resources-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 50, 114, 0.12);
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0, 50, 114, 0.08);
}

.resources-search {
  position: relative;
}

.resources-search i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #003272;
}

.resources-search input {
  width: 100%;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 13px 16px 13px 44px;
  font: inherit;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resources-search input:focus {
  border-color: #003272;
  box-shadow: 0 0 0 4px rgba(0, 50, 114, 0.10);
}

.resources-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.resource-filter-btn {
  border: 1px solid rgba(0, 50, 114, 0.18);
  background: #ffffff;
  color: #003272;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.resource-filter-btn:hover,
.resource-filter-btn.active {
  background: #003272;
  border-color: #003272;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 50, 114, 0.16);
}

.resources-wrapper {
  max-width: 1120px;
  margin: 0 auto;
}

.resource-family {
  margin-bottom: 34px;
}

.resource-family-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 50, 114, 0.14);
}

.resource-family-heading h2 {
  margin: 0;
  color: #003272;
  font-size: 26px;
}

.resource-family-heading span {
  color: #6b7280;
  font-size: 14px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(0, 50, 114, 0.12);
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(0, 50, 114, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 50, 114, 0.12);
}

.resource-card-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: #edf3f9;
  color: #003272;
  font-size: 20px;
}

.resource-card h3 {
  margin: 0 0 4px;
  color: #003272;
  font-size: 21px;
}

.resource-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

.resource-card .product-link {
  display: inline-block;
  margin-top: 10px;
  color: #003272;
  font-weight: 700;
  text-decoration: none;
}

.resource-card .product-link:hover {
  text-decoration: underline;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.resource-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 170px;
  margin: 0;
}

.resource-actions .btn.secondary {
  background: #ffffff;
  color: #003272;
  border: 1px solid #003272;
}

.resource-actions .btn.secondary:hover {
  background: #003272;
  color: #ffffff;
}

.resource-actions .btn.is-placeholder {
  background: #f3f6fa;
  border: 1px dashed #9aa9bd;
  color: #607086;
  cursor: not-allowed;
  box-shadow: none;
}

.resource-actions .btn.is-placeholder:hover {
  background: #f3f6fa;
  color: #607086;
  transform: none;
}

.resources-empty {
  display: none;
  max-width: 720px;
  margin: 24px auto 0;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(0, 50, 114, 0.12);
  border-radius: 18px;
  background: #ffffff;
  color: #4b5563;
}

.resources-empty.active {
  display: block;
}

@media (max-width: 900px) {
  .resources-toolbar {
    grid-template-columns: 1fr;
  }

  .resources-filter {
    justify-content: flex-start;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .resource-family-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-card-top {
    flex-direction: column;
  }

  .resource-actions .btn {
    width: 100%;
  }
}

.resources-page-container {
  display: block;
}

.resources-page-details {
  width: 100%;
  max-width: none;
}

/* =========================================================
   Resources Page Layout Fix
   Keeps the resources page full-width inside the content area.
   The original .section-details max-width was limiting the page.
   ========================================================= */

#resources .section-container {
  width: 100%;
  max-width: 1200px;
  display: block;
  align-items: initial;
  gap: 0;
  margin: 0 auto 1.5rem;
  padding: 2.75rem 1.5rem 3.5rem;
}

#resources .section-details {
  width: 100%;
  max-width: none;
}

#resources .resources-intro,
#resources .resources-toolbar,
#resources .resources-wrapper {
  width: 100%;
}

#resources .resources-toolbar {
  grid-template-columns: minmax(360px, 1fr) auto;
}

#resources .resources-search input {
  min-width: 0;
}

#resources .resource-grid {
  width: 100%;
}

#resources .resource-card {
  min-width: 0;
}

#resources .resource-card-top>div {
  min-width: 0;
}

#resources .resource-actions .btn {
  flex: 1 1 170px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #resources .section-container {
    padding: 2.25rem 1.25rem 3rem;
  }

  #resources .resources-toolbar {
    grid-template-columns: 1fr;
  }

  #resources .resources-filter {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  #resources .section-container {
    padding: 2rem 1rem 2.5rem;
    text-align: left;
  }

  #resources .resources-intro {
    text-align: left;
  }

  #resources .resources-filter {
    display: grid;
    grid-template-columns: 1fr;
  }

  #resources .resource-filter-btn,
  #resources .resource-actions .btn {
    width: 100%;
  }
}

/* Resource filtering visibility fallback */
#resources .resource-card[aria-hidden="true"] {
  display: none !important;
}

#resources .resource-family[style*="display: none"] {
  display: none !important;
}

@media (max-width: 1100px) {
  #resources .resources-toolbar {
    grid-template-columns: 1fr;
  }

  #resources .resources-filter {
    justify-content: flex-start;
  }
}

/* =========================================================
   Resources Page Animations and Icon Polish
   ========================================================= */

#resources .resources-intro {
  animation: resourcesFadeUp 0.55s ease both;
}

#resources .resources-toolbar {
  animation: resourcesFadeUp 0.65s ease both;
}

#resources .resource-family {
  animation: resourcesFadeUp 0.7s ease both;
}

#resources .resource-family:nth-of-type(1) {
  animation-delay: 0.05s;
}

#resources .resource-family:nth-of-type(2) {
  animation-delay: 0.1s;
}

#resources .resource-family:nth-of-type(3) {
  animation-delay: 0.15s;
}

#resources .resource-family:nth-of-type(4) {
  animation-delay: 0.2s;
}

#resources .resource-family:nth-of-type(5) {
  animation-delay: 0.25s;
}

@keyframes resourcesFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

#resources .resource-card {
  position: relative;
  overflow: hidden;
}

#resources .resource-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(0, 50, 114, 0.08),
      transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

#resources .resource-card:hover::before {
  opacity: 1;
}

#resources .resource-card:hover .resource-icon {
  transform: translateY(-2px) scale(1.06);
  background: #003272;
  color: #ffffff;
}

#resources .resource-icon {
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

#resources .resource-card:hover .resource-icon {
  box-shadow: 0 10px 22px rgba(0, 50, 114, 0.18);
}

#resources .resource-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

#resources .resource-filter-btn i {
  font-size: 0.95em;
}

#resources .resource-filter-btn:hover i,
#resources .resource-filter-btn.active i {
  transform: scale(1.08);
}

#resources .resource-filter-btn i {
  transition: transform 0.2s ease;
}

#resources .resources-search i {
  transition: transform 0.2s ease, color 0.2s ease;
}

#resources .resources-search:focus-within i {
  transform: translateY(-50%) scale(1.08);
  color: #064c9f;
}

#resources .resource-actions .btn i {
  transition: transform 0.2s ease;
}

#resources .resource-actions .btn:hover i {
  transform: translateY(-1px);
}

#resources .product-link {
  position: relative;
}

#resources .product-link::after {
  content: " \f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.8em;
  opacity: 0;
  transform: translateX(-4px);
  display: inline-block;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

#resources .product-link:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {

  #resources .resources-intro,
  #resources .resources-toolbar,
  #resources .resource-family {
    animation: none;
  }

  #resources .resource-card,
  #resources .resource-icon,
  #resources .resource-filter-btn,
  #resources .resource-actions .btn i,
  #resources .product-link::after {
    transition: none;
  }
}

/* =========================================================
   Product Detail Sub-tabs and Specifications
   Centralized from individual product HTML files.
   ========================================================= */

.product-info-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
  border-bottom: 1px solid rgba(0, 50, 114, 0.16);
}

.product-info-tab {
  border: 1px solid rgba(0, 50, 114, 0.18);
  background: #ffffff;
  color: #003272;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.product-info-tab:hover,
.product-info-tab.active {
  background: #003272;
  border-color: #003272;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 50, 114, 0.16);
}

.product-info-panel {
  display: none;
}

.product-info-panel.active {
  display: block;
}

.technical-specs-card,
.technical-specs-placeholder {
  background: #ffffff;
  border: 1px solid rgba(0, 50, 114, 0.14);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 14px 30px rgba(0, 50, 114, 0.08);
}

.technical-specs-card h3,
.technical-specs-placeholder h3 {
  margin-top: 0;
  margin-bottom: 18px;
  color: #003272;
}

.technical-specs-card h4,
.technical-specs-placeholder h4 {
  color: #003272;
  margin: 28px 0 12px;
}

.technical-specs-note {
  margin-bottom: 18px;
  color: #4b5563;
}

.technical-specs-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  margin-bottom: 22px;
}

.technical-specs-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #ffffff;
}

.technical-specs-table th,
.technical-specs-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e5eaf1;
}

.technical-specs-table th {
  background: #f3f6fa;
  color: #003272;
  font-weight: 700;
}

.technical-specs-table td:first-child {
  width: 36%;
  color: #003272;
  font-weight: 700;
}

.technical-specs-table tr:last-child td {
  border-bottom: 0;
}

.technical-specs-table ul,
.technical-specs-list {
  margin: 0;
  padding-left: 18px;
}

.technical-specs-table li,
.technical-specs-list li {
  margin-bottom: 4px;
}

.technical-specs-table li:last-child,
.technical-specs-list li:last-child {
  margin-bottom: 0;
}

.technical-specs-table .spec-section th,
.technical-specs-table .spec-section td {
  background: #e8f0f8;
  color: #003272;
  font-weight: 700;
}

/* HABES-81 detail tabs and specification cards */
.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
  border-bottom: 1px solid #d8e0ea;
}

.detail-tab {
  border: 1px solid #d8e0ea;
  border-bottom: none;
  background: #f7f9fc;
  color: #003272;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px 12px 0 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.detail-tab.active,
.detail-tab:hover {
  background: #003272;
  color: #ffffff;
}

.detail-tab-panel {
  display: none;
}

.detail-tab-panel.active {
  display: block;
}

.spec-card {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #d8e0ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 50, 114, 0.08);
}

.spec-card h4 {
  margin: 0 0 16px;
  color: #003272;
  font-size: 20px;
}

.spec-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #ffffff;
}

.spec-table th,
.spec-table td {
  border: 1px solid #d8e0ea;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.spec-table th {
  background: #003272;
  color: #ffffff;
  font-weight: 700;
}

.spec-table td:first-child {
  width: 34%;
  color: #003272;
  font-weight: 700;
}

.spec-list {
  margin: 0;
  padding-left: 18px;
}

.spec-list li+li {
  margin-top: 4px;
}

@media (max-width: 768px) {
  .product-info-tab {
    width: 100%;
  }

  .technical-specs-card,
  .technical-specs-placeholder,
  .spec-card {
    padding: 18px;
  }

  .detail-tab {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d8e0ea;
  }
}

/* Subtle page entry only */
.page-content {
  animation: pageContentIn 140ms ease-out both;
  will-change: opacity, transform;
}

.page-content {
  animation: pageContentIn 120ms ease-out both;
}

@keyframes pageContentIn {
  from {
    opacity: 0.98;
  }

  to {
    opacity: 1;
  }
}