/* HSE Advisor Canada - Modern Design System */

/* Import loading states */
@import url('loading-states.css');

/* ===== CSS VARIABLES ===== */
:root {
  /* Brand Color Palette */
  --navy: #0A2240; /* Primary - Navy */
  --red: #D52B1E;  /* Accent - Red */
  --white: #FFFFFF; /* Background - White */
  --grey: #6D6E71; /* Mid-Grey for text and accents */
  
  /* Derived Color Variables */
  --navy-light: rgba(10, 34, 64, 0.9); /* Transparent Navy */
  --red-light: rgba(213, 43, 30, 0.9); /* Transparent Red */
  --grey-light: #f5f5f7; /* Light grey for backgrounds */
  --navy-dark: #071830; /* Darker navy for hover states */
  --red-dark: #B52218; /* Darker red for hover states */
  
  /* Typography */
  --font-primary: 'Inter', Arial, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  --space-xxxl: 4rem;
  
  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--space-md);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  
  /* Color variables for consistency */
  --color-primary: #0A2240;
  --color-primary-dark: #071830;
  --color-accent: #D52B1E;
  --color-text: #333333;
  --icon-size: 1.5rem;
  
  /* Z-index hierarchy */
  --z-index-base: 1;
  --z-index-dropdown: 100;
  --z-index-overlay: 998;
  --z-index-navigation: 999;
  --z-index-header: 1000;
  --z-index-modal: 10000;
  --z-index-critical: 100000;
}

/* ===== RESET & BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  color: var(--navy);
  line-height: 1.6;
  background-color: var(--white);
  overflow-x: hidden;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover, a:focus {
  color: var(--red);
}

a:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

button, 
input, 
select, 
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 2.75rem;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 2.25rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-lg);
}

.text-center {
  text-align: center;
}

.section-title {
  position: relative;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--red);
}

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

main {
  position: relative;
  z-index: 10;
  background-color: var(--white);
  min-height: 50vh;
  display: block;
}

.section {
  padding: var(--space-xxl) 0;
  position: relative;
  z-index: 10;
  display: block;
  width: 100%;
}

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

.section-grey {
  background-color: var(--grey-light);
}

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

.section-navy h1,
.section-navy h2,
.section-navy h3,
.section-navy h4,
.section-navy h5,
.section-navy h6 {
  color: var(--white);
}

/* Ensure section titles in navy sections are clearly visible */
.section-navy .section-title {
  color: var(--white) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fix for navy section text visibility - exclude cards and testimonials */
.section-navy > p,
.section-navy > div > p {
  color: var(--white) !important;
  opacity: 0.95;
}

/* Ensure cards in navy sections maintain their own text colors */
.section-navy .card p,
.section-navy .card h1,
.section-navy .card h2,
.section-navy .card h3,
.section-navy .card h4,
.section-navy .card h5,
.section-navy .card h6 {
  color: var(--navy);
}

/* Fix testimonials to have proper text colors */
.section-navy .testimonial .testimonial-quote {
  color: var(--navy) !important;
  opacity: 1 !important;
}

.section-navy .testimonial .testimonial-author {
  color: var(--navy) !important;
  opacity: 1 !important;
}

.section-navy .testimonial .testimonial-position {
  color: var(--text-secondary) !important;
  opacity: 1 !important;
}

.section-navy .card .card-text {
  color: var(--grey);
}

.section-navy .section-title::after {
  background-color: var(--red);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1rem;
  align-items: flex-start;
}

.col {
  flex: 1;
  padding: 0 1rem;
}

.col-1-2 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 1rem;
}

.col-1-3 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 0 1rem;
  margin-bottom: var(--space-lg);
}

.col-2-3 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
  padding: 0 1rem;
}

.col-1-4 {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 0 1rem;
}

/* Ensure service images maintain aspect ratio */
.service-image-container {
    display: flex; /* Use flexbox to align image */
    align-items: center; /* Vertically center if container is taller */
    justify-content: center; /* Horizontally center if needed */
    height: 100%; /* Allow container to potentially take full column height */
}

.service-image-container img {
    width: 100% !important; /* Explicit full width */
    height: auto !important; /* Force aspect ratio based on width */
    /* object-fit: contain; Ensure entire image is visible within bounds */
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  text-align: center;
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--red-dark);
  color: var(--white);
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

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

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

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

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

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

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

.btn-link {
  color: var(--navy);
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  text-decoration: none;
  position: relative;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--red);
  transition: width var(--transition-normal);
}

.btn-link:hover::after, .btn-link:focus::after {
  width: 100%;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-index-overlay);
  background-color: var(--navy);
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  flex-direction: row;
  flex-wrap: nowrap;
}

.logo {
  max-width: 360px;
  flex: 0 0 auto;
}

.logo img {
  max-height: 100px;
  width: auto;
  object-fit: contain;
}

.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.main-nav ul {
  display: flex;
  gap: 0.75rem;
  white-space: nowrap;
}

.main-nav a {
  color: var(--white);
  font-weight: 500;
  position: relative;
  padding: var(--space-sm) 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--red);
  transition: width var(--transition-normal);
}

.main-nav a:hover::after, 
.main-nav a:focus::after,
.main-nav a.active::after {
  width: 100%;
}

.secondary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
  margin-left: var(--space-xl);
  margin-right: 0;
  padding-right: var(--space-md);
}

.secondary-nav a {
  color: var(--white);
  position: relative; /* For cart count positioning */
}

/* Cart count badge */
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none; /* Ensure it doesn't block clicks */
  line-height: 1;
}

/* Fix logout button visibility in header */
.secondary-nav .header-logout-btn {
  background-color: transparent !important;
  color: var(--white) !important;
  border-color: var(--white) !important;
}

.secondary-nav .header-logout-btn:hover,
.secondary-nav .header-logout-btn:focus {
  background-color: var(--white) !important;
  color: var(--navy) !important;
  border-color: var(--white) !important;
}

.mobile-menu-toggle {
  display: none;
  color: var(--white);
  font-size: 1.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  height: 70vh;
  min-height: 600px;
  background-color: var(--navy);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 50%;
  margin-left: auto;
}

.hero h1 {
  color: var(--white);
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
}

.hero p {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
}

.hero-logo {
  position: relative;
  left: 0;
  max-width: 37.5%;
  padding: var(--space-md);
  min-width: 300px;
}

.hero-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  filter: saturate(0.6);
  animation: heroZoom 20s infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* ===== CARD COMPONENTS ===== */
.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  filter: saturate(0.8);
  position: relative;
}

.resource-icon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 34, 64, 0.7);
  opacity: 0.9;
  transition: opacity var(--transition-normal);
}

.card:hover .resource-icon-overlay {
  opacity: 0.7;
}

.resource-detail-image {
  position: relative;
}

.resource-main-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(10, 34, 64, 0.7);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.resource-detail-image:hover .resource-main-icon {
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1.05);
}

.card-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.card-text {
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.card-price {
  color: var(--red);
  font-weight: 700;
  font-size: 1.125rem;
}

.card-category {
  color: var(--grey);
  font-size: 0.875rem;
}

.card-actions {
  margin-top: auto;
}

/* Industry Card Variations */
.industry-card {
  text-align: center;
  padding: var(--space-lg);
}

.industry-icon {
  font-size: 3rem;
  color: var(--navy);
  margin-bottom: var(--space-md);
}

/* ===== TESTIMONIALS ===== */
.testimonial {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  position: relative;
  transition: transform var(--transition-normal);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: var(--space-lg);
  position: relative;
  padding: 0 var(--space-md);
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.6;
}

.testimonial-quote::before,
.testimonial-quote::after {
  content: '"';
  font-size: 3rem;
  color: var(--red);
  position: absolute;
  opacity: 0.3;
}

.testimonial-quote::before {
  top: -20px;
  left: -10px;
}

.testimonial-quote::after {
  bottom: -40px;
  right: -10px;
}

.testimonial-author {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.testimonial-position {
  color: var(--grey);
  font-size: 0.875rem;
  margin: 0;
}

/* Alternative testimonial format with blockquote */
.testimonial-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--navy);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.author-name {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.author-company {
  color: var(--grey);
  font-size: 0.875rem;
  margin: 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background-color: var(--navy);
  color: var(--white);
  padding: var(--space-xxl) 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: var(--space-md);
}

.newsletter-input {
  flex-grow: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  font-size: 1rem;
  background-color: var(--white);
  color: var(--navy);
}

.newsletter-input::placeholder {
  color: #999;
}

.newsletter-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(213, 43, 30, 0.1);
  outline: none;
}

.newsletter-button {
  background-color: var(--red);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(213, 43, 30, 0.2);
}

.newsletter-button:hover {
  background-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(213, 43, 30, 0.3);
}

.privacy-note {
  font-size: 0.875rem;
  color: var(--grey);
  margin-top: var(--space-md);
}

/* Newsletter section specific improvements */
.newsletter-section {
  padding: var(--space-xxxl) 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(213, 43, 30, 0.05) 0%, transparent 70%);
  transform: rotate(45deg);
  pointer-events: none;
}

/* Add pattern overlay for visual interest */
.newsletter-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(213, 43, 30, 0.02) 35px, rgba(213, 43, 30, 0.02) 70px);
  pointer-events: none;
}

.newsletter-wrapper {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

/* Newsletter section text styles */
.newsletter-section h2 {
  color: var(--navy);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.newsletter-section p {
  color: var(--grey);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  text-align: center;
}

.newsletter-section .privacy-note {
  color: var(--grey);
  font-size: 0.875rem;
  opacity: 0.8;
}

.newsletter-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.newsletter-card:hover {
  transform: translateY(-5px);
}

.newsletter-icon {
  font-size: 3rem;
  color: #E74C3C;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.newsletter-title {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.newsletter-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  font-weight: 400;
}

.newsletter-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.benefit-item i {
  color: #46d362;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.newsletter-form .form-group {
  position: relative;
}

.newsletter-form .form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  color: var(--navy);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-form .form-control::placeholder {
  color: #999;
}

.newsletter-form .form-control:focus {
  background: var(--white);
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(213, 43, 30, 0.1);
}

.newsletter-form select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236D6E71' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  padding-right: 3rem;
  appearance: none;
}

.newsletter-form select.form-control option {
  background: var(--white);
  color: var(--navy);
}

.form-consent {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.form-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.form-consent label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.btn-newsletter {
  background: linear-gradient(135deg, #E74C3C 0%, #c0392b 100%);
  color: #ffffff;
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.btn-newsletter:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(231, 76, 60, 0.4);
  background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.btn-newsletter i {
  transition: transform 0.3s ease;
}

.btn-newsletter:hover i {
  transform: translateX(5px);
}

.newsletter-privacy {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.newsletter-privacy i {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.form-feedback {
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 0.875rem;
  color: #ff6b6b;
  display: none;
}

.form-feedback.show {
  display: block;
}

/* ===== NOTIFICATIONS ===== */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  position: relative;
}

.notification-info .notification-content {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.notification-success .notification-content {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.notification-warning .notification-content {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.notification-error .notification-content {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.notification-message {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notification {
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  /* Newsletter responsive styles */
  .newsletter-card {
    padding: 2rem 1.5rem;
  }
  
  .newsletter-title {
    font-size: 2rem;
  }
  
  .newsletter-subtitle {
    font-size: 1.1rem;
  }
  
  .newsletter-benefits {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .btn-newsletter {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .newsletter-icon {
    font-size: 2.5rem;
  }
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--navy);
  color: var(--white);
  padding: var(--space-xxl) 0 var(--space-lg);
}

.footer-col {
  margin-bottom: var(--space-xl);
}

.footer h4 {
  color: var(--white);
  margin-bottom: var(--space-lg);
  font-size: 1.25rem;
}

.footer p {
  color: var(--grey-light);
  margin-bottom: var(--space-md);
}

.footer a {
  color: var(--grey-light);
  transition: color var(--transition-normal);
}

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

.footer-links li {
  margin-bottom: var(--space-sm);
}

.social-icons {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all var(--transition-normal);
  color: #ffffff;
  text-decoration: none;
}

.social-icon i {
  font-size: 1.2rem;
}

.social-icon:hover {
  background-color: var(--red);
  color: #ffffff;
}

.social-icon.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.05);
}

.social-icon.disabled:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: var(--grey-light);
}

/* Footer logo styling */
.footer-logo {
  margin-bottom: var(--space-lg);
}

.footer-logo img {
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== UTILITY CLASSES ===== */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-xxl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-xxl); }

.mr-2 { margin-right: var(--space-md); }

.mx-auto { margin-left: auto; margin-right: auto; }

.py-1 { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-2 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-3 { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-4 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-5 { padding-top: var(--space-xxl); padding-bottom: var(--space-xxl); }

.px-1 { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-2 { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-3 { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-4 { padding-left: var(--space-xl); padding-right: var(--space-xl); }
.px-5 { padding-left: var(--space-xxl); padding-right: var(--space-xxl); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.bg-navy { background-color: var(--navy); }
.bg-red { background-color: var(--red); }
.bg-white { background-color: var(--white); }
.bg-grey { background-color: var(--grey); }
.bg-grey-light { background-color: var(--grey-light); }

.text-navy { color: var(--navy); }
.text-red { color: var(--red); }
.text-white { color: var(--white); }
.text-grey { color: var(--grey); }

.shadow { box-shadow: var(--shadow-md); }
.rounded { border-radius: var(--radius-md); }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  /* Fallback animation to ensure content becomes visible even if JS fails */
  animation: fadeInFallback 1.5s ease-out 0.5s forwards;
}

.fade-in.visible,
.fade-in.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
  animation: none; /* Cancel fallback animation when JS adds visible class */
}

/* Fallback for browsers without JavaScript - ensure content is visible */
.no-js .fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* Fallback animation to ensure content appears */
@keyframes fadeInFallback {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1199px) {
  html {
    font-size: 15px;
  }
  
  .container {
    max-width: 960px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 1199px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 var(--space-lg);
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--navy);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .col-1-2, .col-1-3, .col-2-3, .col-1-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .hero {
    min-height: 500px;
    height: 60vh;
  }
  
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .hero-content {
    max-width: 55%;
  }
  
  .hero-logo {
    max-width: 40%;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .col-1-2, .col-1-3, .col-2-3, .col-1-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .mobile-menu-toggle {
    display: block;
    order: 3;
  }

  .header-container {
    flex-wrap: wrap;
  }
  
  .logo {
    order: 1;
    flex: 1;
  }
  
  .secondary-nav {
    order: 2;
  }
  
  .secondary-nav .btn {
    display: none;
  }
  
  .main-nav {
    order: 4;
    width: 100%;
    top: 100%;
    left: 0;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .hero {
    min-height: 400px;
    height: auto;
    padding: 60px 0;
    margin-top: 60px;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero .container {
    flex-direction: column;
  }
  
  .hero-content {
    max-width: 100%;
    text-align: center;
    margin-left: 0;
    order: 2;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .hero-logo {
    position: relative;
    max-width: 70%;
    margin: 0 auto var(--space-xl);
    padding: 0;
    order: 1;
    min-width: auto;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .testimonial {
    padding: var(--space-lg);
  }
}

/* ===== ACCESSIBILITY STYLES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* High contrast mode adjustments */
@media (forced-colors: active) {
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    border: 2px solid ButtonText;
  }
}

/* Ensure content starts below the fixed header */
body > .hero,
body > .section:first-of-type {
  margin-top: 70px; /* Adjust as needed based on final header height */
} 

/* ===== MIGRATED STYLES FROM STYLE.CSS ===== */
/* Unique Styles to Migrate from style.css to styles.css */

/* 1. Additional Color Variables */
:root {
  /* Add these to the existing color palette in styles.css */
  --accent-royal-blue: #1D3557; /* Secondary blue color */
  --accent-light-blue: #457B9D; /* Light blue accent */
}

/* 2. Service Image Container Styles */
.service-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  margin: 1rem 0;
}

.service-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.service-image-container:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Image Loading Animation */
.service-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Remove loading animation once image is loaded */
.service-image-container.loaded::before {
  display: none;
}

/* 3. Advanced Blog Card Styles */
.blog-card.interactive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Overlay Link for full card click */
.card-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* 4. Regulatory Highlights Styling */
.regulatory-highlights {
  border-left: 3px solid var(--red);
  padding-left: 20px;
  margin: 30px 0;
}

.highlight-item {
  margin-bottom: 15px;
  font-size: 1.05em;
}

.highlight-item p {
  margin-bottom: 0;
}

/* 5. Stripe Integration Styles */
.StripeElement {
  box-sizing: border-box;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
  transition: box-shadow 150ms ease;
}

.StripeElement--focus {
  box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
  border-color: #fa755a;
}

.StripeElement--webkit-autofill {
  background-color: #fefde5 !important;
}

.payment-error {
  color: #fa755a;
  margin-top: 8px;
  font-size: 14px;
}

/* 6. Sidebar Widget Styles */
.sidebar-widget {
  margin-bottom: 30px;
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-widget h4 {
  margin-bottom: 15px;
  font-size: 1.2em;
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
}

.sidebar-widget ul {
  padding-left: 0;
}

.sidebar-widget ul li {
  margin-bottom: 8px;
}

.sidebar-widget ul li a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sidebar-widget ul li a:hover {
  color: var(--red);
  padding-left: 3px;
}

/* 7. Blog Detail Styles */
.blog-detail .breadcrumb {
  background-color: transparent;
  padding: 0;
}

.blog-detail-header h1 {
  margin-bottom: 15px;
}

.post-meta {
  color: var(--grey);
  margin-bottom: 20px;
}

.post-meta span {
  margin-right: 15px;
}

.post-meta i {
  margin-right: 5px;
}

.featured-image {
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 40px;
  margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.blockquote {
  border-left: 4px solid var(--red);
  padding: 15px 20px;
  margin: 30px 0;
  background-color: var(--grey-light);
}

.blockquote-footer {
  font-style: italic;
  margin-top: 10px;
}

.figure {
  margin: 30px 0;
}

.figure-caption {
  font-size: 0.9em;
  color: var(--grey);
  margin-top: 10px;
}

/* 8. Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.pagination-list {
  display: flex;
  list-style: none;
  gap: 8px;
}

.pagination-list li {
  display: inline-block;
}

.pagination-link,
.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--grey-light);
}

.pagination-link:hover,
.pagination-link:focus {
  background-color: var(--grey-light);
  color: var(--navy-dark);
  box-shadow: var(--shadow-sm);
}

.pagination-link.is-current {
  background-color: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.pagination-ellipsis {
  pointer-events: none;
}

/* Search Forms - Shared styles for course, blog, and resource search */
.course-search-form,
.blog-search-form,
.search-form {
    display: flex;
    gap: 0.5rem; /* Space between input and button */
    max-width: 600px; /* Limit width */
    margin: 0 auto; /* Center the form */
}

.course-search-form .form-control,
.blog-search-form .form-control,
.search-form .form-control {
    flex-grow: 1; /* Input takes available space */
    /* Inherits base styles from .form-control if defined elsewhere */
    padding: 0.5rem 1rem;
    border: 1px solid #ccc; /* Add a default border */
    border-radius: var(--radius-sm);
}

.course-search-form .form-control:focus,
.blog-search-form .form-control:focus,
.search-form .form-control:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(10, 34, 64, 0.2);
}

.course-search-form .btn,
.blog-search-form .btn,
.search-form .btn {
    flex-shrink: 0; /* Prevent button from shrinking */
    padding: 0.5rem 1rem; /* Ensure button padding matches input height */
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--navy);
    margin: 0;
}

.form-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--navy);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    appearance: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:focus {
    border-color: var(--navy);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(10, 34, 64, 0.2);
}

.clear-filters {
    background: transparent;
    color: var(--grey);
    border: 1px solid var(--grey);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-filters:hover {
    color: var(--red);
    border-color: var(--red);
    background: rgba(213, 43, 30, 0.05);
}

#no-results-message {
    color: var(--grey); /* Use mid-grey color */
    font-style: italic;
}

/* Search Container - wrapper for search forms */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--grey);
}

.no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

/* Custom Training Section Styles - Redesigned */
.custom-training-section {
    background: linear-gradient(to bottom, var(--white) 0%, var(--grey-light) 100%);
    padding: var(--space-xxxl) 0;
}

.custom-training-hero {
    text-align: center;
    margin-bottom: var(--space-xxxl);
}

.custom-training-hero .section-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--grey);
    margin-bottom: var(--space-xl);
}

.custom-training-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.custom-training-image {
    max-width: 600px;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

.custom-training-content {
    text-align: center;
}

.custom-training-content .lead-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--navy);
    margin-bottom: var(--space-lg);
}

/* Training Process Section */
.training-process-section {
    margin-bottom: var(--space-xxxl);
}

.process-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: var(--space-xxl);
    color: var(--navy);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.process-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--navy) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.process-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.process-card:hover::before {
    transform: scaleX(1);
}

.process-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(213, 43, 30, 0.3);
    transition: all var(--transition-normal);
}

.process-card:hover .process-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 30px rgba(213, 43, 30, 0.4);
}

.process-card h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    color: var(--navy);
}

.process-card p {
    color: var(--grey);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Custom Training CTA Section */
.custom-training-cta {
    background: var(--navy);
    color: var(--white);
    padding: var(--space-xxl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

.custom-training-cta h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.custom-training-cta p {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

.custom-training-cta .cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.custom-training-cta .btn-lg {
    min-width: 250px;
}

/* Responsive adjustments for custom training section */
@media (max-width: 768px) {
    .custom-training-hero .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .process-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .process-card {
        padding: var(--space-lg);
    }
    
    .process-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .custom-training-cta {
        padding: var(--space-xl);
    }
    
    .custom-training-cta h3 {
        font-size: 1.5rem;
    }
    
    .custom-training-cta .btn-lg {
        min-width: auto;
        width: 100%;
    }
    
    .custom-training-cta .cta-buttons {
        flex-direction: column;
    }
}

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

.no-results a {
    color: var(--red);
    text-decoration: underline;
}

/* Responsive adjustments for search bar */
@media (max-width: 767px) {
    .course-search-form,
    .blog-search-form,
    .search-form {
        max-width: 100%;
    }
    
    .filter-controls {
        justify-content: flex-start;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group label {
        min-width: 80px;
    }
    
    .form-select {
        flex: 1;
    }
}

/* Ensure form control base styles exist */
.form-control {
    /* Basic styling if not defined elsewhere */
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--navy);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid #ced4da; 
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Search highlighting */
mark {
    background-color: #ffeb3b;
    color: inherit;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* Results count styling - hidden */
.results-count {
    display: none;
}

/* Clear search button hover */
.clear-search:hover {
    color: var(--navy);
}

.form-control:focus {
    border-color: var(--navy);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(10, 34, 64, 0.2);
}

/* ===== CERTIFICATION ITEMS ===== */
.certification-item {
  padding: var(--space-lg);
  transition: transform var(--transition-normal);
}

.certification-item:hover {
  transform: translateY(-5px);
}

.certification-item h4 {
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.certification-item p {
  color: var(--grey);
  font-size: 0.875rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.certification-item i {
  transition: all var(--transition-normal);
}

.certification-item:hover i {
  transform: scale(1.1);
  color: var(--red) !important;
}

/* ===== COURSE CARD STYLING ===== */
.course-card {
  height: 100%;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.course-image {
  height: 80px;
  background: linear-gradient(135deg, var(--grey-light) 0%, var(--grey) 100%);
  position: relative;
  overflow: hidden;
}

.course-title-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  color: var(--navy);
  width: 100%;
  height: 100%;
  padding: 15px;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--red);
}

.course-title-overlay h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

.course-card-content {
  padding: 20px;
}

.course-card-content p {
  color: var(--grey);
  margin-bottom: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== BLOG POST STYLING ===== */
.blog-post-image {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 220px; /* Consistent height for all blog images */
}

.blog-icon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(10, 34, 64, 0.8) 0%, rgba(10, 34, 64, 0.6) 100%);
  color: var(--white);
  transition: all var(--transition-normal);
}

.card:hover .blog-icon-overlay {
  background: linear-gradient(135deg, rgba(10, 34, 64, 0.6) 0%, rgba(10, 34, 64, 0.4) 100%);
  transform: scale(1.05);
}

.blog-icon-overlay i {
  transition: all var(--transition-normal);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.post-date {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  min-width: 60px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-date .day {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.post-date .month {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--grey);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Category-based background colors with better gradients */
.blog-post-image.category-safety {
  background: linear-gradient(135deg, #2E8B57 0%, #228B22 100%); /* Forest Green */
}

.blog-post-image.category-health {
  background: linear-gradient(135deg, #20B2AA 0%, #008B8B 100%); /* Teal */
}

.blog-post-image.category-emergency {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%); /* Crimson */
}

.blog-post-image.category-compliance {
  background: linear-gradient(135deg, #4169E1 0%, #1E90FF 100%); /* Royal Blue */
}

.blog-post-image.category-leadership {
  background: linear-gradient(135deg, #8A2BE2 0%, #4B0082 100%); /* Purple */
}

.blog-post-image.category-general {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); /* Default Navy */
}

/* Improve card content layout */
.latest-blog-posts .card {
  transition: all var(--transition-normal);
  min-height: 100%;
}

.latest-blog-posts .card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.latest-blog-posts .card-title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8rem; /* Ensure consistent title height */
}

.latest-blog-posts .card-text {
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

/* Blog meta styling improvements */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  margin-top: auto; /* Push to bottom */
}

.post-author {
  color: var(--grey);
  font-weight: 500;
}

.post-category {
  background: var(--grey-light);
  color: var(--navy);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category-specific post-category colors */
.category-safety .post-category {
  background: rgba(46, 139, 87, 0.1);
  color: #2E8B57;
}

.category-health .post-category {
  background: rgba(32, 178, 170, 0.1);
  color: #20B2AA;
}

.category-emergency .post-category {
  background: rgba(220, 20, 60, 0.1);
  color: #DC143C;
}

.category-compliance .post-category {
  background: rgba(65, 105, 225, 0.1);
  color: #4169E1;
}

.category-leadership .post-category {
  background: rgba(138, 43, 226, 0.1);
  color: #8A2BE2;
}

/* Error and empty states */
.empty-state,
.error-state {
  padding: var(--space-xxl) var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.empty-state i,
.error-state i {
  margin-bottom: var(--space-lg);
  opacity: 0.6;
}

.empty-state h3,
.error-state h3 {
  color: var(--navy);
  margin-bottom: var(--space-md);
}

.empty-state p,
.error-state p {
  color: var(--grey);
  margin-bottom: 0;
}

/* Loading animation for blog icons */
@keyframes blogIconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.blog-icon-overlay i {
  animation: blogIconPulse 2s ease-in-out infinite;
}

.card:hover .blog-icon-overlay i {
  animation: none;
  transform: scale(1.15);
}

/* Responsive improvements for blog cards */
@media (max-width: 767px) {
  .blog-post-image {
    height: 200px;
  }
  
  .post-date {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.375rem;
    min-width: 50px;
  }
  
  .post-date .day {
    font-size: 1rem;
  }
  
  .post-date .month {
    font-size: 0.625rem;
  }
  
  .blog-icon-overlay i {
    font-size: 2rem !important;
  }
  
  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .latest-blog-posts .card-title {
    font-size: 1rem;
    -webkit-line-clamp: 3;
    min-height: 3.6rem;
  }
}

/* Loading state styling */
.loading-state {
  padding: var(--space-xxl) var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.loading-state i {
  margin-bottom: var(--space-lg);
  opacity: 0.6;
}

.loading-state p {
  color: var(--grey);
  margin-bottom: 0;
}

/* ===== ERROR NOTIFICATION STYLES ===== */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px 40px 16px 16px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-index-modal);
    animation: slideIn 0.3s ease-out;
    font-family: var(--font-primary);
}

.error-notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.error-notification.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.error-notification .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 4px;
    transition: opacity var(--transition-fast);
}

.error-notification .close-btn:hover {
    opacity: 0.8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== ACCESSIBILITY STYLES ===== */
/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip links for keyboard navigation */
.skip-links {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy);
    color: var(--white);
    padding: 8px;
    z-index: var(--z-index-critical);
    text-decoration: none;
}

.skip-link {
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
}

.skip-link:focus {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--navy);
    color: var(--white);
    padding: 8px 16px;
    z-index: var(--z-index-critical);
    text-decoration: underline;
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* Focus visible styles for better keyboard navigation */
:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --navy: #000033;
        --red: #FF0000;
        --grey: #333333;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-right: var(--space-md);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--navy);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    position: relative;
}

.lang-btn:hover {
    color: var(--red);
    background-color: rgba(213, 43, 30, 0.1);
}

.lang-btn.active {
    color: var(--red);
    font-weight: 600;
}

.lang-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background-color: var(--red);
}

.lang-separator {
    color: var(--grey);
    font-size: 0.875rem;
    user-select: none;
}

/* Dark theme language switcher */
[data-theme="dark"] .language-switcher .lang-btn {
    color: var(--text-color);
}

[data-theme="dark"] .language-switcher .lang-btn:hover {
    color: var(--red);
    background-color: rgba(213, 43, 30, 0.2);
}

[data-theme="dark"] .language-switcher .lang-btn.active {
    color: var(--red);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: var(--space-sm);
    }
    
    .lang-btn {
        font-size: 0.8125rem;
        padding: var(--space-xs);
    }
}

/* Enhanced Language Dropdown */
.language-dropdown {
    position: relative;
    margin-left: 20px;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-navy);
    transition: all 0.3s ease;
}

.language-dropdown-toggle:hover {
    background: var(--color-gray-light);
    border-color: var(--color-gray);
}

.language-dropdown.open .language-dropdown-toggle {
    background: var(--color-gray-light);
    border-color: var(--color-primary);
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-code {
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: var(--z-index-overlay);
    min-width: 180px;
}

.language-dropdown.open .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-navy);
    text-align: left;
    transition: background-color 0.2s ease;
}

.language-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option:hover {
    background-color: var(--color-gray-light);
}

.language-option.active {
    background-color: rgba(212, 43, 30, 0.1);
    color: var(--color-primary);
}

.lang-name {
    flex: 1;
}

.check-icon {
    color: var(--color-primary);
    font-size: 12px;
}

.check-icon.hidden {
    display: none;
}

/* Dark theme support for dropdown */
[data-theme="dark"] .language-dropdown-toggle {
    background: var(--color-background-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .language-dropdown-menu {
    background: var(--color-background-alt);
    border-color: var(--color-border);
}

[data-theme="dark"] .language-option {
    color: var(--color-text);
}

[data-theme="dark"] .language-option:hover {
    background-color: var(--color-background);
}

/* Mobile responsive for dropdown */
@media (max-width: 768px) {
    .language-dropdown {
        margin-left: 10px;
    }
    
    .language-dropdown-toggle {
        padding: 6px 10px;
    }
    
    .lang-code {
        display: none;
    }
}

/* ===== DASHBOARD COURSE CARDS SPECIFIC STYLES ===== */
#courses-tab .courses-container {
  margin-top: 1.5rem;
}

#courses-tab .course-group {
  margin-bottom: 2rem;
}

#courses-tab .course-group-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

#courses-tab .course-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: auto;
}

#courses-tab .course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#courses-tab .course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

#courses-tab .course-title {
  font-size: 1.125rem;
  margin: 0;
  color: var(--navy);
  flex: 1;
  margin-right: 1rem;
}

#courses-tab .course-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#courses-tab .course-status.not-started {
  background: var(--grey-light);
  color: var(--grey-dark);
}

#courses-tab .course-status.in-progress {
  background: #fff3cd;
  color: #856404;
}

#courses-tab .course-status.completed {
  background: #d4edda;
  color: #155724;
}

#courses-tab .course-description {
  font-size: 0.875rem;
  color: var(--grey-dark);
  margin-bottom: 1rem;
  line-height: 1.5;
}

#courses-tab .course-progress {
  margin-bottom: 1rem;
}

#courses-tab .progress-bar {
  height: 8px;
  background: var(--grey-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

#courses-tab .progress-fill {
  height: 100%;
  background: var(--navy);
  transition: width 0.3s ease;
}

#courses-tab .progress-text {
  font-size: 0.75rem;
  color: var(--grey-dark);
}

#courses-tab .course-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--grey-dark);
  flex-wrap: wrap;
}

#courses-tab .course-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#courses-tab .course-actions {
  display: flex;
  gap: 0.75rem;
}

#courses-tab .course-actions .btn {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#courses-tab .empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--grey-dark);
}

#courses-tab .empty-state i {
  color: var(--grey);
  margin-bottom: 1rem;
}

#courses-tab .empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--navy);
}

#courses-tab .error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--red);
}

#courses-tab .error-state i {
  margin-bottom: 1rem;
}

/* Responsive adjustments for dashboard courses */
@media (max-width: 768px) {
  #courses-tab .courses-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #courses-tab .course-actions {
    flex-direction: column;
  }
  
  #courses-tab .course-actions .btn {
    width: 100%;
  }
} 