/* Reset / Best Practices */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(to right, #f3f4f6, #e4e7eb);
  font-family: "Nunito", sans-serif;
  line-height: 1.7;
  color: #2b3e50;
}

/* Make all images responsive by default */
img {
  max-width: 100%;
  height: auto;
}

/* Container */
.lawyer-div-lawyer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header Section */
.header-lawyer {
  background: linear-gradient(135deg, #3a3a3a, #747474);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-lawyer h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 15px;
}

.header-lawyer p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Section Titles */
.section-title-lawyer {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2b3e50;
  font-weight: bold;
  text-align: center;
  position: relative;
  text-transform: uppercase;
}

.section-title-lawyer::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background: #3e3e3e;
  border-radius: 5px;
}

/* Section Containers */
.legal-description-lawyer,
.location-details-lawyer,
.consultation-form-lawyer {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 40px;
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legal-description-lawyer:hover,
.location-details-lawyer:hover,
.consultation-form-lawyer:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* List Styling */
.legal-description-lawyer ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-top: 10px;
}

.legal-description-lawyer ul li {
  margin-bottom: 8px;
  color: #4a4a4a;
  font-size: 1.1rem;
}

/* Card Styles */
.location-card-lawyer {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card-lawyer:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.location-info-lawyer h4 {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2b3e50;
  margin-bottom: 12px;
}

.location-info-lawyer p {
  margin: 6px 0;
  font-size: 1.1rem;
  color: #555;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 25px 0;
}

/* Form Styles */
.form-row-lawyer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}

.form-row-lawyer>div,
.form-row-lawyer>textarea {
  flex: 1;
  min-width: 240px;
}

.form-row-lawyer>.file-input-wrapper-lawyer {
  flex: 1;
  min-width: 300px;
}

.form-group-lawyer input,
.form-group-lawyer textarea,
.form-group-lawyer select {
  flex: 1;
  padding: 15px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #f5f5f5;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group-lawyer input:focus,
.form-group-lawyer textarea:focus,
.form-group-lawyer select:focus {
  border-color: #3e3e3e;
  outline: none;
  box-shadow: 0 0 8px rgba(62, 62, 62, 0.5);
}

/* Input Icons */
.input-icon-lawyer {
  position: relative;
  flex: 1;
}

.input-icon-lawyer i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #666;
  font-size: 1.3rem;
  pointer-events: none;
}

.input-icon-lawyer input {
  padding-left: 45px;
}

.input-error-lawyer {
  border-color: #e74c3c;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.input-error-lawyer+i {
  color: #e74c3c;
}

/* Error Message Positioning */
.error-lawyer {
  color: #e74c3c;
  font-size: 0.85rem;
  /* margin-top: 5px; */
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  word-wrap: break-word;
}

/* File Input */
.file-input-wrapper-lawyer {
  position: relative;
  display: inline-block;
}

.file-input-wrapper-lawyer .file-btn-lawyer {
  background-color: #3e3e3e;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  z-index: 2;
}

.file-input-wrapper-lawyer:hover .file-btn-lawyer {
  background-color: #2b2b2b;
}

.file-input-wrapper-lawyer input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

#file-preview-lawyer {
  margin-top: 10px;
  max-height: 150px;
  /* Fixed height for scrolling */
  overflow-y: auto;
  /* Enable vertical scrolling */
  overflow-x: hidden;
  /* Prevent horizontal scrolling */
  padding: 10px;
  border: 1px solid #3e3e3e;
  border-radius: 10px;
  background: #f9f9f9;
  word-break: break-word;
  /* Handle long file names */
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Form Button */
.form-submit-btn-lawyer {
  background: #3e3e3e;
  color: white;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 10px;
  text-align: center;
  display: inline-block;
  transition: background 0.3s ease, transform 0.3s ease;
  width: 100%;
  max-width: 300px;
  margin: 20px auto 0;
}

.form-submit-btn-lawyer:hover {
  background: #2b2b2b;
  transform: scale(1.05);
}

/* Input Valid */
.input-valid-lawyer {
  border-color: #2ecc71;
}

/*========================================
  MEDIA QUERIES
========================================*/

@media (max-width: 1140px) {
  .form-row-lawyer {
    gap: 30px;
  }
}

/* Large screens down to tablets (<= 1024px) */
@media (max-width: 1024px) {
  .header-lawyer h1 {
    font-size: 2.5rem;
  }

  .header-lawyer p {
    font-size: 1rem;
  }

  /* .form-row-lawyer {
    gap: 10px;
  } */

  .form-group-lawyer input,
  .form-group-lawyer textarea,
  .form-group-lawyer select {
    padding: 12px;
    font-size: 0.9rem;
  }


  .file-input-wrapper-lawyer .file-btn-lawyer {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .form-submit-btn-lawyer {
    padding: 14px;
    font-size: 1rem;
  }
}

/* Tablets to mid-size phones (<= 768px) */
@media (max-width: 768px) {
  .header-lawyer h1 {
    font-size: 2rem;
  }

  .header-lawyer p {
    font-size: 0.9rem;
  }

  .form-row-lawyer {
    flex-direction: column;
  }

  .form-group-lawyer input,
  .form-group-lawyer textarea,
  .form-group-lawyer select {
    font-size: 0.85rem;
    padding: 10px;
  }

  .form-control-lawyer {
    width: 240px;
  }

  .form-row-lawyer textarea {

    width: 240px;
  }


  #file-preview-lawyer {
    width: 240px;
  }

  .file-input-wrapper-lawyer .file-btn-lawyer {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .form-submit-btn-lawyer {
    padding: 12px;
    font-size: 0.9rem;
  }

  .error-lawyer {
    font-size: 0.8rem;
    top: 100%;
    /* Adjust positioning */
    position: absolute;
    /* Before its relative */
    left: auto;
    /* margin-top: 10px; */
  }


  .file-input-wrapper-lawyer .file-btn-lawyer {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .form-submit-btn-lawyer {
    padding: 12px;
    font-size: 0.9rem;
  }

  .error-lawyer {
    font-size: 0.8rem;
    top: 100%;
    /* Adjust positioning */
    position: absolute;
    /* Before its relative */
    left: auto;
    /* margin-top: 10px; */
  }
}

/* Small screens and down (<= 480px) */
@media (max-width: 480px) {
  .header-lawyer {
    padding: 40px 15px;
  }

  .header-lawyer h1 {
    font-size: 1.8rem;
  }

  .header-lawyer p {
    font-size: 0.8rem;
  }

  .form-group-lawyer input,
  .form-group-lawyer textarea,
  .form-group-lawyer select {
    font-size: 0.8rem;
    padding: 8px;
  }

  /* .form-row-lawyer textarea {
    
    width: 100px;
}

#file-preview-lawyer{
  width: 100px;
} */
  .file-input-wrapper-lawyer .file-btn-lawyer {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .form-submit-btn-lawyer {
    font-size: 0.8rem;
    padding: 10px;
  }

  .error-lawyer {
    font-size: 0.75rem;
    /* margin-top: 8px; */
  }
}