/* 
 * Somatics, LLC - Modern CSS Styles
 * Modernized version of the original website styling
 */

:root {
  --primary-color: #001C94;    /* Primary blue color */
  --hover-color: #0B3CFF;      /* Hover blue color */
  --text-color: #000000;       /* Main text color */
  --bg-color: #9F9FAB;         /* Background color */
  --white: #FFFFFF;
  --max-width: 1000px;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Verdana', 'Arial', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s ease;
}

p a {
  text-decoration-color: rgb(0 28 148 / 38%);
  text-decoration-line: underline;
}

a:hover {
  color: var(--hover-color);
  text-decoration: underline;
}

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

/* Layout */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header styles */
header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 0;
}

.logo-nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  margin-bottom: 1rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.main-nav a {
  color: var(--white);
  font-weight: bold;
  font-size: 1.0rem;
  padding: 0.5rem;
}

.main-nav a:hover {
  text-decoration: underline;
  color: var(--white);
}

.company-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.company-name {
  margin-bottom: 0.5rem;
}

/* Main content styles */
main {
  padding: 2rem 0 0;
}

.content {
  padding: 0 1.5rem;
}

h1 {
  color: #3d3d3d;
  font-family: 'Arial', sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

h2 {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h3 {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-description {
  margin: 2rem 0;
}

.product-description p {
  margin-bottom: 15px;
  display: block;
}

.product-image {
  text-align: center;
  margin: 1.5rem 0;
}

.disclaimer {
  margin: 2rem 0;
}

.disclaimer p {
  font-style: italic;
  font-size: 90%;
}

/* Contact info styling */
.contact-info {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid #eaeaea;
}

.contact-info p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.contact-method strong {
  min-width: 60px;
  color: var(--primary-color);
  font-weight: 600;
}

.contact-method a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-method a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.contact-title {
  margin: 0 0 0.8rem 0;
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
}

@media screen and (min-width: 768px) {
  .contact-info p {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .contact-method {
    flex: 0 0 auto;
  }
}

@media screen and (max-width: 480px) {
  .contact-method {
    font-size: 0.95rem;
  }
}

/* Footer styles */
footer {
  padding: 1.5rem 0;
  border-top: 1px solid #ddd;
  margin-top: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.separator {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-color);
}

/* Utility classes */
.reg {
  font-size: 60%;
  vertical-align: text-top;
}

/* Catalog specific styles */
.catalog-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.catalog-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: bold;
}

.catalog-section {
  margin-bottom: 3rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.catalog-links {
  list-style: none;
  margin: 1.5rem 0;
}

.catalog-links li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.catalog-links li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.catalog-links a {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: 0.95rem;
  color: var(--primary-color);
}

.catalog-description {
  margin: 1rem 0;
  font-size: 0.95rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-item a {
  display: block;
  padding: 1rem;
  height: 100%;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.product-item a:hover {
  background-color: #f5f5f5;
  text-decoration: none;
}

.product-item img {
  margin-bottom: 1rem;
  max-height: 120px;
}

.product-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.product-item p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.product-promotion {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--primary-color);
}

.price-info {
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.5rem;
}

.back-to-top {
  text-align: right;
  margin: 1.5rem 0;
}

.back-to-top a {
  font-size: 0.85rem;
  color: var(--primary-color);
}

/* Distributors styles */
.region-section {
  margin-bottom: 2rem;
}

.region-section h2 {
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.region-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.region-countries a {
  color: var(--link-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background-color: var(--light-bg-color);
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.region-countries a:hover {
  background-color: var(--primary-color);
  color: white;
}

.back-to-top {
  text-align: right;
  margin: 1rem 0;
}

.back-to-top a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-to-top a:hover {
  text-decoration: underline;
}

/* Distributor Details Page */
.dealer-details {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease-out;
}

.dealer-details.loaded {
  opacity: 1;
  pointer-events: auto;
}

.distributor-details h1 {
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.distributor-card {
  background-color: var(--light-bg-color);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.distributor-name h2 {
  color: var(--primary-color);
  margin-top: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.distributor-info {
  margin-bottom: 1.5rem;
}

.distributor-info p {
  margin: 0.5rem 0;
}

.distributor-contact h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.distributor-contact p {
  margin: 0.3rem 0;
}

.distributor-notes {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.back-links {
  margin-top: 2rem;
}

.back-links a {
  display: inline-block;
  color: var(--link-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background-color: var(--light-bg-color);
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.back-links a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Downloads styles */
.download-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.download-item h2 {
  margin-bottom: 0.5rem;
}

.download-item .download-icon {
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.download-description {
  margin: 1rem 0;
}

.download-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: bold;
}

/* References styles */
.reference-item {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Legacy class support - keeping some of the original classes for backward compatibility */
.theNav a {
  color: var(--white);
}

.theNav a:link,
.theNav a:visited {
  color: var(--white);
}

.theNav a:hover {
  color: var(--white);
  text-decoration: underline;
}

.theNav a:active {
  color: #cccccc;
  font-weight: bold;
}

/* Text styling classes */
.BlueTextTitle {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 24px;
  font-weight: bold;
}

.BlueTextCatalog {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
}

.BlueTextFooter {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  font-weight: bold;
}

.BlueTextSubFooter {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
}

.BlueNewsTagline {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  font-weight: bold;
}

.BlueTextCatalogSmall {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 11px;
}

.BlueLinksTitle {
  color: var(--white);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
}

.BlueFAQSubTitle {
  color: var(--primary-color);
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  font-weight: bold;
}

.WhiteTextMain {
  color: var(--white);
  font-family: 'Verdana', 'Arial', sans-serif;
  font-size: 15px;
  line-height: 1.25;
}

.WhiteTextMainHome {
  color: var(--text-color);
  font-family: 'Verdana', 'Arial', sans-serif;
  font-size: 15px;
  line-height: 1.25;
}

.WhiteTextCatalog {
  color: var(--white);
  font-family: 'Verdana', 'Arial', sans-serif;
  font-size: 14px;
}

.WhiteTextSmall {
  color: var(--white);
  font-family: 'Verdana', 'Arial', sans-serif;
  font-size: 11px;
}

.WhiteTextReferences {
  color: var(--white);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
}

.BlackNewsTitle {
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  font-weight: bold;
}

.BlackNewsText {
  color: var(--text-color);
  font-family: 'Times New Roman', 'Verdana', 'Arial', sans-serif;
  font-size: 14px;
  line-height: 1.1;
}

.BlackNewsReferences {
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
}

.BlackCatalogSubTitle {
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  font-weight: bold;
}

.BlackCataogText {
  color: var(--text-color);
  /* font-family: 'Times New Roman', 'Verdana', 'Arial', sans-serif; */
  /* font-size: 14px; */
  line-height: 1.25;
}

.BlackCataogTextSmall {
  color: var(--text-color);
  font-family: 'Times New Roman', 'Verdana', 'Arial', sans-serif;
  font-size: 12px;
}

.BlueTextSubTitle {
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  font-size: 18px;
  font-weight: bold;
}

/* Responsive styles */
@media screen and (min-width: 768px) {
  .logo-nav-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
  }

  .logo {
    margin-bottom: 0;
  }

  .main-nav ul {
    flex-flow: row wrap;
    justify-content: center;
  }

  .company-header {
    flex-direction: row;
    justify-content: space-between;
    padding: 0rem 2rem;
  }

  .product-image {
    flex: 0 0 40%;
  }

  .product-text {
    flex: 0 0 60%;
  }

  h1 {
    font-size: 1.75rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .region-countries {
    column-count: 2;
  }
}

@media screen and (min-width: 992px) {
  .page-container {
    padding: 2rem;
  }

  h1 {
    font-size: 2rem;
  }

  .content p {
    font-size: 1rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .region-countries {
    column-count: 3;
  }
}

/* Distributors Page Styles */
@media (max-width: 768px) {
  .region-countries {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .region-countries {
    grid-template-columns: 1fr;
  }
}

/* Downloads Page Styles */
.downloads-section {
    margin-bottom: 2.5rem;
}

.downloads-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.download-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.download-item {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.download-item p {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.download-links {
    display: flex;
    align-items: center;
}

.download-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    color: white;
}

.file-size {
    margin-left: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted-text);
}

/* Responsive adjustments for downloads page */
@media (max-width: 768px) {
    .download-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .download-items {
        grid-template-columns: 1fr;
    }
    
    .download-item {
        padding: 1.25rem;
    }
}

/* References Page Styles */
.references-content h1 {
    margin-bottom: 2rem;
}

.references-section {
    margin-bottom: 2.5rem;
}

.references-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.reference-list {
    display: flex;
    flex-direction: column;
    /* gap: 1rem; */
}

.reference-item {
    background-color: var(--light-bg);
    border-radius: 6px;
    padding: 0.75rem;
    transition: background-color 0.2s;
}

.reference-item:hover {
    background-color: #f0f4f8;
}

.reference-citation {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

p.reference-citation {
  margin-bottom: 0;
}

/* Responsive adjustments for references page */
@media (max-width: 768px) {
    .reference-item {
        padding: 1rem;
    }
    
    .reference-citation {
        font-size: 0.9rem;
    }
}

/* Homepage Styles */
.hero {
    background-color: var(--light-bg);
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    border-radius: 8px;
}

.hero-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.hero-text {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
}

.product-highlight {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.product-image {
    flex: 1;
    min-width: 300px;
}

.product-image img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

.product-description {
    flex: 2;
    min-width: 300px;
}

.product-description h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    color: white;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-box {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.contact-section {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.contact-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contact-method {
    /* margin-bottom: 1rem; */
}

.contact-method strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-method a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-method a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive adjustments for homepage */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .product-description h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .product-highlight {
        flex-direction: column;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* General list styling */
ul:not(.main-nav ul) {
  list-style-type: none;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

ul:not(.main-nav ul) li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.5rem;
  line-height: 1.5;
}

ul:not(.main-nav ul) li::before {
  content: "";
  position: absolute;
  left: 0;
  /* top: 0.7rem; */
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

/* Catalog Accessory Pages Styles */
.catalog-content table {
  margin: 0 auto;
}

.catalog-product {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.content-section {
  margin-bottom: 30px;
}

.product-image {
  margin: 20px 0;
  text-align: center;
}

/* Ensure paragraphs in product descriptions are always stacked vertically */
.product-description {
  margin: 2rem 0;
}

.product-description p {
  margin-bottom: 15px;
  display: block;
}

.related-products {
  text-align: center;
  margin: 20px 0;
  color: var(--primary-color);
}

/* New Accessories & Supplies section */

.accessories-holder {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px 15px;

  a { color: inherit; transition: none; }
  a:hover { color: inherit; text-decoration: none; }
}

.accessories-item {
  max-width: 280px;
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  justify-content: flex-start;
  row-gap: 10px;
  padding: 10px;
  background-color: #ebedf4;
  border-radius: 8px;
  break-inside: avoid;

  .img-holder {
    order: 1;
    text-align: center;

    img {
      border-radius: 4px;
      max-width: 260px;
      max-height: 260px;
    }
  }
  .item-name {
    order: 0;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    min-height: 3.2em;
  }
  .catcode {
    font-family: monospace;
  }
  .description {
    order: 2;
    font-size: 90%;
  }
}

@media print {
  .noprint { display: none; }

  #header-placeholder, header, footer, .contact-info, .back-to-top {
    display: none;
  }
  main, .content, .page-container { padding: 0; box-shadow: none; }
}
