/* Bloque: Imagen con Descripción */

/* Container */
.edgc-image-desc {
  padding: 4rem 0;
  overflow: hidden;
}

/* Full Width Mode */
.edgc-image-desc.edgc-image-desc-full-width {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.edgc-image-desc-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Posición de imagen */
.edgc-image-desc.image-right .edgc-image-desc-wrapper {
  direction: rtl;
}

.edgc-image-desc.image-right .edgc-image-desc-media,
.edgc-image-desc.image-right .edgc-image-desc-content {
  direction: ltr;
}

/* Imagen con marco */
.edgc-image-desc-media {
  display: flex;
  justify-content: center;
}

.edgc-image-desc-frame {
  position: relative;
  display: inline-block;
  background: #fff;
  padding: 0.75rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.edgc-image-desc-frame:hover {
  transform: rotate(0deg);
}

.edgc-image-desc-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Contenido de texto */
.edgc-image-desc-content {
  font-size: 1.125rem;
  line-height: 1.8;
  text-align: justify;
}

.edgc-image-desc-content p {
  margin: 0 0 1.25rem 0;
}

.edgc-image-desc-content p:last-child {
  margin-bottom: 0;
}

/* Editor Styles */
.edgc-image-desc-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 1.5rem;
  border: 1px dashed #ddd;
  border-radius: 8px;
  min-height: 250px;
}

.edgc-image-desc-editor.image-right {
  direction: rtl;
}

.edgc-image-desc-editor.image-right > * {
  direction: ltr;
}

.edgc-image-desc-media-editor {
  display: flex;
  align-items: center;
  justify-content: center;
}

.edgc-image-desc-content-editor {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.image-preview-container {
  position: relative;
  display: inline-block;
}

.edgc-image-desc-preview {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
  padding: 4px 12px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  cursor: pointer;
}

.select-image-btn {
  background: #003876 !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .edgc-image-desc-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .edgc-image-desc.image-right .edgc-image-desc-wrapper {
    direction: ltr;
  }

  .edgc-image-desc-frame {
    transform: rotate(0deg);
  }

  .edgc-image-desc-content {
    font-size: 1rem;
  }

  .edgc-image-desc-editor {
    grid-template-columns: 1fr;
  }
}
