/* =======================
   BASE STYLES (Mobile First)
   ======================= */

.lighttube {
  padding: 1rem;
}

/* =====================
   LIGHT THEME
   ===================== */
.light .section,
.light .page-header {
  background: #ffffff;
  color: #111;
}

.light .page-header h1,
.light .page-header p {
  color: #111;
}

.light .lighttube .lead,
.light .lighttube p,
.light .lighttube li {
  color: #333;
}

.light .spec-table {
  background: #fff;
}

.light .spec-table th {
  background: #f8f9fa;
  color: #111;
}

.light .spec-table td,
.light .spec-table th {
  border-bottom: 1px solid #dee2e6;
}

.light .btn-primary {
  background: #0d6efd;
  color: #fff;
}

.light .btn-primary:hover {
  background: #084298;
}

/* =====================
   DARK THEME
   ===================== */
.dark .section,
.dark .page-header {
  background: #121212;
  color: #f2f2f2;
}

.dark .lighttube p,
.dark .lighttube .lead,
.dark .lighttube li {
  color: #d0d0d0;
}

.dark .spec-table {
  background: #1a1a1a;
}

.dark .spec-table th {
  background: #252525;
  color: #f2f2f2;
}

.dark .spec-table td,
.dark .spec-table th {
  border-bottom: 1px solid #333;
}

.dark .btn-primary {
  background: #ffb703;
  color: #111;
}

.dark .btn-primary:hover {
  background: #e6a700;
}

/* =====================
   COMMON STYLES - Mobile First
   ===================== */

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.lead {
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.6;
}

.section {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.section h4 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.section h5 {
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.section h6 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.section p {
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.section ul,
.section ol {
  margin-left: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
  list-style-position: outside;
}

.section ul li,
.section ol li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* GRID - Mobile: Stack vertically */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.image-box {
  width: 100%;
  text-align: center;
}

.image-box img {
  width: auto;
  max-width: 280px;
  max-height: 280px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.caption {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* Diagram Box (Technical cross-section) */
.diagram-box {
  width: 100%;
  text-align: center;
}

.diagram-box img {
  width: auto;
  max-width: 250px;
  max-height: 250px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .diagram-box img {
  border-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Installation Exterior Image Box */
.install-image-box {
  width: 100%;
  text-align: center;
}

.install-image-box img {
  width: auto;
  max-width: 240px;
  max-height: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .install-image-box img {
  border-color: #333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Application Showcase Cards */
.app-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.light .app-card {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dark .app-card {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-card:hover {
  transform: translateY(-4px);
}

.light .app-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.dark .app-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.app-card-image {
  width: 100%;
  height: 350px;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
}

.app-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.app-card:hover .app-card-image img {
  transform: scale(1.04);
}

.app-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-card-content h6 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.light .app-card-content h6 {
  color: #111;
}

.dark .app-card-content h6 {
  color: #f2f2f2;
}

.app-card-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.app-card-content .caption {
  margin-top: auto;
  font-size: 0.8rem;
  text-align: left;
  opacity: 0.75;
}

/* TABLE - Mobile: Responsive table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.spec-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.spec-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.spec-table th,
.spec-table td {
  padding: 10px 8px;
  text-align: left;
}

.spec-table th {
  font-weight: 600;
}

/* BUTTON */
.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

/* FOOTER */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

/* =======================
   TABLET (481px - 768px)
   ======================= */

@media (min-width: 481px) {
  .lighttube {
    padding: 1.5rem;
  }

  .page-header {
    margin-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 2.3rem;
  }

  .lead {
    font-size: 1.05rem;
    max-width: 700px;
  }

  .section {
    padding: 2rem;
    margin-bottom: 2rem;
  }

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

  .spec-table {
    font-size: 1rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 12px 10px;
  }
}

/* =======================
   TABLET LANDSCAPE (769px - 1024px)
   ======================= */

@media (min-width: 769px) {
  .lighttube {
    padding: 2rem;
  }

  .page-header {
    margin-bottom: 2.5rem;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .lead {
    font-size: 1.1rem;
    max-width: 850px;
  }

  .section {
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 12px;
  }

  .section h2 {
    font-size: 2.15rem;
  }

  /* Two column grid for image/text layouts */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
  }

  .spec-grid {
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: center;
  }

  /* Three column grid for applications */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .spec-table {
    display: table;
  }
}

/* =======================
   DESKTOP (1025px and up)
   ======================= */

@media (min-width: 1025px) {
  .lighttube {
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
  }

  .page-header {
    margin-bottom: 3rem;
  }

  .page-header h1 {
    font-size: 2.6rem;
  }

  .lead {
    max-width: 900px;
  }

  .section {
    padding: 2.5rem;
    border-radius: 14px;
  }

  .section h2 {
    font-size: 2.25rem;
  }

  .section h4 {
    font-size: 1.5rem;
  }

  .section h5 {
    font-size: 1.25rem;
  }

  .section p {
    font-size: 1.05rem;
  }

  .section ul li,
  .section ol li {
    font-size: 1.05rem;
  }

  /* Keep 2 columns for grid */
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .spec-grid {
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
    align-items: center;
  }

  /* Three columns for applications on desktop */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .footer {
    margin-top: 3rem;
  }
}

/* =======================
   LARGE DESKTOP (1400px and up)
   ======================= */

@media (min-width: 1400px) {
  .lighttube {
    max-width: 1600px;
    padding: 3rem 3rem;
  }

  .section {
    padding: 3rem;
  }

  /* Three columns for applications on large desktop */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* =======================
   SMOOTH TRANSITIONS
   ======================= */

.lighttube,
.section,
.page-header,
.btn-primary {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =======================
   UTILITY CLASSES
   ======================= */

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Improve readability on very small screens */
@media (max-width: 380px) {
  .page-header h1 {
    font-size: 1.75rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .spec-table {
    font-size: 0.85rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 8px 6px;
  }
}

/* Print styles */
@media print {
  .footer {
    display: none;
  }

  .section {
    page-break-inside: avoid;
  }
}