* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Baskerbille', serif;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Baskerbille', serif;
  background-color: #e2dfd8;
  color: #2d2d2d;
}

html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}
.whatsapp-float {
  position: fixed;
  width: 70px;
  height: 70px;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}
 
header {
  background: url('img/portadaprincipal.jpg') no-repeat center center/cover;
  background-size: cover;
  background-color: #e2dfd8;
  height: 100vh;
  width: 100vw;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header h1 {
  font-size: 3em;
  margin: 0;
}

.contenedor-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.btn-contacto {
  background-color: #a47864;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  margin-top: 30px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-decoration: none;
  position: absolute;
  left: 33%;  
  bottom: 26%;
}

.btn-contacto:hover {
  background-color: #a47864;
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

section {
  padding: 60px 20px;
  margin: auto;
}

.nosotros {
  display: flex;
  justify-content: space-between;
  padding: 60px 40px;
  background-color: #e2dfd8;
  width: 100vw;
  box-sizing: border-box;
}

.columna {
  width: 48%;
  position: relative;
}

.izquierda {
  padding-right: 70px;
  border-right: 2px solid rgba(253, 250, 245, 0.3);
  max-width: 40%;
  margin: 0 auto;
}

.izquierda p {
  text-align: justify;
  line-height: 1.8;
  font-size: 1.05em;
  margin-top: 10px;
}

.derecha {
  padding-left: 10px;
  max-width: 40%;
  margin: 0 auto;
}

.derecha p,
.derecha li {
  text-align: justify;
  line-height: 1.8;
  font-size: 1.05em;
}

h2 {
  font-size: 2em;
  color: #58423f;
  margin-top: 30px;
  margin-bottom: 10px;
}

ul {
  padding-left: 20px;
}

hr {
  border: none;
  border-top: 2px solid rgba(253, 250, 245, 0.3);
  margin: 30px 0;
}

.marca-agua {
  position: relative;
  margin-top: 50px; 
  opacity: 1;
  width: 80%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.areasdepractica {
  background: url('img/Tribunales.jpg') no-repeat center center/cover;
  width: 100vw;
  max-width: 100vw !important;
  min-height: 100vh;
  height: auto;
  margin: 0 !important;
  padding: 60px 20px 100px 20px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
}

.areasdepractica h2 {
  font-size: 2em;
  margin-top: 10px;
  margin-bottom: 110px;
  padding-top: 20px;
  color: #58423f;
}

.iconos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 180px 60px;
  text-align: center;
  width: 100%;
  max-width: 1000px;
  justify-items: center;
}

.icono-hover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  cursor: pointer;
}

.circulo-hover {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: rgba(88, 66, 63, 0.6); /* #58423f con transparencia */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.icono-hover:hover .circulo-hover {
  opacity: 1;
}

.icono-hover img {
  width: 135px;
  height: auto;
  z-index: 2;
  transition: transform 0.3s ease;
}

.icono-hover:hover img {
  filter: none;
  transform: scale(1.05);
}

.area {
  position: relative;  
  text-align: center;
  z-index: 1;
}

.descripcion {
  display: none;
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.95);
  color: #58423f;
  padding: 15px 35px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 1.0em;
  width: 420px;
  max-width: 90vw;
  min-height: 80px;
  text-align: justify;
  z-index: 9999;
}

.descripcion::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

.descripcion.visible {
  display: block;
  opacity: 1;
}

.descripcion.fade-out {
  opacity: 0;
}

.contacto {
  background: url('img/contacto.jpg') no-repeat center center / cover;
  min-height: auto;
  width: 100vw;
  display: flex;
  justify-content: center; 
  align-items: center;
  color: white;
  padding: 60px 20px;
  box-sizing: border-box;
  position: relative;
}

.contacto-contenido {
  display: flex;
  width: 80%;
  max-width: 1200px;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.contacto-texto {
  flex: 1;
  font-size: 1.1em;
  text-align: left;
  margin-top: -5px; 
}

.contacto-texto h2 {
  color: #e2dfd8;
  font-family: 'Baskerbille', serif;
  margin: 0;
}

.contacto form {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px 30px 80px 30px;
  border-radius: 8px;
  width: 50%;
  color: #2d2d2d;
  position: relative;
  box-sizing: border-box;
}

.contacto form input,
.contacto form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #e2dfd8;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  box-sizing: border-box;
}

.contacto form button {
  position: absolute;
  bottom: 20px;
  right: 30px;
  background-color: #a47864;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.contacto form button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

footer {
  background-color: #58423f;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 1.0em;
  line-height: 1.8;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Tablets */
@media (max-width: 1024px) {
  header {
    background: url('img/portadaprincipal.jpg') no-repeat center center;
    background-size: cover;
    background-color: #e2dfd8;
    height: 65vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
  }

  .btn-contacto {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 4px;
    z-index: 10;
  }

  header h1 {
    font-size: 1.8em;
    padding: 0 20px;
    color: white;
  }

  .nosotros {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 30px;
    text-align: left;
    background-color: #e2dfd8;
  }

  .izquierda,
  .derecha {
    max-width: 90%;
    width: 90%;
    padding: 0;
    margin-bottom: 40px;
    border: none;
  }

  .izquierda img {
    width: 70%;
    display: block;
    margin: 30px auto 0 auto;
  }

  .izquierda h2 {
    text-align: center;
    margin-bottom: 15px;
  }

  .derecha h2:first-of-type {
    text-align: center;
    margin-top: 0;
    padding-top: 40px;
    border-top: 2px solid rgba(253, 250, 245, 0.3);
  }

  .derecha h2:last-of-type {
    text-align: center;
    padding-top: 40px;
    margin-top: 0;
    border-top: none;
  }

  .izquierda p,
  .derecha p,
  .derecha li {
    font-size: 1.1em;
    line-height: 1.6;
    padding: 0 15px;
    text-align: justify;
    max-width: 90%;
    margin: 0 auto;
    padding-left: 25px;
  }

  ul {
    padding-left: 40px;
  }

  .marca-agua {
    position: relative;
    margin-top: 40px;
    opacity: 1;
    width: 40%;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .areasdepractica {
    background: url('img/Tribunales.jpg') no-repeat center center/cover;
    width: 100vw;
    max-width: 100vw;
    min-height: auto;
    height: auto;
    padding: 80px 15px 100px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .areasdepractica h2 {
    margin-top: 0;
    margin-bottom: 50px;
    font-size: 1.8em;
    padding-top: 0;
    color: #58423f;
  }

  .iconos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 90px 30px;
    justify-items: center;
    padding: 0 20px;
    width: 100%;
    max-width: 700px;
  }

  .icono-hover {
    width: 140px;
    height: 140px;
    position: relative;
  }

  .icono-hover img {
    width: 130px;
    height: auto;
  }

  .area {
    position: relative;
    min-height: 240px;
  }

  .descripcion {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 85vw;
    max-width: 370px;
    min-height: 140px;
    background-color: rgba(255, 255, 255, 0.97);
    color: #58423f;
    padding: 20px 28px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 1em;
    line-height: 1.6;
    z-index: 9999;
    text-align: justify;
    display: none;
    overflow-y: auto;
    max-height: 50vh;
  }

  .descripcion::after {
    display: none;
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 12px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.97) transparent transparent transparent;
  }

  .descripcion.visible {
    display: block;
    opacity: 1;
  }

  .descripcion.fade-out {
    opacity: 0;
  }

  /* Sección contacto */
  .contacto {
    flex-direction: column;
    padding: 60px 30px;
    background-position: center;
    background-size: cover;
    text-align: center;
  }

  .contacto-contenido {
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 100%;
    align-items: center;
  }

  .contacto-texto {
    font-size: 1.05em;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 0 20px;
  }

  .contacto-texto h2 {
    font-size: 1.8em;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
  }

  /* Formulario adaptado */
  .contacto form {
    width: 100%;
    max-width: 600px;
    padding: 30px 25px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.65);
    color: #2d2d2d;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .contacto form input,
  .contacto form textarea {
    font-size: 1.1em;
    padding: 14px;
  }

  /* Botón de enviar */
  .contacto form button {
    position: static;
    margin-top: 20px;
    width: 100%;
    font-size: 1.1em;
    padding: 14px 0;
  }

  /* Footer */
  footer {
    padding: 35px 20px;
    font-size: 1.05em;
    line-height: 1.6;
    text-align: center;
  }

  footer p {
    margin-bottom: 15px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .descripcion {
    top: -120px; /* menos negativa */
    width: 90vw;            /* Usamos % en vez de píxeles */
    max-width: 340px;       /* Un poco más estrecho */
    padding: 15px 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .area {
    min-height: 220px; /* asegura que haya espacio vertical */
  }

  .areasdepractica {
    padding-top: 100px; /* espacio extra arriba */
  }
}

@media (max-width: 768px) {
  header {
    background: url('img/portadaprincipal.jpg') no-repeat center center;
    background-size: contain;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #e2dfd8;
    height: 58vh;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
  }

  header h1 {
    font-size: 1.4em;
    padding: 0 10px;
    color: white;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .nosotros {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 15px;
    text-align: left;
    background-color: #e2dfd8;
  }

  .izquierda,
  .derecha {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin-bottom: 30px;
    border: none;
  }

  .izquierda img {
    width: 80%;
    display: block;
    margin: 20px auto 0 auto;
  }

  .izquierda h2 {
    text-align: center;
    margin-bottom: 10px;
  }

  .derecha h2:first-of-type {
    text-align: center;
    margin-top: 0;
    padding-top: 30px;
    border-top: 2px solid rgba(253, 250, 245, 0.3);
  }

  .derecha h2:last-of-type {
    text-align: center;
    padding-top: 30px;
    margin-top: 0;
    border-top: none;
  }

  .izquierda p,
  .derecha p,
  .derecha li {
    font-size: 1em;
    line-height: 1.6;
    padding: 0 10px;
    text-align: justify;
    max-width: 90%;
    margin: 0 auto;
    padding-left: 20px;
   }

  ul {
    padding-left: 30px;
  }

  .marca-agua {
   position: relative;
   margin-top: 30px; 
   opacity: 1;
   width: 50%;
   display: block;
   margin-left: auto;
   margin-right: auto;
  }

  .areasdepractica {
    padding: 120px 15px 40px 15px !important;
    height: auto;
    background-position: center center;
  }

  .areasdepractica h2 {
    margin-top: -10px;
    margin-bottom: 40px;
    font-size: 1.8em;
    padding-top: 0;
  }

  .iconos {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 80px 20px;
   justify-items: center;
   padding: 0 10px;
 }

 .icono-hover {
   width: 120px;
   height: 120px;
   position: relative;
  }

 .icono-hover img {
   width: 110px;
   height: auto;
  }

 .area {
   position: relative;
   min-height: 220px;
  }

 .descripcion {
   position: absolute;
   top: -180px;
   left: 50%;
   transform: translateX(-50%);
   width: 70vw;
   max-width: 300px;
   min-height: 120px;
   background-color: rgba(255, 255, 255, 0.97);
   color: #58423f;
   padding: 18px 24px;
   border-radius: 12px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
   font-size: 0.9em;
   line-height: 1.6;
   z-index: 9999;
   text-align: justify;
   display: none;
   overflow-y: auto;
   max-height: 50vh;
  }

 .descripcion::after {
    display: none;
  }

 .descripcion.visible {
   display: block;
   opacity: 1;
  }

 .descripcion.fade-out {
   opacity: 0;
  }

 /* Sección contacto */
 .contacto {
   flex-direction: column;
   padding: 40px 15px;
   background-position: center;
   background-size: cover;
   text-align: center;
  }

 .contacto-contenido {
   flex-direction: column;
   gap: 30px;
   width: 100%;
   max-width: 100%;
   align-items: center;
  }

 .contacto-texto {
   font-size: 1.05em;
   margin-bottom: 20px;
   padding: 0 10px;
  }

 .contacto-texto h2 {
   font-size: 1.5em;
   line-height: 1.4;
  }

 /* Formulario adaptado */
 .contacto form {
   width: 100%;
   max-width: 500px;   
   padding: 25px 20px;
   border-radius: 8px;
   background-color: rgba(255, 255, 255, 0.65);
   color: #2d2d2d;
   box-sizing: border-box; 
   margin: 0 auto;
  }

 .contacto form input,
 .contacto form textarea {
   font-size: 1em;
   padding: 12px;
  }

 /* Botón de enviar */
 .contacto form button {
   position: static;
   margin-top: 15px;
   width: 100%;
   font-size: 1em;
   padding: 12px 0;
  }

 /* Footer */
 footer {
   padding: 25px 15px;
   font-size: 0.95em;
   line-height: 1.6;
   text-align: center;
  }

 footer p {
   margin-bottom: 10px;
  }

}

@media (max-width: 480px) {
  header {
    height: 35vh;
    background-size: contain;
    padding-bottom: 30px;
  }

  header h1 {
    font-size: 1.2em;
    padding: 0 5px;
  }

  .btn-contacto {
    font-size: 0.85em;
    padding: 8px 16px;
    bottom: 8%;
  }

  .areasdepractica {
    padding: 120px 15px 40px 15px !important;
    height: auto;
    background-position: center center;
  }

  .areasdepractica h2 {
    margin-top: -10px;
    margin-bottom: 40px;
    font-size: 1.8em;
    padding-top: 0;
  }

  .iconos {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 80px 20px;
   justify-items: center;
   padding: 0 10px;
 }

 .icono-hover {
   width: 120px;
   height: 120px;
   position: relative;
  }

 .icono-hover img {
   width: 110px;
   height: auto;
  }

 .area {
   position: relative;
   min-height: 220px;
  }

 .descripcion {
   position: absolute;
   top: -180px;
   left: 50%;
   transform: translateX(-50%);
   width: 70vw;
   max-width: 200px;
   min-height: 120px;
   background-color: rgba(255, 255, 255, 0.97);
   color: #58423f;
   padding: 18px 24px;
   border-radius: 12px;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
   font-size: 0.9em;
   line-height: 1.6;
   z-index: 9999;
   text-align: justify;
   display: none;
   overflow-y: auto;
   max-height: 50vh;
  }

 .descripcion::after {
   display: none;
  }

 .descripcion.visible {
   display: block;
   opacity: 1;
  }

 .descripcion.fade-out {
   opacity: 0;
  }

  .izquierda img {
    width: 90%;
  }

  .descripcion {
    width: 85vw;
    font-size: 0.85em;
    padding: 15px 18px;
  }

  .icono-hover {
    width: 100px;
    height: 100px;
  }

  .icono-hover img {
    width: 95px;
  }

  .contacto-texto {
    font-size: 1em;
    padding: 0 5px;
  }

  .contacto-texto h2 {
    font-size: 1.3em;
  }

  .contacto form {
    padding: 20px 15px;
  }

  .contacto form input,
  .contacto form textarea {
    font-size: 0.95em;
  }

  .contacto form button {
    font-size: 0.95em;
    padding: 10px 0;
  }

  footer {
    font-size: 0.9em;
    padding: 20px 10px;
  }
}

