/* Bloque: Contenido con Imagen */

/* Container con imagen de fondo */
.edgc-content-image {
  padding: 5rem 0;
  overflow: hidden;
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
}

/* Full Width Mode */
.edgc-content-image.edgc-content-image-full-width {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.edgc-content-image-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  align-items: center;
}

/* Posición de imagen - afecta el orden del grid */
.edgc-content-image.image-right .edgc-content-image-wrapper {
  /* Texto a la izquierda, imagen a la derecha - orden normal */
  direction: ltr;
}

.edgc-content-image.image-left .edgc-content-image-wrapper {
  direction: rtl;
}

.edgc-content-image.image-left .edgc-content-image-text {
  direction: ltr;
}

/* Contenido de texto */
.edgc-content-image-text {
  max-width: 600px;
}

.edgc-content-image-title {
  font-size: 2.25rem;
  font-weight: 700;
  font-style: italic;
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
  color: #003876;
}

.edgc-content-image-content {
  font-size: 1.125rem;
  line-height: 1.75;
  text-align: justify;
  color: #4b5563;
}

.edgc-content-image-content p {
  margin: 0 0 1.5rem 0;
}

.edgc-content-image-content p:last-child {
  margin-bottom: 0;
}

/* Botón */
.edgc-content-image-button-wrapper {
  margin-top: 2rem;
}

.edgc-content-image-button {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  background-color: #003876;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 56, 118, 0.3);
}

.edgc-content-image-button:hover {
  background-color: #002654;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 56, 118, 0.4);
  color: #ffffff;
}

/* Imagen - área vacía (la imagen real está en el background de la sección) */
.edgc-content-image-media {
  display: none;
}

.edgc-content-image-img {
  display: none;
}

/* Editor Styles */
.edgc-content-image-editor {
  display: flex;
  gap: 2rem;
  padding: 1.5rem;
  border: 1px dashed #ddd;
  border-radius: 8px;
  min-height: 300px;
}

.edgc-content-image-editor.image-right {
  flex-direction: row;
}

.edgc-content-image-editor.image-left {
  flex-direction: row-reverse;
}

.edgc-content-image-text-editor {
  flex: 1;
}

.edgc-content-image-title-editor {
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  border: none !important;
  background: transparent !important;
}

.edgc-content-image-content-editor {
  line-height: 1.75 !important;
}

.edgc-content-image-media-editor {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-container {
  position: relative;
  width: 100%;
}

.edgc-content-image-preview {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.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: 968px) {
  .edgc-content-image-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .edgc-content-image-media {
    flex: none;
    max-width: 300px;
    order: -1;
  }

  .edgc-content-image-title {
    font-size: 2rem;
  }

  .edgc-content-image-text {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .edgc-content-image {
    padding: 2rem 0;
  }

  .edgc-content-image-wrapper {
    padding: 0 1rem;
  }

  .edgc-content-image-title {
    font-size: 1.75rem;
  }

  .edgc-content-image-content {
    text-align: left !important;
  }
}
