/* Override body height from main styles.css for subpages */
body {
  height: auto !important;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 70px;
}

.sidebar {
  position: fixed;
  border-right: 3px solid var(--dark-gold-color);
  padding: 30px 0% 30px 1%;
  width: 12%;
  display: flex;
  flex-direction: column;
  justify-content: start;
  height: 92vh;
  background-color: #252525;
  background-image: url(./assets/test5.png);
}

.servicecontainer {
  display: flex;
  align-items: stretch;
  padding: 5px;
}

.border {
  border-left: 1px solid var(--main-gold-color);
  height: auto;
  align-self: stretch;
}

.services {
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
}

.sidebar h3,
.sidebar h2 {
  color: var(--main-gold-color);
}

.sidebar h3 {
  margin-top: 20px;
}

.sidebar h3 a {
  color: var(--main-gold-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar h3 a:hover {
  color: var(--dark-gold-color);
}

.services a {
  padding: 5px;
  font-size: 1em;
  text-decoration: none;
  color: gray;
}

.services a:hover {
  color: var(--main-gold-color);
}

.services #active {
  background-color: var(--main-gold-color);
  border-radius: 2px;
  color: black;
}

.content {
  width: 90%;
  min-height: 100vh;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  margin-top: 20px;
  margin-left: 13%;
  background-color: rgba(45, 45, 45, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.content h1 {
  font-size: 3.2em;
  color: var(--main-gold-color);
  margin-bottom: 0.5em;
  text-align: center;
  line-height: 1.2;
}

.content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-style: normal;
  font-weight: 600;
  font-size: 2.2em;
  color: var(--main-gold-color);
  border-bottom: 2px solid var(--dark-gold-color);
  padding-bottom: 0.5rem;
}

.content p {
  font-size: 1.1em;
  line-height: 1.6em;
  margin: 1.2rem 0;
  color: #e8e8e8;
}

th {
  font-weight: bold;
  color: var(--main-gold-color);
}

td {
  color: white;
}

.content-con {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0px;
  max-width: 80%;
  margin-bottom: 100px;
  margin-top: 50px;
  padding: 2rem;
  background-color: rgba(50, 50, 50, 0.8);
  border-radius: 12px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.topsplash {
  object-position: center 20%;
  object-fit: cover;
  margin-bottom: 30px;
}

.content-con a {
  color: rgb(0, 163, 204);
}

.content .subtext {
  color: gray;
  font-size: 1.1em;
}

.img-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content img {
  width: 90%;
  height: 600px;
  object-fit: cover;
}

.copyright {
  font-size: 1.3em;
  position: fixed;
  bottom: 0;
  left: 0;
  margin: 0;
  color: gray;
  border-top: 1px solid rgb(65, 65, 65);
  width: 10%;
  padding: 0 1.5% 0 1.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.copyright p {
  font-size: 0.8em;
}

.content p,
.content h1,
.content h3,
.content h4,
.content h2 {
  margin-left: 0;
  max-width: 100%;
}

.content .subtext {
  margin-top: 10px;
  margin-left: 0;
}

.content * {
  opacity: 0;
  animation: fadeInFromLeft 1s 0.2s forwards;
}

h3,
h4 {
  color: var(--mid-gold-color);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  font-size: 1.4em;
}

ul {
  padding-left: 2rem;
  margin: 1rem 0;
}

table {
  box-sizing: border-box;
  max-width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background-color: rgba(60, 60, 60, 0.9);
  border-radius: 8px;
  overflow: hidden;
}

p {
  margin: 1rem 0;
}

ul li {
  font-size: 1.1em;
  margin-bottom: 0.8rem;
  line-height: 1.5;
  color: #e0e0e0;
}

ul li strong {
  color: var(--main-gold-color);
}

table th,
table td {
  border: 1px solid #666;
  padding: 12px 16px;
  text-align: left;
  font-size: 1em;
}

table th {
  background-color: var(--dark-gold-color);
  font-weight: bold;
  color: white;
}

em {
  display: block;
  margin-bottom: 1rem;
  color: #aaa;
  font-style: italic;
  font-size: 0.95em;
}

/* Additional improvements for better readability */
.content-title {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--main-gold-color);
}

/* Remove border from h1 and h2 inside content-title to prevent double borders */
.content-title h1,
.content-title h2 {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0.5rem !important;
}

.bio-page,
h2.bio-page {
  border: none;
  margin-bottom: 0;
}

.bio-page img {
  width: 500px !important;
  max-width: 80%;
  height: auto !important;
  object-fit: cover;
  border-radius: 8px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

p.bio-page {
  margin-bottom: 0;
  margin-top: 0 !important;
}

td {
  max-width: 50%;
  text-wrap: wrap;
}

.content-title h1,
.content-title h2 {
  margin-left: 0;
  max-width: 100%;
}

.content strong {
  color: var(--main-gold-color);
  font-weight: 600;
}

.img-group {
  margin: 2rem 0;
}

.content img {
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

hr {
  margin: 2rem 0;
  width: 100%;
  border: none;
  border-top: 2px solid var(--dark-gold-color);
  opacity: 0.6;
}

.content-con hr {
  margin: 2.5rem 0;
  height: 0px;
  border: 1px solid var(--dark-gold-color);
}

@keyframes fadeInFromLeft {
  from {
    opacity: 0;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-con p,
.content-con li {
  margin-top: 10px;
  font-size: 20px;
}

/* ===============================================
   MOBILE HEADER NAVIGATION (SUBPAGES ONLY)
   =============================================== */

/* Hamburger Menu Button (hidden by default) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  transition: all 0.3s ease;
}

.practice-menu-section h4 a {
  padding-left: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.mobile-menu-toggle:hover {
  opacity: 0.7;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: black;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active {
  opacity: 1;
  color: black !important;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  color: black !important;
}

.mobile-menu-toggle.active span:nth-child(2) {
  color: black !important;
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  color: black !important;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-overlay nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 30px;
}

.mobile-nav-overlay nav a {
  color: white;
  text-decoration: none;
  font-size: 1.5em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 30px;
  border: 2px solid var(--main-gold-color);
  border-radius: 8px;
  background: rgba(206, 184, 136, 0.1);
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
}

.mobile-nav-overlay nav a:hover {
  background: var(--main-gold-color);
  color: black;
  transform: translateY(-3px);
}

/* Practice Areas Dropdown in Mobile Menu */
.mobile-practice-areas {
  width: 100%;
  max-width: 300px;
}

.practice-areas-toggle {
  width: 100%;
  background: rgba(206, 184, 136, 0.1);
  border: 2px solid var(--main-gold-color);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.5em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.practice-areas-toggle:hover,
.practice-areas-toggle.active {
  background: var(--main-gold-color);
  color: black;
}

.content-con h4 {
  margin-bottom: 0;
}

.practice-areas-toggle::after {
  content: " ▼";
  font-size: 0.7em;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.practice-areas-toggle.active::after {
  transform: rotate(180deg);
}

.practice-areas-content {
  display: none;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--dark-gold-color);
}

.practice-areas-content.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

.practice-section {
  margin-bottom: 20px;
}

.practice-section h4 {
  color: var(--main-gold-color);
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--dark-gold-color);
  padding-bottom: 5px;
}

.practice-section a {
  display: block;
  color: #ccc;
  text-decoration: none;
  padding: 8px 15px;
  font-size: 0.9em;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-bottom: 5px;
}

.practice-section a:hover {
  background: rgba(206, 184, 136, 0.2);
  color: var(--main-gold-color);
  transform: translateX(5px);
}

/* ===============================================
   SLIDE-IN PRACTICE AREAS MENU (MOBILE)
   =============================================== */

/* Practice Areas Menu Button */
.practice-menu-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid white;
  border-radius: 4px;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.practice-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: var(--main-gold-color);
}

.practice-menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: white;
  transition: fill 0.3s ease;
}

.practice-menu-toggle:hover svg {
  fill: var(--main-gold-color);
}

/* Fixed Practice Areas Button (Mobile Left Side) */
.practice-areas-fab {
  display: none;
  position: fixed;
  top: 50px;
  left: 0px;
  width: 100px;
  height: 30px;
  background: var(--main-gold-color);
  border-bottom-right-radius: 6px;
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
  color: black;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
}

/* Shadow strip across the page for button visibility */
.practice-areas-fab::after {
  content: "";
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  height: 50px;
  z-index: -1;
  pointer-events: none;
}

.practice-areas-fab:hover {
  background: var(--dark-gold-color);
  transform: translateY(-2px);
}

.practice-areas-fab:active {
  transform: translateY(0);
}

.practice-areas-fab::before {
  content: "Pages ▶";
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 100%;
  width: 100%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  color: black;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* Slide-in Menu Overlay */
.practice-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.practice-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Slide-in Menu Panel */
.practice-menu-panel {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  z-index: 1500;
  transition: left 0.3s ease;
  overflow-y: auto;
  border-right: 3px solid var(--main-gold-color);
  box-shadow: 3px 0 20px rgba(0, 0, 0, 0.3);
}

.practice-menu-panel.active {
  left: 0;
}

/* Menu Header */
.practice-menu-header {
  padding: 20px;
  background: var(--main-gold-color);
  color: black;
  font-weight: bold;
  font-size: 1.2em;
  text-align: center;
  border-bottom: 2px solid var(--dark-gold-color);
}

/* Menu Close Button */
.practice-menu-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: black;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}

/* Menu Content */
.practice-menu-content {
  padding: 20px;
}

.practice-menu-section {
  margin-bottom: 25px;
}

.practice-menu-section h4 {
  color: var(--main-gold-color);
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--dark-gold-color);
}

.practice-menu-section a {
  display: block;
  color: #ccc;
  text-decoration: none;
  padding: 12px 15px;
  font-size: 0.95em;
  border-radius: 6px;
  transition: all 0.3s ease;
  margin-bottom: 5px;
  border-left: 3px solid transparent;
}

.practice-menu-section a:hover {
  background: rgba(206, 184, 136, 0.2);
  color: var(--main-gold-color);
  border-left-color: var(--main-gold-color);
  transform: translateX(5px);
}

.practice-menu-section a.active {
  background: rgba(206, 184, 136, 0.3);
  color: var(--main-gold-color);
  border-left-color: var(--main-gold-color);
  font-weight: 600;
}

/* Tablet-specific styles */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  /* Adjust content width for tablets */
  .content {
    width: 80%;
    margin-left: 20%;
  }

  .content-con {
    max-width: 70%;
    padding: 1.5rem;
  }

  /* Adjust image sizing for tablets */
  .content img {
    width: 80%;
    height: auto;
    max-height: 500px;
  }

  /* Typography adjustments for tablets */
  .content h1 {
    font-size: 2.8em;
  }

  .content h2 {
    font-size: 2em;
  }

  /* Bio page image optimization for tablets */
  .bio-page img {
    width: 400px !important;
    max-width: 70%;
  }

  /* Sidebar optimization for tablets */
  .sidebar {
    width: 20%;
    padding: 30px 1% 30px 1.5%;
  }
}

/* Mobile-specific styles for tablets and phones */
@media screen and (max-width: 768px) {
  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Show fixed practice areas button on mobile */
  .practice-areas-fab {
    display: block;
  }

  /* Hide the old practice menu toggle */
  .practice-menu-toggle {
    display: none;
  }

  /* Hide regular navigation on mobile */
  header nav {
    display: none;
  }

  /* Show mobile overlays when needed */
  .mobile-nav-overlay,
  .practice-menu-overlay {
    display: block;
  }

  /* Hide sidebar completely on mobile for better content space */
  .sidebar {
    display: none;
  }

  /* Adjust container for mobile without sidebar */
  .container {
    flex-direction: column;
    margin-top: 60px;
  }

  /* Content takes full width on mobile */
  .content {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    padding: 0.5rem;
    background-color: rgba(45, 45, 45, 0.98);
    margin: 0 5px;
    box-sizing: border-box;
    max-width: calc(100vw - 10px);
  }

  .content-con {
    padding: 1rem;
    margin-top: 20px;
    margin-bottom: 50px;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Logo adjustments for mobile - use full logo */
  header .logogroup img {
    height: 35px !important;
    width: auto;
  }

  .header-scroll .logogroup img {
    height: 30px !important;
    width: auto;
  }

  /* Adjust header padding on mobile */
  header {
    padding: 15px 20px;
    box-shadow: 0 px 8px rgba(0, 0, 0, 0.3);
  }

  .header-scroll {
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  /* Mobile typography and overflow fixes */
  .content h1 {
    font-size: 2.2em;
    line-height: 1.1;
  }

  .content h2 {
    font-size: 1.8em;
  }

  .content p {
    font-size: 1em;
    line-height: 1.5;
  }

  /* Fix table and image overflow */
  .content img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* Mobile Table Styling - Remove horizontal scroll */
  table {
    font-size: 0.95em;
    width: 100%;
    border-collapse: collapse;
    display: table;
    table-layout: auto;
    overflow: visible;
    margin: 1.5rem 0;
  }

  table th,
  table td {
    padding: 10px 8px;
    text-align: left;
    word-wrap: break-word;
    hyphens: auto;
    vertical-align: top;
  }

  table th {
    font-size: 1em;
    line-height: 1.3;
  }

  table td {
    font-size: 0.95em;
    line-height: 1.4;
  }

  /* Ensure table headers and cells wrap properly */
  table thead,
  table tbody,
  table tr {
    display: table-row-group;
    width: auto;
  }

  table tr {
    display: table-row;
  }

  table th,
  table td {
    display: table-cell;
  }

  /* Mobile CTA Button Styling */
  .cta-button {
    padding: 14px 25px !important;
    font-size: 1.1em !important;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: block;
    margin: 20px auto;
    max-width: 90%;
  }

  /* CTA Button Container Mobile Adjustments */
  div[style*="text-align: center"] {
    margin: 2rem auto !important;
    padding: 0 1rem;
  }
}
