/* Inter Font Faces - Local */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local(''),
    url('../fonts/inter-v12-latin-300.woff2') format('woff2'),
    /* Chrome 26+, Opera 23+, Firefox 39+ */
    url('../fonts/inter-v12-latin-300.woff') format('woff');
  /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local(''),
    url('../fonts/inter-v12-latin-500.woff2') format('woff2'),
    /* Chrome 26+, Opera 23+, Firefox 39+ */
    url('../fonts/inter-v12-latin-500.woff') format('woff');
  /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local(''),
    url('../fonts/inter-v12-latin-700.woff2') format('woff2'),
    /* Chrome 26+, Opera 23+, Firefox 39+ */
    url('../fonts/inter-v12-latin-700.woff') format('woff');
  /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* Custom Language Dropdown Styles */
.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 150px;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 0.5rem 0;
}

.custom-dropdown-menu.show {
  display: block;
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: #212529;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.15s ease-in-out;
}

.custom-dropdown-item:hover {
  background-color: #f8f9fa;
  color: #212529;
  text-decoration: none;
}

.custom-dropdown-item.active {
  background-color: var(--bs-primary);
  color: white;
}

.custom-dropdown-item svg {
  border: 1px solid #dee2e6;
  border-radius: 2px;
  flex-shrink: 0;
}

#languageDropdown {
  cursor: pointer;
  user-select: none;
}

#currentLanguageFlag svg {
  border: 1px solid #dee2e6;
  border-radius: 2px;
}

/* Hero Section Mobile Responsive Styles */
.hero-section {
  height: 100vh; /* Fixed height instead of min-height to prevent content-based changes */
  position: relative;
  overflow: hidden; /* Prevent content overflow from affecting layout */
}

.hero-background {
  background-image: url(../img/landing-main.jpg);
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #627b82;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  height: 100vh; /* Fixed height instead of 100% to maintain consistent background size */
  z-index: 1;
}

.hero-content {
  z-index: 2;
  height: 100vh; /* Fixed height instead of min-height */
  display: flex;
  align-items: center;
}

.hero-text-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-width: min(450px, 90vw);
  width: 450px; /* Fixed width to prevent layout shifts during language changes */
  min-height: 300px; /* Fixed minimum height to prevent vertical layout shifts */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center content vertically */
}

/* Optimized hero spacing for all desktop resolutions */
@media (min-width: 992px) {
  .hero-text-box {
    padding: 1rem;
    min-height: 200px;
    width: 350px;
    max-width: min(350px, 80vw);
  }

  .hero-text-container.py-vh-6 {
    padding-top: 40px !important;
    padding-bottom: 1rem !important;
  }

  .hero-text-box h1.mt-5 {
    margin-top: 0 !important;
  }

  .hero-text-box .btn.my-5 {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
  }
}

/* Mobile-specific styles */
@media (max-width: 991.98px) {
  .hero-section {
    height: 180vh; /* Fixed height instead of min-height */
  }
  
  .hero-background {
    height: 180vh; /* Match the section height */
  }
  
  .hero-content {
    height: 180vh; /* Fixed height instead of min-height */
    align-items: flex-end;
    padding-bottom: 20vh;
  }
  
  .hero-text-container {
    padding-top: 100vh !important;
  }
  
  .hero-text-box {
    width: 90vw; /* Responsive width for mobile */
    max-width: 450px;
    transform: translateY(150px); /* Move text box down to show more of the person */
    color: white; /* Make text white for better readability */
    background: rgba(0, 0, 0, 0.25); /* Very light semi-transparent background */
    backdrop-filter: blur(15px); /* Stronger blur effect */
    padding: 1rem; /* Reduced padding for mobile */
    min-height: 200px; /* Reduced min-height for mobile */
  }

  .hero-text-box h1.mt-5 {
    margin-top: 0 !important;
  }

  .hero-text-box .btn.my-5 {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
  }
  
  /* Contact section mobile layout - edge to edge */
  #contact {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  #contact .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  #contact .row {
    flex-direction: column; /* Stack text above form */
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  #contact .col-lg-6,
  #contact .col-lg-5,
  #contact .col-12 {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-bottom: 2rem !important;
    display: block !important;
  }
  
  /* Make form inputs edge-to-edge */
  #contact form {
    padding: 0;
    margin: 0;
    display: block !important;
    visibility: visible !important;
  }
  
  /* Ensure form container is visible */
  #contact .col-12.col-md-6.col-lg-5 {
    display: block !important;
    visibility: visible !important;
  }
  
  /* Show full contact description text on mobile */
  #contact [data-translate="contact-description"] {
    display: block !important;
    overflow: visible !important;
  }
  
  #contact .form-control {
    border-radius: 0; /* Remove rounded corners for edge-to-edge look */
    margin-bottom: 1rem;
    width: 100%;
  }
  
  #contact .form-check {
    margin-bottom: 1rem;
  }
  
  #contact .btn {
    width: 100%; /* Full width button */
    border-radius: 0; /* Remove rounded corners */
    padding: 1rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    height: 160vh; /* Fixed height instead of min-height */
  }
  
  .hero-background {
    height: 160vh; /* Match the section height */
  }
  
  .hero-content {
    height: 160vh; /* Fixed height instead of min-height */
    padding-bottom: 15vh;
  }
  
  .hero-text-container {
    padding-top: 80vh !important;
  }
  
  .hero-text-box {
    width: 85vw; /* Smaller width for small screens */
    max-width: 400px;
    min-height: 280px; /* Slightly smaller min-height for mobile */
    transform: translateY(150px); /* Move text box down to show more of the person */
    color: white; /* Make text white for better readability */
    background: rgba(0, 0, 0, 0.25); /* Very light semi-transparent background */
    backdrop-filter: blur(15px); /* Stronger blur effect */
  }
  
  /* Contact section mobile layout - edge to edge */
  #contact {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  #contact .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  #contact .row {
    flex-direction: column; /* Stack text above form */
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  #contact .col-lg-6,
  #contact .col-lg-5,
  #contact .col-12 {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-bottom: 2rem !important;
    display: block !important;
  }
  
  /* Make form inputs edge-to-edge */
  #contact form {
    padding: 0;
    margin: 0;
    display: block !important;
    visibility: visible !important;
  }
  
  /* Ensure form container is visible */
  #contact .col-12.col-md-6.col-lg-5 {
    display: block !important;
    visibility: visible !important;
  }
  
  /* Show full contact description text on mobile */
  #contact [data-translate="contact-description"] {
    display: block !important;
    overflow: visible !important;
  }
  
  #contact .form-control {
    border-radius: 0; /* Remove rounded corners for edge-to-edge look */
    margin-bottom: 1rem;
    width: 100%;
  }
  
  #contact .form-check {
    margin-bottom: 1rem;
  }
  
  #contact .btn {
    width: 100%; /* Full width button */
    border-radius: 0; /* Remove rounded corners */
    padding: 1rem;
    font-size: 1.1rem;
  }
}

/* Hero text styling with wrapping allowed */
.hero-text-box h1 {
  margin-bottom: 0;
  line-height: 1.2;
}

.hero-text-box h2 {
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: 1.2;
}

/* Make hero title and name text smaller */
.hero-text-box [data-translate="hero-title"] {
  font-size: 2.5rem;
}

.hero-text-box [data-translate="hero-name"] {
  font-size: 2.5rem;
}

.hero-text-box p.lead {
  white-space: normal;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
}

/* Justified text for contact description */
.text-justify {
  text-align: justify;
}

/* Remove teal color from specific service description text */
[data-translate="service-2-desc"] .fw-bold.text-primary {
  color: inherit !important;
}

[data-translate="service-4-desc"] .fw-bold.text-primary {
  color: inherit !important;
}

/* Make About me picture fill full height of flex container */
#aboutme .col-lg-7 {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

#aboutme .col-lg-7 .row {
  height: 100%;
}

#aboutme .col-lg-7 .col-12 {
  height: 100%;
  display: flex;
}

/* Adjust About me picture to fill container */
#aboutme .bg-cover {
  width: 90%;
  height: 100% !important;
  aspect-ratio: unset !important;
  --bs-aspect-ratio: unset !important;
  background-position: center top !important;
}

/* Align contact description text to top */
#contact .text-start {
  align-self: flex-start;
}

/* Hide contact form title */
[data-translate="contact-form-title"] {
  display: none;
}

/* Increase form width by 50% and adjust text column */
#contact .col-lg-6 {
  flex: 0 0 35%;
  max-width: 35%;
}

#contact .col-lg-5 {
  flex: 0 0 62.5%;
  max-width: 62.5%;
}

/* Make footer logo same size as navigation logo */
footer img {
  width: 64px;
  height: 64px;
}

/* Hide footer address label */
[data-translate="footer-address-label"] {
  display: none;
}

/* Remove border line above lawyer code */
.mt-5.pt-3.border-top {
  border-top: none !important;
}

/* Add break line above fee account */
[data-translate="footer-fee-account"] {
  border-top: 1px solid currentColor;
  padding-top: 1rem;
  display: inline-block;
  width: 100%;
}

/* Hide account info and registration codes from address section */
.d-flex.flex-column.gap-2.mb-4,
.mt-5.pt-3.border-top {
  display: none !important;
}

/* Make regulatory section text justified */
.text-secondary.small.text-center.mt-4 {
  text-align: justify !important;
}

/* Override local Inter fonts to use Google Fonts version with full character set */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyeMZhrib2Bg-4.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0100-017F, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuI6fMZhrib2Bg-4.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0100-017F, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuDyfMZhrib2Bg-4.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0100-017F, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Ensure consistent font rendering for all characters */
body, * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Hide mobile language selector on desktop */
@media (min-width: 992px) {
  #languageDropdownMobile,
  #languageDropdownMenuMobile,
  #currentLanguageFlagMobile {
    display: none !important;
  }
}