/* ===== BASE STYLES ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.clearsBoth { clear: both; }
.maxHeight { height: 36px; }

/* ===== HEADER STYLES ===== */
.site-header {
  background: #ffffff;
  color: #0a1c3f;
  text-align: center;
  padding: 10px 0;
}

.header-top .phone-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.0rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0);
  margin-bottom: 12px;
}

.logo-center img {
  max-width: 300px;
  margin: 6px auto;
}

.site-header.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease-in-out;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

body.has-fixed-header {
  padding-top: 60px; /* Adjust based on your header height */
}

/* ===== NAVIGATION STYLES ===== */
.nav-container {
  position: relative;
  width: 1080px;
  margin: auto;
}

.nav-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 15px;
  cursor: pointer;
  display: none;
  z-index: 1001;
  transition: all 0.3s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin: 0 10px;
  position: relative;
}

.main-nav a {
  color: #0a1c3f;
  text-decoration: none;
  display: block;
  padding: 10px;
}

/* Mobile First Navigation */
#navMenu {
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

#navMenu .open {
  display: flex;
}

.submenu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  padding: 0;
  color: #0a1c3f;
  background: #fff;
  min-width: 200px;
  z-index: 1000;
  text-align: left;
}

.submenu a { 
  color: #0a1c3f; 
}

/* ===== MAIN CONTENT STYLES ===== */
main { 
  background: #0a1c3f;
  width: 100%;
  padding-bottom: 24px;
}

/* Hero Section */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0px 20px 0;
  background: #0a1c3f;
  text-align: center;
  color: #fff;
  max-width: 1080px;
  margin: auto;
}

.hero-content {
  max-width: 540px;
  text-align: left;
}

.hero-image { 
  max-width: 540px;
  float: right;
  text-align: right;
  padding: 12px 0 12px 12px;
}

.hero-image img { 
  max-width: 100%;
  float: right;
  transition: opacity 0.3s;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* CTA Grid and Boxes */
.cta-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
  background: #fff;
  max-width: 1080px;
  margin: auto;
}

.cta-box {
  margin: 10px;
  flex: 1 1 400px;
  max-width: 1080px;
  padding: 20px;
  transition: all 0.3s ease;
}

.cta-box h2 { 
  margin-top: 0px; 
}

.cta-quote { 
  font-style: italic; 
  font-size: 1.2em; 
  line-height: 1.6em; 
}

.cta-box .cta-image { 
  max-width: 500px; 
  width: auto; 
}

.cta-ul { 
  font-size: 1.2em; 
  line-height: 1.5em; 
}

.cta-ul a { 
  color: #0a1c3f; 
  text-decoration: none; 
  font-style: italic; 
}

.cta-ul a:hover { 
  font-weight: 600; 
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #0a1c3f;
  color: #fff;
  text-decoration: none;
  margin: 10px 20px 0 0;
  border: solid 1px #3f3f3f;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.btn.primary {
  background: #1e3d8f;
}

.cta-button { 
  background: #0a1c3f;
  display: inline-block;
  border: solid 1px #3f3f3f;
}

.cta-button a { 
  color: #fff !important; 
}

.cta-buttons {
  display: flex;
}

/* Footer */
.site-footer {
  background: #060d1f;
  color: #fff;
  text-align: center;
  padding: 20px;
}

/* ===== ICON & STAFF DISPLAY STYLES ===== */
/* CTA Icons */
.cta-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 500px; /* enough room for 2x 180px + 1x 12px gap */
  margin: auto;
}

.cta-icon { 
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}
.cta-icon-w{ 
  width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.cta-icon img {
  max-height: 120px;
  max-width: 180px;
  object-fit: contain;
  background-color: #fff;
  padding: 8px;
  transition: opacity 0.3s;
}

.ctal-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  display: block;
}

/* CTA Icons Staff */
.cta-icons-staff {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: auto;
  margin-bottom: 20px;
}

.cta-icons-staff .cta-icon {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure consistent height */
}

.cta-icons-staff .cta-icon:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cta-icons-staff .cta-icon img {
  width: 250px;    /* Fixed width */
  height: 250px;   /* Fixed height */
  object-fit: cover; /* This will crop the image to fill the container */
  margin-left: -8px;
  margin-bottom: 15px;
  align-self: center; /* Center the image */
  overflow: hidden;  /* Hide any overflow */
}

.cta-icons-staff .cta-label {
  font-size: 1rem;
  font-weight: 600;
  color: #0a1c3f;
  display: block;
  margin-top: 10px;
}

.cta-icons-staff .cta-icon a {
  text-decoration: none;
  color: inherit;
}

/* Quick-Dial Items */
.dial-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 540px;
}

.dial-item {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #0a1c3f;
  width: 150px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dial-item .icon{ 
  width: 150px; 
  text-align: center; 
  margin: auto; 
  padding-top: 12px; 
  background: #f2f2f2; 
}

.dial-item .icon img{ 
  width: 100px !important; 
  height: 100px !important; 
  margin-bottom: 12px;
  fill: #0a1c3f;
}

.dial-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dial-item:hover .icon{ 
  background: #ffffff; 
}

/* ===== PENALTIES TABLE STYLES ===== */
.penalties-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}

.penalty-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #ddd;
}

.penalty-row.header {
  background-color: #0a1c3f;
  color: #fff;
  font-weight: 600;
}

.penalty-cell {
  padding: 12px 15px;
  flex: 1;
}

.penalty-cell:first-child {
  flex: 2;
}

/* ===== COMPONENT STYLES ===== */
/* Defense Types and Strategies */
.defense-types, .strategies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.defense-type, .strategy {
  background: #f7f7f7;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.defense-type h3, .strategy h3 {
  color: #0a1c3f;
  margin-top: 0;
  margin-bottom: 10px;
}

/* Note Style */
p.note {
  font-style: italic;
  font-size: 0.9rem;
  color: #555;
  border-left: 3px solid #0a1c3f;
  padding-left: 15px;
  margin: 20px 0;
}

/* Case Results */
.case-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.case {
  background: #f7f7f7;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.case h3 {
  color: #0a1c3f;
  margin-top: 0;
  margin-bottom: 10px;
}

/* Process Steps Accordion */
.process-steps {
  margin: 20px 0;
}

.step {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.step h3 {
  background: #f2f2f2;
  padding: 15px;
  margin: 0;
  cursor: pointer;
  position: relative;
  font-size: 1.1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.step h3:after {
  content: '+';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.step h3.active:after {
  content: '-';
}

.step p {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  margin: 0;
}

.step p.active {
  max-height: 500px;
  padding: 15px;
}

.step h3.active {
  background: #0a1c3f;
  color: #fff;
}

/* FAQ Accordion */
.faq-item {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
}

.faq-question {
  background: #f2f2f2;
  padding: 15px;
  margin: 0;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:after {
  content: '+';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.faq-question.active:after {
  content: '-';
}

.faq-answer {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer.active {
  max-height: 500px;
  padding: 15px;
}

.faq-question.active {
  background: #0a1c3f;
  color: #fff;
}

/* Definitions */
.definitions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.definition {
  background: #f7f7f7;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.definition h3 {
  color: #0a1c3f;
  margin-top: 0;
  margin-bottom: 10px;
}

/* Credentials Layout */
.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.credential {
  background: #f7f7f7;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.credential h3 {
  color: #0a1c3f;
  margin-top: 0;
  margin-bottom: 10px;
}

.credential ul {
  margin: 0;
  padding-left: 20px;
}

.credential li {
  margin-bottom: 5px;
}

/* ===== PODCAST STYLES ===== */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px; /* Increased gap between cards */
  margin-bottom: 60px; /* Extra space for pagination */
}

.podcast-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: auto; /* Auto height instead of 100% */
  transition: all 0.3s ease;
  margin-bottom: 10px; /* Force bottom margin */
  overflow: hidden; /* Prevent content overflow */
  position: relative; /* For absolute positioning of elements */
}

.podcast-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.podcast-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.podcast-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0a1c3f;
  margin-bottom: 10px;
  min-height: 2.4rem; /* Standardize title height */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.podcast-description {
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
  height: 5.6rem; /* Exactly 4 lines at 1.4 line height */
  overflow: hidden;
  position: relative;
}

.podcast-description-full {
  display: none;
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.read-more-btn {
  display: inline-block;
  color: #0a1c3f;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 15px;
  text-decoration: underline;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  color: #1e3d8f;
}

.podcast-duration {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 15px;
}

.podcast-platform-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  width: 100%;
  background: #fff;
}

.podcast-platform-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.podcast-platform-icons img:hover {
  transform: scale(1.1);
}

.podcast-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 10px;
}

#podcast-search, 
#podcast-year-filter {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex: 1;
  min-width: 150px;
}

.podcast-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
  padding: 20px 0;
  position: relative;
  clear: both;
  width: 100%;
  border-top: 1px solid #eee;
}

.podcast-pagination button {
  padding: 8px 15px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.podcast-pagination button:hover:not([disabled]) {
  background-color: #e0e0e0;
}

.podcast-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#current-page {
  font-weight: 500;
}

/* Loading state for AJAX content */
.loading {
  text-align: center;
  padding: 20px;
}

.loading:after {
  content: "Loading...";
  display: inline-block;
  animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
  0% { content: "Loading."; }
  33% { content: "Loading.."; }
  66% { content: "Loading..."; }
}

/* Image loading */
img[loading] {
  opacity: 0.5;
}

/* ===== RESPONSIVE STYLES ===== */
/* Desktop (992px and up) */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }

  #navMenu {
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    max-width: 1080px;
  }

  .has-submenu:hover .submenu {
    display: block !important;
  }

  /* optional: remove "open" class effect on desktop */
  .submenu.open {
    display: none !important;
  }
}

/* Larger screens with some constraints */
@media (max-width: 1100px) {
  .cta-grid, .hero, .nav-container {
    width: 95%;
    max-width: 1080px;
  }
}

/* Tablet styles (768px-991px) */
@media (max-width: 991px) {
  /* Header adjustments */
  .logo-center img {
    max-width: 250px;
  }
  
  /* Hero section */
  .hero {
    flex-direction: column;
    padding: 20px 15px;
  }
  
  .hero-content {
    max-width: 100%;
    text-align: center;
    margin-bottom: 25px;
  }
  
  .hero-image {
    max-width: 100%;
    float: none;
    text-align: center;
    padding: 0;
  }
  
  .hero-image img {
    float: none;
    max-width: 90%;
  }
  
  /* CTA boxes */
  .cta-box {
    flex: 1 1 45%;
  }
  
  /* Navigation */
  #navMenu {
    max-width: 100%;
  }
  
  /* Service areas, Awards, Affiliations */
  .service-areas, .awards-grid, .affiliations-grid {
    justify-content: space-around;
  }
  
  .area-group {
    flex: 0 0 calc(33.333% - 20px);
  }
  
  /* Podcast and Video grids */
  .podcast-grid, .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  /* Contact form */
  .contact-form-container {
    padding: 20px;
  }
  
  /* Team display */
  .cta-icons-staff {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  
  /* Tables for Drug Offenses and similar pages */
  .penalties-table {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .mobile-parent-link {
    font-weight: bold;
    color: #1e3d8f !important;
    background-color: #f0f4ff;
    border-left: 3px solid #1e3d8f;
  }
  
  .mobile-parent-link::before {
    content: '→ ';
    display: inline-block;
    margin-right: 5px;
  }
  
  .parent-link {
    border-bottom: 1px solid #ddd !important;
  }
}

/* Mobile styles (below 768px) */
@media (max-width: 767px) {
  /* Header adjustments */
  .site-header {
    padding: 5px 0;
  }
  
  .header-top .phone-number {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
  
  .logo-center img {
    max-width: 200px;
    margin: 4px auto;
  }
  
  /* Navigation - Mobile Menu */
  .nav-toggle {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0a1c3f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
  }
  
  #navMenu {
    display: none;
  }
  
  #navMenu.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 999;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent body scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Ensure the menu button stays visible */
  .nav-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
  }
  
  .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 0;
  }
  
  .main-nav li {
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
  }
  
  .main-nav a, 
  .submenu a {
    display: block;
    width: 100%;
    padding: 12px 15px;
    box-sizing: border-box;
    border-bottom: 1px solid #f0f0f0;
    white-space: normal;
    word-wrap: break-word;
    height: auto;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .submenu {
    display: none !important; /* Override any desktop styles */
    position: static;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0;
    margin: 0;
    background-color: #f5f5f5;
  }
  
  .submenu.open {
    display: block !important;
    max-height: none;
    padding-left: 20px;
    background-color: #f5f5f5;
  }
    
  .has-submenu > a {
    position: relative;
  }

  /* Add visible indicators for expandable items */
  .has-submenu > a::after {
    content: '+';
    margin-left: 5px;
  }
  
  .has-submenu > a.active::after {
    content: '-';
  }
  
  /* Make sure all nav content stays within screen width */
  .nav-container, 
  .main-nav,
  #navMenu,
  .submenu {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding-right: 15px; /* Add some padding */
  }
  
  /* Hero Section */
  .hero h1 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  /* CTA & Content Boxes */
  .cta-grid {
    padding: 10px;
  }
  
  .cta-box {
    flex: 1 1 100%;
    padding: 15px;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    text-align: center;
    white-space: normal;
    height: auto;
    min-height: 44px;
    justify-content: center;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  /* Fix specifically for podcast links and media buttons */
  .cta-ul li a,
  .main-nav .submenu a {
    white-space: normal;
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 8px 10px;
  }
  
  /* Icons and quickdial */
  .cta-icons {
    max-width: 100%;
    justify-content: center;
  }
  
  .dial-grid {
    max-width: 100%;
    justify-content: center;
  }
  
  .dial-item {
    width: 120px;
  }
  
  .dial-item .icon {
    width: 120px;
  }
  
  .dial-item .icon img {
    width: 70px !important;
    height: 70px !important;
  }
  
  /* Staff/Team display */
  .cta-icons-staff {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .cta-icons-staff .cta-icon img {
    width: 150px;
    height: 150px;
  }
  
  .cta-icons-staff .cta-label {
    font-size: 0.9rem;
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
  }
  
  /* FAQs and accordion elements */
  .faq-question {
    padding: 12px;
    font-size: 1rem;
  }
  
  .faq-answer.active,
  .step p.active {
    padding: 12px;
  }
  
  .step h3 {
    padding: 12px;
    font-size: 1rem;
  }
  
  /* Table-like components */
  .penalty-row {
    flex-direction: column;
    border-bottom: none;
    margin-bottom: 20px;
    border: 1px solid #ddd;
  }
  
  .penalty-row.header {
    display: none; /* Hide header on mobile */
  }
  
  .penalty-cell {
    border-bottom: 1px solid #ddd;
    padding: 10px;
  }
  
  .penalty-cell:before {
    content: attr(data-label);
    font-weight: bold;
    display: inline-block;
    width: 100%;
    margin-bottom: 5px;
  }
  
  /* Award items */
  .award-item {
    flex-direction: column;
  }
  
  .award-item img {
    width: 100%;
    height: auto;
  }
  
  /* Contact sections */
  .contact-item {
    flex-direction: column;
  }
  
  .contact-icon {
    margin-bottom: 10px;
    margin-right: 0;
  }
  
  /* Service areas */
  .area-group {
    flex: 0 0 100%;
  }
  
  /* Search controls for podcasts & videos */
  .podcast-controls, .video-controls {
    flex-direction: column;
  }
  
  /* Podcast grid */
  .podcast-grid, .video-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Case results, credentials, etc. */
  .case-results, .credentials, .defense-types, .strategies, .definitions {
    grid-template-columns: 1fr;
  }
}

/* Small phone styles (below 480px) */
@media (max-width: 480px) {
  /* Header further adjustments */
  .logo-center img {
    max-width: 180px;
  }
  
  /* Hero Title */
  .hero h1 {
    font-size: 1.4rem;
  }
  
  /* Tighten vertical spacing */
  .cta-box {
    margin: 5px;
    padding: 12px;
  }
  
  /* Staff photos even smaller */
  .cta-icons-staff .cta-icon img {
    width: 120px;
    height: 120px;
  }
  
  /* Further dial adjustments */
  .dial-item {
    width: 100px;
  }
  
  .dial-item .icon {
    width: 100px;
  }
  
  .dial-item .icon img {
    width: 60px !important;
    height: 60px !important;
  }
  
  /* Content Typography */
  .cta-box h2 {
    font-size: 1.3rem;
  }
  
  .cta-box h3 {
    font-size: 1.1rem;
  }
  
  .cta-quote {
    font-size: 1.1em;
  }
  
  .cta-ul {
    font-size: 1.1em;
  }
  
  /* Icon organization */
  .cta-icons {
    flex-direction: column;
    align-items: center;
  }

  .cta-icon {
    width: 100%;
    max-width: 200px;
  }
  
  /* Video / podcast cards */
  .podcast-card, .video-card {
    margin-bottom: 15px;
  }
  
  .podcast-title, .video-title {
    font-size: 1.1rem;
  }
  
  /* Testimonials */
  .testimonial {
    padding: 15px;
  }
  
  .testimonial:before {
    font-size: 40px;
  }
  
  /* Button adjustments */
  .nav-toggle {
    top: -40px; /* Adjust based on your smaller header height */
    right: 10px;
    padding: 5px 10px;
  }
  
  .btn {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  /* Adjust header for better space */
  .logo-center {
    margin-top: 5px;
    margin-bottom: 5px;
  }
}

/* Print styles */
@media print {
  .site-header, .main-nav, .site-footer, .cta-buttons, .btn {
    display: none !important;
  }
  
  body, .cta-box {
    background: white !important;
    color: black !important;
  }
  
  main {
    background: white !important;
  }
  
  .cta-grid {
    display: block !important;
  }
  
  .cta-box {
    max-width: 100% !important;
    break-inside: avoid;
  }
  
  a {
    text-decoration: none !important;
    color: black !important;
  }
  
  .hero, .her {
    padding: 0 !important;
    background: white !important;
  }
}

/* Base button styling */
.btn {
  background: #0a1c3f;
  color: #fff;
  text-decoration: none;
  border: solid 1px #3f3f3f;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Ensure padding is included in width */
}

.btn.primary {
  background: #1e3d8f;
}

/* Desktop button styling (min-width to ensure it overrides mobile) */
@media (min-width: 769px) {
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    margin: 10px 20px 0 0;
    width: auto;
    max-width: none;
    min-height: 44px;
  }
  
  .cta-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  
  /* Remove any mobile button overflow */
  .cta-box .btn {
    width: auto;
    margin-right: 20px;
  }
}

/* Mobile button styling (make sure this is applied AFTER desktop styles) */
@media (max-width: 768px) {
  .btn {
    display: block;
    width: auto; /* Changed from 100% to avoid overflow */
    max-width: 100%; /* Ensure it doesn't overflow container */
    margin: 10px 0;
    padding: 10px 15px;
    text-align: center;
    white-space: normal;
    height: auto;
    min-height: 44px;
  }
  
  .cta-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch; /* Make children stretch to fill container */
  }
  
  /* Specifically target buttons in CTA boxes */
  .cta-box .btn {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
  
  /* Fix for mobile parent links */
  .mobile-parent-link {
    font-weight: bold;
    color: #1e3d8f !important;
    background-color: #f0f4ff;
    border-left: 3px solid #1e3d8f;
  }
  
  .mobile-parent-link::before {
    content: '→ ';
    display: inline-block;
    margin-right: 5px;
  }
  
  .parent-link {
    border-bottom: 1px solid #ddd !important;
  }
}

/* Fix for KillerCrossExamination.com section */
@media (max-width: 768px) {
  /* Make image responsive */
  .cta-box .cta-image {
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    margin: 0 auto;
  }
  
  /* Fix the center alignment for buttons */
  .cta-box center {
    text-align: center;
    width: 100%;
  }
  
  .cta-box center .btn {
    display: inline-block;
    width: auto;
    max-width: 100%;
  }
  
  /* Fix single-button containers */
  .cta-box:last-child .btn,
  .cta-box .btn:only-child {
    width: auto;
    max-width: 100%;
    display: inline-block;
  }
  
  /* Staff grid specific fix */
  .cta-icons-staff {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    width: 100%;
  }
  
  /* Ensure each staff item has consistent sizing */
  .cta-icons-staff .cta-icon {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .cta-icons-staff .cta-icon img {
    width: 100%;
    height: auto;
    max-width: 140px;
    max-height: 140px;
    object-fit: cover;
  }
}

/* Desktop fixes to ensure proper display */
@media (min-width: 769px) {
  /* Make sure buttons in center tags are sized properly */
  center .btn {
    display: inline-block;
    width: auto;
  }
  
  /* Ensure staff grid displays properly */
  .cta-icons-staff {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

/* General button fixes that apply to all screen sizes */
.btn {
  box-sizing: border-box;
  text-align: center;
}

/* Fix for center-aligned buttons */
center .btn {
  margin-left: auto;
  margin-right: auto;
}

/* Fix for the specific "Our Staff is Ready to Assist You" button */
.cta-box:last-child .btn.primary,
.cta-box a.btn.primary:only-child {
  display: inline-block;
  width: auto;
  max-width: 100%;
}

/* Fix for bottom content area text overflow and display */
@media (max-width: 768px) {
  /* Ensure text containers have proper padding and margins */
  .cta-box p {
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  /* Fix for the specific bottom section with the team description */
  .cta-box:last-of-type {
    padding-bottom: 30px; /* Add extra padding at the bottom */
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Ensure content doesn't get cut off */
  }
  
  /* Make sure main content area has sufficient space */
  main {
    padding-bottom: 40px; /* Increase bottom padding */
    overflow: visible;
  }
  
  /* Ensure the grid container doesn't clip content */
  .cta-grid {
    overflow: visible;
    padding-bottom: 30px;
  }
  
  /* Fix for the last "Our Staff is Ready" button */
  .cta-box:last-child .btn {
    margin-bottom: 20px;
    display: inline-block;
    width: auto;
    max-width: 100%;
  }
}

/* Refined fix for Our Team page employee boxes */
@media (max-width: 768px) {
  /* Team member container */
  .cta-icons-staff {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Individual staff member cards */
  .cta-icons-staff .cta-icon {
    width: calc(100% - 40px) !important; /* Full width minus left+right padding */
    max-width: 280px !important; /* Set a reasonable max-width */
    margin: 0 auto 20px auto !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  /* Staff images */
  .cta-icons-staff .cta-icon img {
    width: 140px !important;
    height: 140px !important;
    object-fit: cover !important;
    margin: 0 auto 10px auto !important;
    display: block !important;
  }
  
  /* Staff name/title labels */
  .cta-icons-staff .cta-icon .cta-label {
    display: block !important;
    text-align: center !important;
    font-size: 1rem !important;
    margin-top: 10px !important;
    width: 100% !important;
  }
  
  /* Section container with staff members */
  .cta-box:has(.cta-icons-staff) {
    padding: 15px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Section headings */
  .cta-box h2 {
    margin-top: 20px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }
  
  /* Ensure everything stays within view */
  .cta-grid {
    padding: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
}