* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  color: #2e2e2e;
  background-color: #fff;
  overflow-x: hidden;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.5s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.navbar.scrolled .nav-links a {
  color: #f9b566;
}

.navbar.scrolled .menu-toggle {
  color: #f9b566;
}

.logo img {
  height: 80px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #333;
  user-select: none;
  z-index: 1001;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  margin: 0 15px;
  transition: color 0.3s ease;
}

.btn-contact {
  padding: 10px 20px;
  background-color: #f9b566;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
}

.btn-contact:hover {
  background-color: #fddab1;
  color: #000;
}

/* ---------------- HERO ---------------- */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding: 140px 60px 60px;
  background: url('/Imagenes/judgelaw.jpeg') no-repeat center left / cover;
  position: relative;
}

.hero-content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 40px;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 2.2rem;
  color: #3a2e1f;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero-content p {
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 30px;
  font-weight: 500;
  text-align: right;
}

.hero-text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-assistance {
  background-color: #f9b566;
  color: white;
  padding: 12px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  width: fit-content;
  margin-left: auto;
  display: block;
}

.btn-assistance:hover {
  background-color: #e8a554;
}

/* ---------------- ABOUT ---------------- */
.about-section {
  display: flex;
  justify-content: center;
  padding: 60px 0;
  background-color: #fff;
}

.about-container {
  margin-top: 100px;
  display: flex;
  flex-wrap: wrap;
  max-width: 1400px;
  width: 100%;
  align-items: stretch;
}

.about-left, .about-right {
  flex: 1 1 50%;
  padding: 40px;
  box-sizing: border-box;
}

.about-left h2 {
  font-size: 2rem;
  color: #4a2c1a;
  margin-bottom: 20px;
}

.about-left p {
  font-weight: 5000;
  color: #000;
}

.about-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 20px;
}

.about-right::before {
  content: "";
  background: url("/Imagenes/court.jpeg") center/cover no-repeat;
  opacity: 0.2;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.about-overlay {
  position: relative;
  z-index: 2;
  background-color: transparent;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-overlay p {
  font-weight: 700;
  color: #000;
}

.logos {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.logos img {
  width: 60px;
  height: auto;
}

/* ---------------- CONTACT ---------------- */
.contact-section {
  background: url("/Imagenes/Martillo negro.png") center/cover no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: white;
  position: relative;
}

.contact-overlay {
  width: 100%;
  max-width: 1200px;
  padding: 0 5%;
  box-sizing: border-box;
}

.contact-content {
  max-width: 700px;
  text-align: right;
  padding-right: 20px;
}

.contact-content h2 {
  font-size: 2.2rem;
  color: #f5c36e;
  margin-bottom: 20px;
  font-weight: 700;
}

.contact-content p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #fff;
}

/* ---------------- TESTIMONIALS ---------------- */

.testimonials-section {
  background: url('/Imagenes/justice.webp') right center/contain no-repeat;
  background-color: #fff;
  padding: 80px 20px;
  position: relative;
  height: 600px;
}

.testimonials-header {
  max-width: 1000px;
  margin: 0 auto 40px;
  text-align: left;
}

.testimonials-header h2 {
  font-size: 2rem;
  color: #4a2c1a;
  margin-bottom: 10px;
}

.testimonials-header p {
  font-size: 1.1rem;
}

.testimonial-carousel {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-card {
  min-width: 100%;
  box-sizing: border-box;
  background-color: #f5f5f5;
  border: 2px solid #d1ad78;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.testimonial-card .stars {
  color: #d9a552;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.testimonial-card p {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 2rem;
  color: #d9a552;
  cursor: pointer;
  z-index: 10;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* ---------------- FOOTER ---------------- */
.footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9rem;
}

/* ---------------- FORM ---------------- */

.final-contact-section {
  background: url('/Imagenes/balanza.jpeg') center/cover no-repeat;
  position: relative;
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.final-contact-overlay {
  display: flex;
  max-width: 1300px;
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.final-contact-left {
  flex: 1 1 55%;
  background-color: rgba(255, 198, 109, 0.85);
  padding: 30px;
  border-radius: 12px;
  color: black;
}

.final-contact-left h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: white;
}

.final-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.form-group label {
  min-width: 90px;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.final-form button {
  align-self: flex-end;
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #ee930a;
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.final-form button:hover {
  background-color: #f0c47d;
}

.address {
  margin-top: 30px;
  font-size: 0.95rem;
  color: white;
}

.final-contact-right {
  flex: 1 1 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: right;
}

.final-contact-right p {
  font-size: 1.6rem;
  font-weight: bold;
  color: #f5c36e;
}

.recaptcha-container {
  flex: 1;
  display: flex;
  justify-content: flex-start; 
}

/* ---------------- POP OUT ---------------- */

.form-success-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup-content {
  background: #fff;
  color: #333;
  padding: 30px 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.popup-content button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #f9b566;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.popup-content button:hover {
  background-color: #e0a850;
}

.hidden {
  display: none;
}

/* --------------------- FADE -----------------*/

.fade-init {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 160px 20px 60px;
    background-position: center;
  }

  .hero-content {
    grid-column: 1;
    padding: 0;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .navbar {
    flex-wrap: wrap;
    padding: 20px;
  }

  .nav-right {
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    position: relative;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: white;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .navbar.scrolled .menu-toggle {
    color: #f9b566;
  }

  .btn-contact {
    display: none;
  }

  .contact-section {
    justify-content: center;
    text-align: center;
  }

  .contact-content {
    text-align: center;
    margin: 0 auto;
  }

  .about-container {
    flex-direction: column;
  }

  .about-left, .about-right {
    flex: 1 1 100%;
    padding: 20px;
  }

  .testimonials-header {
    text-align: center;
  }

  .testimonial-card {
    padding: 20px;
  }

  .carousel-btn {
    font-size: 1.5rem;
  }

 .final-contact-overlay {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .final-contact-right {
    justify-content: center;
  }

  .final-contact-right p {
    font-size: 1.3rem;
  }

  .final-contact-left h2,
  .form-group {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .form-group label {
    min-width: auto;
  }

  .final-form button {
    align-self: center;
  }

  .address {
    text-align: center;
  }
}