/* ============================================
   CERVOS MEDICAL - Website Styles
   Brand Colors: #4D0D1F (maroon), #360611 (deep maroon), #414042 (dark gray), #D6D6D6 (light gray)
   Fonts: Philosopher (headings), system sans-serif (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Philosopher:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --maroon: #4D0D1F;
  --maroon-dark: #360611;
  --maroon-light: #6B1A32;
  --maroon-faint: #f9f2f4;
  --gray-dark: #414042;
  --gray-mid: #6B6B6D;
  --gray-light: #D6D6D6;
  --gray-bg: #F5F5F5;
  --white: #FFFFFF;
  --black: #1A1A1A;
  --font-heading: 'Philosopher', Georgia, serif;
  --font-body: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  --max-width: 1280px;
  --nav-height: 80px;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --radius: 8px;
  --radius-lg: 16px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  background: #3d0b18;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Global maroon gradient - lighter, warmer tones */
.page-bg-global {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(170deg, #3d0b18 0%, #5a1226 20%, #7a1c33 45%, #8e2640 62%, #6a162a 82%, #3d0b18 100%);
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--maroon-light); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--white);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 0.6rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-white h1, .text-white h2, .text-white h3, .text-white h4 { color: var(--white); }
.text-maroon { color: var(--maroon); }
.bg-maroon { background-color: var(--maroon); }
.bg-dark { background-color: var(--maroon-dark); }
.bg-gray { background-color: transparent; }
.bg-white { background-color: rgba(255, 255, 255, 0.05); }

.section-padding { padding: 6rem 0; }
.section-padding-sm { padding: 4rem 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--maroon);
  color: var(--white);
  border-color: var(--maroon);
}
.btn-primary:hover {
  background: var(--maroon-light);
  border-color: var(--maroon-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--maroon);
  border-color: var(--maroon);
}
.btn-outline:hover {
  background: var(--maroon);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white {
  background: var(--white);
  color: var(--maroon);
  border-color: var(--white);
}
.btn-white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--maroon);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.6rem 1.5rem; font-size: 0.85rem; }
.btn-lg { padding: 1.1rem 2.8rem; font-size: 1.05rem; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.navbar.scrolled {
  background: rgba(77, 13, 31, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
  padding: 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo img {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.navbar.scrolled .nav-logo img { height: 42px; }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.3rem;
}

.nav-links li { position: relative; }

.nav-links a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
  text-transform: uppercase;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-links a.active {
  background: rgba(255,255,255,0.15);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  color: var(--gray-dark);
  padding: 0.7rem 1.3rem;
  font-size: 0.88rem;
  border-radius: 0;
  text-transform: none;
}
.dropdown-menu a:hover {
  background: var(--maroon-faint);
  color: var(--maroon);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--maroon-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0.2rem;
    transition: right 0.35s ease;
    overflow-y: auto;
  }
  .nav-links.active { right: 0; }
  .nav-links a { width: 100%; padding: 0.8rem 1rem; }
  .nav-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: 0;
    padding-left: 1rem;
  }
  .dropdown-menu a { color: rgba(255,255,255,0.8); }
  .dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
  .nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
  }
}

/* --- Hero Sections --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--maroon-dark);
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(54, 6, 17, 0.85) 0%, rgba(77, 13, 31, 0.6) 50%, rgba(54, 6, 17, 0.75) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 2rem 0;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  margin-bottom: 1.2rem;
  line-height: 1.1;
}

.hero .lead {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Page Hero (shorter) */
.page-hero {
  min-height: 50vh;
  padding-top: calc(var(--nav-height) + 3rem);
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero .lead { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 600px; }

/* --- Section Styling --- */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}
.section-header .overline {
  display: inline-block;
  color: var(--maroon);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-header p {
  color: var(--gray-mid);
  font-size: 1.1rem;
}

/* Decorative cell pattern overlay removed for cleaner visual consistency */
.cell-pattern { position: relative; }

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.card-body {
  padding: 1.8rem;
}
.card-body h3 { margin-bottom: 0.6rem; }
.card-body p { color: var(--gray-mid); font-size: 0.95rem; }

/* Product Cards */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.product-card .card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--maroon), var(--maroon-light));
}
.product-card .card-body { padding: 2rem; }
.product-card .product-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

/* --- Stats / Numbers --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-white .stat-number { color: var(--white); }
.text-white .stat-label { color: rgba(255,255,255,0.7); }

/* --- Testimonials --- */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.testimonial::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--maroon);
  opacity: 0.15;
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  line-height: 1;
}
.testimonial blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gray-dark);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  padding-left: 0;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--maroon-faint);
}
.testimonial-author-info .name {
  font-weight: 700;
  color: var(--maroon-dark);
  font-size: 0.95rem;
}
.testimonial-author-info .title {
  font-size: 0.85rem;
  color: var(--gray-mid);
}

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

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

/* Split content sections */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
@media (max-width: 768px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 2rem; direction: ltr; }
}

/* --- Feature Icons --- */
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--maroon-faint);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--maroon);
  font-size: 1.6rem;
}
.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* --- Gradient Dividers --- */
.divider-gradient {
  height: 4px;
  background: linear-gradient(90deg, var(--maroon), var(--maroon-light), var(--maroon));
  border: none;
}

/* --- Tables --- */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.styled-table thead th {
  background: var(--maroon);
  color: var(--white);
  padding: 1rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.styled-table tbody td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.9rem;
  vertical-align: top;
}
.styled-table tbody tr:nth-child(even) { background: var(--gray-bg); }
.styled-table tbody tr:hover { background: var(--maroon-faint); }

/* --- Forms --- */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-dark);
  transition: var(--transition);
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(77, 13, 31, 0.1);
}
textarea.form-control { min-height: 140px; resize: vertical; }
select.form-control { appearance: none; cursor: pointer; }

/* --- Footer --- */
.footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}
.footer-logo img {
  height: 50px;
  width: auto;
  margin-bottom: 1rem;
}
.footer-info p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.3rem;
}
.footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-social {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--maroon-light);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--white); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--maroon-light); transform: translateY(-3px); }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 50%, var(--maroon-light) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }

/* --- Made in USA badge --- */
.usa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section-padding { padding: 4rem 0; }
  .hero { min-height: 85vh; }
  .hero-content { padding: 0 1rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .container { padding: 0 1.2rem; }
  .split { gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .stats-grid { grid-template-columns: 1fr; }
}
