/* --- Google Fonts - must be first --- */
@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&family=Source+Code+Pro:wght@400;600&display=swap');

/* =============================================================
   Clarion ProSeries Theme
   Standalone theme - no Quark dependency
   LANSRAD - clarionproseries.com
   ============================================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.5rem; }

/* --- Simple Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* --- CSS Variables --- */
:root {
  --ps-red:         #a81010;
  --ps-red-dark:    #7a0b0b;
  --ps-red-light:   #c41515;
  --ps-gold:        #d4920a;
  --ps-gold-light:  #f0b822;
  --ps-gold-dark:   #a87008;
  --ps-white:       #ffffff;
  --ps-offwhite:    #f7f5f2;
  --ps-light-gray:  #eeecea;
  --ps-mid-gray:    #999999;
  --ps-dark-gray:   #333333;
  --ps-black:       #1a1a1a;
  --ps-font-head:   'Bitter', Georgia, serif;
  --ps-font-body:   'Source Sans 3', Helvetica, sans-serif;
  --ps-font-code:   'Source Code Pro', 'Courier New', monospace;
  --ps-radius:      4px;
  --ps-shadow:      0 2px 8px rgba(0,0,0,0.15);
  --ps-shadow-lg:   0 4px 20px rgba(0,0,0,0.20);
}

/* --- Base Typography --- */
body {
  font-family: var(--ps-font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ps-dark-gray);
  background: var(--ps-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ps-font-head);
  font-weight: 700;
  color: var(--ps-black);
  line-height: 1.25;
}

h1 { font-size: 2.4rem; margin-bottom: 0.5em; }
h2 { font-size: 1.9rem; margin-bottom: 0.45em; }
h3 { font-size: 1.5rem; margin-bottom: 0.4em; }
h4 { font-size: 1.15rem; margin-bottom: 0.35em; }

a {
  color: var(--ps-red);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--ps-red-dark);
  text-decoration: underline;
}

code, pre {
  font-family: var(--ps-font-code);
  background: var(--ps-light-gray);
  border-radius: var(--ps-radius);
}

code {
  padding: 2px 6px;
  font-size: 0.88em;
  color: var(--ps-red-dark);
}

pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-left: 4px solid var(--ps-red);
}

/* --- Navigation Bar --- */
#header {
  background: var(--ps-red) !important;
  border-bottom: 3px solid var(--ps-red-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  padding: 0;
}

.ps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.ps-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  text-decoration: none !important;
  flex-shrink: 0;
}

.ps-nav-brand img.site-logo {
  height: 56px;
  width: 56px;
  object-fit: cover;
}

.ps-nav-brand .site-title {
  font-family: var(--ps-font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ps-white);
  line-height: 1.2;
  display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.ps-nav-brand .site-tagline {
  font-family: var(--ps-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffe066;
  letter-spacing: 0.05em;
  display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ps-nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.ps-nav-links a.nav-link {
  color: var(--ps-white) !important;
  font-family: var(--ps-font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 1.2rem 0.9rem;
  display: block;
  transition: background 0.2s, color 0.2s;
  text-decoration: none !important;
}

.ps-nav-links a.nav-link:hover,
.ps-nav-links a.nav-link.active {
  background: var(--ps-red-dark);
  color: var(--ps-gold-light) !important;
}

/* --- Hero Section (Home Page) --- */
.ps-hero {
  background: var(--ps-red);
  background-image:
    radial-gradient(ellipse at 65% 50%, rgba(120, 10, 10, 0.5) 0%, transparent 60%),
    url('../images/sextant-hero.png');
  background-repeat: no-repeat;
  background-position: right -20px center;
  background-size: auto 115%;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}

.ps-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(168,16,16,1) 0%, rgba(168,16,16,0.97) 40%, rgba(168,16,16,0.6) 62%, transparent 80%);
  pointer-events: none;
}

.ps-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--ps-gold-dark), var(--ps-gold-light), var(--ps-gold-dark));
}

.ps-hero-content {
  max-width: 680px;
  padding-left: 1rem;
  position: relative;
  z-index: 1;
}

.ps-hero-content h1 {
  font-family: var(--ps-font-head);
  font-size: 3.6rem;
  color: var(--ps-white);
  margin-bottom: 0.2em;
  white-space: nowrap;
  text-shadow: 2px 3px 10px rgba(0,0,0,0.6);
  line-height: 1.05;
}

.ps-hero-content .ps-hero-tagline {
  font-family: var(--ps-font-body);
  font-size: 1.2rem;
  color: #ffe066;
  margin-bottom: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.ps-hero-content p {
  color: rgba(255,255,255,0.95);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 500px;
  line-height: 1.65;
}

/* Scroll indicator below hero */
.ps-scroll-cue {
  text-align: center;
  padding: 0.6rem 0 0.2rem;
  background: var(--ps-offwhite);
  font-size: 0.78rem;
  color: var(--ps-mid-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ps-light-gray);
}

/* --- Buttons --- */
.btn-ps-primary {
  display: inline-block;
  background: var(--ps-gold);
  color: var(--ps-black) !important;
  font-family: var(--ps-font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--ps-radius);
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.btn-ps-primary:hover {
  background: var(--ps-gold-light);
  transform: translateY(-1px);
  color: var(--ps-black) !important;
}

.btn-ps-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ps-white) !important;
  font-family: var(--ps-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.62rem 1.4rem;
  border-radius: var(--ps-radius);
  border: 2px solid rgba(255,255,255,0.6);
  text-decoration: none !important;
  transition: border-color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

.btn-ps-secondary:hover {
  border-color: var(--ps-gold-light);
  color: var(--ps-gold-light) !important;
  background: rgba(255,255,255,0.05);
}

.btn-ps-red {
  display: inline-block;
  background: var(--ps-red);
  color: var(--ps-white) !important;
  font-family: var(--ps-font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--ps-radius);
  text-decoration: none !important;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-ps-red:hover {
  background: var(--ps-red-dark);
  color: var(--ps-white) !important;
}

/* --- Section Headings --- */
.ps-section {
  padding: 3rem 0;
}

.ps-section-title {
  font-family: var(--ps-font-head);
  font-size: 1.6rem;
  color: var(--ps-red);
  border-bottom: 3px solid var(--ps-gold);
  padding-bottom: 0.4em;
  margin-bottom: 1.5rem;
  display: inline-block;
}

/* --- Featured Product Cards --- */
.ps-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.ps-product-card {
  background: var(--ps-white);
  border: 1px solid var(--ps-light-gray);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.ps-product-card:hover {
  box-shadow: var(--ps-shadow-lg);
  transform: translateY(-2px);
}

.ps-product-card-header {
  background: var(--ps-red);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ps-product-card-header img {
  width: 36px;
  height: auto;
  flex-shrink: 0;
}

.ps-product-card-header h3 {
  color: var(--ps-gold-light);
  font-family: var(--ps-font-head);
  font-size: 1.05rem;
  margin: 0;
}

.ps-product-card-header .ps-product-tagline {
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  font-family: var(--ps-font-body);
  display: block;
  margin-top: 2px;
}

.ps-product-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.ps-product-card-body p {
  font-size: 0.9rem;
  color: var(--ps-dark-gray);
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.ps-product-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--ps-light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ps-offwhite);
}

/* --- Page Content Links --- */
.page-content a,
.page-content a:link,
.page-content a:visited {
  color: var(--ps-red) !important;
  text-decoration: none;
}
.page-content a:hover {
  color: var(--ps-red-dark) !important;
  text-decoration: underline;
}

/* --- Compatibility Badges --- */
.ps-compat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.ps-badge {
  display: inline-block;
  font-family: var(--ps-font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ps-badge-clarion {
  background: var(--ps-red);
  color: var(--ps-white);
}

.ps-badge-abc {
  background: var(--ps-dark-gray);
  color: var(--ps-white);
}

.ps-badge-legacy {
  background: var(--ps-mid-gray);
  color: var(--ps-white);
}

.ps-badge-isnew {
  background: #1a6eb5;
  color: var(--ps-white);
}

.ps-badge-new {
  background: var(--ps-gold);
  color: var(--ps-black);
}

.ps-badge-updated {
  background: var(--ps-gold-dark);
  color: var(--ps-white);
}

/* --- Category Cards --- */
.ps-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ps-category-card {
  background: var(--ps-offwhite);
  border: 1px solid var(--ps-light-gray);
  border-top: 3px solid var(--ps-red);
  border-radius: var(--ps-radius);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none !important;
  transition: border-top-color 0.2s, box-shadow 0.2s;
  display: block;
}

.ps-category-card:hover {
  border-top-color: var(--ps-gold);
  box-shadow: var(--ps-shadow);
}

.ps-category-card .ps-cat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.ps-category-card h4 {
  color: var(--ps-red);
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.ps-category-card span {
  color: var(--ps-mid-gray);
  font-size: 0.8rem;
}

/* --- Product List Page (A-Z) --- */
.ps-product-list-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--ps-light-gray);
}

.ps-product-list-item:last-child {
  border-bottom: none;
}

.ps-product-list-item img {
  width: 40px;
  height: auto;
  flex-shrink: 0;
  margin-top: 2px;
}

.ps-product-list-item h3 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
  color: var(--ps-red);
}

.ps-product-list-item p {
  font-size: 0.875rem;
  margin: 0;
  color: var(--ps-dark-gray);
}

/* --- Single Product Page --- */
.ps-product-page-header {
  background: var(--ps-red);
  padding: 0.9rem 0 1rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--ps-gold-dark);
}

.ps-product-page-header h1 {
  color: var(--ps-white);
  font-family: var(--ps-font-head);
  font-size: 4rem;
  margin-bottom: 0.1em;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.3);
  line-height: 1.1;
}

.ps-product-page-header .ps-product-subtitle {
  color: #ffe066;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.ps-product-sidebar {
  background: var(--ps-offwhite);
  border: 1px solid var(--ps-light-gray);
  border-radius: var(--ps-radius);
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}

.ps-product-sidebar h4 {
  color: var(--ps-red);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--ps-light-gray);
  padding-bottom: 0.4em;
  margin-bottom: 0.75rem;
}

.ps-price-block {
  margin-bottom: 1rem;
}

.ps-price-label {
  font-size: 0.8rem;
  color: var(--ps-dark-gray);
  margin-bottom: 0.2rem;
}

.ps-price-amount {
  font-family: var(--ps-font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ps-red);
  display: block;
  margin-bottom: 0.4rem;
}

/* --- Contact Form --- */
.ps-contact-form .ps-form-field,
.ps-contact-form .form-field {
  margin-bottom: 1.25rem;
}

.ps-contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--ps-dark-gray);
}

.ps-required {
  color: var(--ps-red);
}

.ps-required-note {
  font-size: 0.8rem;
  color: var(--ps-mid-gray);
  margin-left: 1rem;
}

.ps-contact-form input[type="text"],
.ps-contact-form input[type="email"],
.ps-contact-form select,
.ps-contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: var(--ps-radius);
  font-family: var(--ps-font-body);
  font-size: 1rem;
  color: var(--ps-dark-gray);
  background: var(--ps-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.ps-contact-form input[type="text"]:focus,
.ps-contact-form input[type="email"]:focus,
.ps-contact-form select:focus,
.ps-contact-form textarea:focus {
  outline: none;
  border-color: var(--ps-red);
  box-shadow: 0 0 0 3px rgba(168,16,16,0.1);
}

.ps-contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

.ps-contact-form textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.ps-contact-form .ps-form-submit {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ps-contact-form button[type="submit"] {
  background: var(--ps-red);
  color: var(--ps-white);
  font-family: var(--ps-font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2.5rem;
  border: none;
  border-radius: var(--ps-radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.ps-contact-form button[type="submit"]:hover {
  background: var(--ps-red-dark);
  transform: translateY(-1px);
}

.ps-form-error {
  background: #fff0f0;
  border: 1px solid var(--ps-red);
  border-left: 4px solid var(--ps-red);
  color: var(--ps-red-dark);
  padding: 1rem 1.25rem;
  border-radius: var(--ps-radius);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
  background: #f0faf0;
  border: 1px solid #4caf50;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
  padding: 1rem 1.25rem;
  border-radius: var(--ps-radius);
  font-size: 0.95rem;
}

.ps-form-error {
  background: #fff0f0;
  border: 1px solid var(--ps-red);
  border-left: 4px solid var(--ps-red);
  color: var(--ps-red-dark);
  padding: 1rem 1.25rem;
  border-radius: var(--ps-radius);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.ps-form-success {
  background: #1e7e1e;
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  border-radius: var(--ps-radius);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  border-left: 5px solid #0d5c0d;
}

/* --- Support Page --- */
.ps-compat-explainer {
  margin: 1.5rem 0;
  border: 1px solid var(--ps-light-gray);
  border-radius: var(--ps-radius);
  overflow: hidden;
}

.ps-compat-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--ps-light-gray);
}

.ps-compat-row:last-child {
  border-bottom: none;
}

.ps-compat-label {
  background: var(--ps-red);
  color: var(--ps-white);
  font-family: var(--ps-font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
}

.ps-compat-desc {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ps-dark-gray);
  line-height: 1.6;
  background: var(--ps-white);
}

/* --- Blog --- */
.ps-blog-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ps-blog-post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ps-light-gray);
}

.ps-blog-post-item h3 {
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}

.ps-blog-post-item h3 a {
  color: var(--ps-red);
}

.ps-post-meta {
  font-size: 0.8rem;
  color: var(--ps-mid-gray);
  margin-bottom: 0.5rem;
}

/* --- Footer --- */
#footer {
  background: var(--ps-black);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  border-top: 3px solid var(--ps-red);
}

#footer h5 {
  color: var(--ps-gold-light);
  font-family: var(--ps-font-head);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

#footer a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.3rem;
  transition: color 0.2s;
}

#footer a:hover {
  color: var(--ps-gold-light);
  text-decoration: none;
}

.ps-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ps-footer-brand img {
  height: 36px;
  width: auto;
}

.ps-footer-brand span {
  font-family: var(--ps-font-head);
  font-size: 1.1rem;
  color: var(--ps-white);
}

.ps-footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* --- Utility Classes --- */
.ps-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ps-text-red { color: var(--ps-red); }
.ps-text-gold { color: var(--ps-gold); }
.ps-text-muted { color: var(--ps-mid-gray); }
.ps-bg-offwhite { background: var(--ps-offwhite); }
.ps-bg-red { background: var(--ps-red); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .ps-hero {
    background-image: none;
    min-height: auto;
    padding: 2rem 0;
  }
  .ps-hero-content {
    max-width: 100%;
    padding: 0 1rem;
  }
  .ps-hero-content h1 {
    font-size: 1.9rem;
  }
  .ps-featured-grid {
    grid-template-columns: 1fr;
  }
  .ps-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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