/* --- Variables & Configuration --- */
:root {
  --primary-blue: rgb(11, 18, 80);
  --text-blue: rgb(40, 44, 88);
  --bg-color: rgb(251, 245, 238);
  --panel-bg: rgb(255, 253, 250);
  --accent-bg: rgb(240, 235, 230);
  --white: rgb(251, 247, 242);
  --font-main: "Libre Baskerville", Georgia, "Times New Roman", Times, serif;
}

/* --- Global Reset & Body --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-main);
  background: var(--bg-color);
  color: rgb(7, 11, 48);
  line-height: 1.6;
}

/* --- Typography & Utilities --- */
h1, h2, h3 { font-weight: 700; }
a { text-decoration: none; }
.text-small { font-size: small; }
.text-justify { text-align: justify; }

/* --- Header & Footer --- */
header {
  text-align: center;
  padding: 20px;
  color: var(--primary-blue);
  font-size: x-large; /* Keeps the H1 and subtitle correctly scaled */
}

header h1 {
  line-height: 0.7;
  margin-bottom: 10px;
}

footer {
  text-align: center;
  padding: 20px;
  color: var(--primary-blue);
  font-size: small; /* Fix: Footer should stay small */
}

hr {
  border: none;
  border-top: 1px solid var(--primary-blue);
  margin: 20px 0;
}

/* --- Layout Components --- */
main {
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* --- Hero & Section Headers --- */
.hero {
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1em;
  color: var(--text-blue);
  max-width: 700px;
  margin: 0 auto;
}

.products h2, .about h2, .contact h2, .product-showcase h2 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 30px;
}

/* --- Product Cards & Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-panel {
  background-color: var(--panel-bg);
  border: 2px solid var(--primary-blue);
  padding: 30px;
  display: flex;
  flex-direction: column;
}

/* Specific centering for the single WorkSmart panel */
.featured-panel {
  max-width: 800px;
  margin: 0 auto;
}

.product-panel h3 {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--primary-blue);
}

.product-panel p, .product-panel ul {
  margin-bottom: 15px;
  color: var(--text-blue);
}

.product-panel ul {
  list-style-position: inside;
  flex-grow: 1;
}

/* --- About & Contact Spacing --- */
.about {
  margin-bottom: 100px; /* Space out the bottom of About section */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about p { margin-bottom: 20px; }

.contact {
  background-color: var(--panel-bg);
  border: 2px solid var(--primary-blue);
  padding: 40px;
  max-width: 600px;
  margin: 40px auto 0; /* Space above Contact panel */
  text-align: center;
}

.contact-info a {
  color: var(--primary-blue);
  border-bottom: 1px solid var(--primary-blue);
}

/* --- Buttons --- */
.cta-button {
  display: inline-block;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 12px 24px;
  font-size: 0.95em;
  transition: transform 0.3s ease, background-color 0.3s ease;
  margin-top: 10px;
}

.cta-button:hover {
  background-color: var(--text-blue);
  transform: translateY(-2px);
}

/* --- Management Page: Showcase --- */
.back-nav { margin-bottom: 20px; font-size: 0.9em; }
.back-link { color: var(--primary-blue); }

.showcase-container {
  display: flex;
  align-items: flex-start; /* Fix: Aligns text and image top-to-top */
  gap: 40px;
  background-color: var(--panel-bg);
  border: 2px solid var(--primary-blue);
  padding: 40px;
  margin-bottom: 60px;
}

.carousel-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--primary-blue);
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--accent-bg);
  display: none;
  align-items: center;
  justify-content: center;
}

.image-placeholder img {
    width: 100%;
    height: auto;
    display: block;
}

.image-placeholder.active { display: flex; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
}

.prev { left: 10px; }
.next { right: 10px; }

.product-details-content { flex: 1; }

/* Override to left-align header inside flex pane */
.product-details-content h2 { text-align: left; }

.feature-list {
  list-style: none;
  margin: 20px 0;
}

.feature-list li {
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
}

.feature-list li::before {
  content: "•";
  color: var(--primary-blue);
  position: absolute;
  left: 0;
}

/* --- Responsive --- */
@media (max-width: 850px) {
  .showcase-container { flex-direction: column; }
  .product-details-content h2 { text-align: center; }
  .product-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2em; }
}
