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

:root {
  --navy: #1a2744;
  --navy-light: #243352;
  --red: #c8102e;
  --red-dark: #a00d24;
  --gold: #d4a843;
  --gold-light: #f0d68a;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a.btn {
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-light {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.section-dark .section-header h2 {
  color: var(--white);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: var(--gray-300);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

a.btn-primary,
a.btn-primary:visited,
a.btn-primary:link,
a[href^="tel"].btn-primary {
  color: var(--white);
}

a.btn-outline,
a.btn-outline:visited {
  color: var(--white);
}

a.btn-outline:hover {
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

/* ===== Header / Navbar ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-md);
}

/* When the mobile nav is open, drop the backdrop-filter so the
   fixed-positioned dropdown can escape the header's containing block */
.header.nav-open,
.header.nav-open.scrolled {
  background: var(--white);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

.logo img {
  height: 52px;
  width: auto;
}

.logo span {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-700);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
  background: rgba(200, 16, 46, 0.06);
}

.nav-cta {
  margin-left: 0.5rem;
}

.nav-cta .btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(200,16,46,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(212,168,67,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 .highlight {
  color: var(--gold);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  max-width: 520px;
}

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

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.hero-stat p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0;
}

/* ===== Trust Bar ===== */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  font-size: 0.9rem;
  font-weight: 500;
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ===== Reviews ===== */
.reviews-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.reviews-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.reviews-header h2 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.reviews-header p {
  color: var(--gray-300);
  font-size: 0.95rem;
}

.reviews-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.google-g {
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #4285f4;
}

.rating-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
}

.stars {
  color: #fbbf24;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.review-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.review-card .stars {
  margin-bottom: 0.75rem;
}

.review-text {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.review-date {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.review-name {
  font-weight: 600;
  color: var(--gray-700);
}

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

/* ===== Course Cards ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.course-card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-aha {
  background: #fef3c7;
  color: #92400e;
}

.badge-ecsi {
  background: #dbeafe;
  color: #1e40af;
}

.badge-osha {
  background: #d1fae5;
  color: #065f46;
}

.badge-uscg {
  background: #ede9fe;
  color: #5b21b6;
}

.course-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-body h3 {
  font-size: 1.15rem;
  margin: 0.75rem 0 0.5rem;
  color: var(--navy);
}

.course-card-body p {
  color: var(--gray-500);
  font-size: 0.9rem;
  flex: 1;
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.85rem;
  color: var(--gray-500);
}

.course-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.course-card-footer {
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
}

.course-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
}

.about-image h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-image p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
}

.about-text h2 {
  font-size: 2.25rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(200,16,46,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
  font-size: 1rem;
}

.about-feature h4 {
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.about-feature p {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn {
  min-width: 200px;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: var(--red);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: inherit;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--gray-50);
}

.faq-question .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.85rem;
  color: var(--gray-500);
}

.faq-item.open .faq-question .icon {
  background: var(--red);
  color: var(--white);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== OSHA Table ===== */
.osha-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.osha-table thead {
  background: var(--navy);
  color: var(--white);
}

.osha-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.osha-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.95rem;
}

.osha-table tbody tr:last-child td {
  border-bottom: none;
}

.osha-table tbody tr:hover {
  background: var(--gray-50);
}

.osha-table .lang-badges {
  display: flex;
  gap: 0.4rem;
}

.lang-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ===== Page Header ===== */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.page-header h1 {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.15rem;
  opacity: 0.8;
  max-width: 600px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== Contact Info Cards ===== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.contact-card-icon {
  width: 56px;
  height: 56px;
  background: rgba(200,16,46,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--red);
}

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

.contact-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.contact-card a {
  color: var(--red);
  font-weight: 600;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--gray-300);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.blog-card-placeholder span {
  font-size: 4rem;
  color: var(--red);
  font-weight: 800;
}

.blog-card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.blog-card-body h3 {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-body p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.blog-card-link {
  color: var(--red);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  transition: color var(--transition);
}

.blog-card:hover .blog-card-link {
  color: var(--red-dark);
}

/* Loading & Empty states */
.blog-loading,
.blog-empty,
.post-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-500);
}

.blog-empty h3 {
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.blog-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: blog-spin 0.8s linear infinite;
}

@keyframes blog-spin {
  to { transform: rotate(360deg); }
}

/* Single post page */
.post-meta {
  font-size: 1rem !important;
  color: rgba(255,255,255,0.7) !important;
  margin-top: 0.5rem;
}

.post-content {
  max-width: 760px;
  margin: 0 auto;
}

.post-featured {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.post-body h2 { font-size: 1.85rem; }
.post-body h3 { font-size: 1.5rem; }
.post-body h4 { font-size: 1.25rem; }

.post-body a {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
}

.post-body a:hover {
  color: var(--red-dark);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-body ul,
.post-body ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.75rem;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 4px solid var(--red);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray-600);
  background: var(--gray-50);
}

.post-body code {
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-image { height: 180px; }
  .post-body { font-size: 1rem; }
}

/* ===== Contact Form ===== */
.contact-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-form-wrap h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.contact-form-wrap > p {
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

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

.form-group input,
.form-group textarea {
  padding: 0.85rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-300);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-block h3 {
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.contact-info-block p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.contact-info-block a {
  color: var(--red);
  font-weight: 600;
  transition: color var(--transition);
}

.contact-info-block a:hover {
  color: var(--red-dark);
}

.contact-info-note {
  font-size: 0.85rem !important;
  color: var(--gray-500) !important;
  font-style: italic;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 0.45rem 0;
  font-size: 0.95rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--navy);
  width: 50px;
}

/* Form alerts */
.form-alert {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 1rem;
}

.form-alert-success {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.form-alert-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

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

/* ===== Exam Callout (final-exams-for-ecsi page) ===== */
.exam-callout {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 5px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
}

.exam-callout-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.exam-callout h2 {
  color: var(--navy);
  font-size: 1.85rem;
  margin-bottom: 1rem;
}

.exam-callout p {
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.exam-callout-hint {
  font-size: 0.9rem !important;
  color: var(--gray-500) !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0 !important;
}

.exam-callout-hint a {
  color: var(--red);
  font-weight: 600;
}

/* ===== Instructors Page ===== */
.instructor-notice {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 1000px;
  margin: 0 auto;
}

.instructor-notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.instructor-notice a {
  color: var(--red);
  font-weight: 600;
}

.instructor-section {
  max-width: 900px;
  margin: 0 auto;
}

.instructor-section-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.instructor-section-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.instructor-section-header h2 {
  font-size: 1.65rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.instructor-section-header p {
  color: var(--gray-500);
  font-size: 1rem;
}

.instructor-section-body {
  padding-left: calc(2.75rem + 1.5rem);
}

.instructor-section-body p {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.instructor-support {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

.instructor-support h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.instructor-support p {
  color: var(--gray-600);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.instructor-support-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .instructor-section-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  .instructor-section-number {
    font-size: 2.25rem;
  }
  .instructor-section-body {
    padding-left: 0;
  }
}

/* ===== Procurement Callout (used on About page) ===== */
.procurement-callout {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-sm);
}

.procurement-callout-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.procurement-callout-body {
  flex: 1;
}

.procurement-callout-body h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.procurement-callout-body p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .procurement-callout {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== Credentials Page ===== */
.credentials-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.credentials-intro h2 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.credentials-intro p {
  color: var(--gray-600);
  font-size: 1.1rem;
  line-height: 1.7;
}

.identifier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.identifier-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all var(--transition);
}

.identifier-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-color: var(--gold);
}

.identifier-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.identifier-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Inter', monospace;
  letter-spacing: 0.02em;
  word-break: break-all;
}

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

.document-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.document-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--red);
}

.document-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: rgba(200, 16, 46, 0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-body {
  flex: 1;
}

.document-body h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.document-body p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.document-link {
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  transition: color var(--transition);
}

.document-card:hover .document-link {
  color: var(--red-dark);
}

.why-matters {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.why-matters h2 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 2.5rem;
}

.why-matters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.why-matters-item {
  text-align: center;
}

.why-matters-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.why-matters-item h3 {
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.why-matters-item p {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .identifier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .document-card {
    flex-direction: column;
  }
}

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

/* ===== Policy Pages ===== */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}

.policy-content h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}

.policy-content p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.policy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.policy-content ul li {
  color: var(--gray-600);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.policy-updated {
  color: var(--gray-500);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.pricing-option {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.pricing-option strong {
  color: var(--navy);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--gray-500);
  max-width: 300px;
  line-height: 1.7;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.footer-disclaimer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.5rem;
}

.footer-disclaimer p {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a:hover {
  color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 8rem 0 4rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    align-items: stretch;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-toggle {
    display: flex;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

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

  .osha-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  .trust-items {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ============================================================
   POLISH: Page transitions, scroll fade-ins, image skeleton,
   carousel, count-up
   ============================================================ */

/* Page transition fade-in on load */
body {
  opacity: 0;
  animation: page-fade-in 0.4s ease forwards;
}

@keyframes page-fade-in {
  to { opacity: 1; }
}

/* Scroll fade-in animation (applied via JS) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* Respect reduced motion users */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; opacity: 1; }
  .fade-in,
  .fade-in-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Blog image skeleton */
.blog-card-image {
  position: relative;
  background: var(--gray-100);
}

.blog-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--gray-100) 0%,
    var(--gray-200) 50%,
    var(--gray-100) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  z-index: 0;
}

.blog-card-image img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.blog-card-image img.is-loaded {
  opacity: 1;
}

.blog-card-image.no-skeleton::before {
  display: none;
}

@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Reviews carousel */
.reviews-carousel {
  position: relative;
  overflow: hidden;
}

.reviews-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.reviews-track .review-card {
  flex: 0 0 calc(33.333% - 1.33rem);
  margin-right: 2rem;
}

.reviews-track .review-card:last-child {
  margin-right: 0;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  border: none;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  font-family: inherit;
  padding: 0;
  padding-bottom: 4px;
}

.carousel-arrow:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-50%) scale(1.08);
  box-shadow: var(--shadow-lg);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-arrow-prev {
  left: -24px;
}

.carousel-arrow-next {
  right: -24px;
}

@media (max-width: 768px) {
  .carousel-arrow {
    display: none;
  }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--gold);
  width: 28px;
  border-radius: 5px;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
  .reviews-track .review-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 700px) {
  .reviews-track .review-card {
    flex: 0 0 100%;
    margin-right: 0;
  }
}

/* Count-up "ready" state — prevent flash before JS runs */
.count-up {
  display: inline-block;
}

/* 404 page */
.error-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
}

.error-page-content {
  max-width: 600px;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}

.error-page h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.error-page p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
}

.error-page-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .error-code { font-size: 5.5rem; }
  .error-page h1 { font-size: 1.65rem; }
}
